mysql - How to use not mapped entity fields in query builder -


i have question. have entity has not mapped field type in it. how can use field in query builder building queries? problem since not mapped fields not available in mysql tables, cannot use them in sql queries directly. there way use them in doctrine query builder? ;)

you've got several options :

 $sql = "   select ... "; // query here  $connection = $this->getdoctrine()->getmanager();  $qry = $connection->prepare($sql);  $qry->execute();  $results = $qry->fetchall();   // can iterate through $results... 

Comments

Popular posts from this blog

java - Date formats difference between yyyy-MM-dd'T'HH:mm:ss and yyyy-MM-dd'T'HH:mm:ssXXX -

c# - Get rid of xmlns attribute when adding node to existing xml -