Last active
August 28, 2017 12:36
-
-
Save aaronmu/98f82fdcd6b2c324e8a95186d6ca3ba2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// F is a doctrine entity. | |
class F { | |
private $foo, $bar; // all strings \o/ | |
} | |
// I have a native query that returns the following resultset: | |
$rs = [ | |
['foo' => 'hello', 'bar' => 'world', 'trueOrFalse' => true], | |
//.. | |
]; | |
// I want to map it to the following object: | |
// X is not a doctrine entity. | |
class X { | |
private $f; // instance of F which is a doctrine entity | |
private $trueOrFalse; // boolean | |
} | |
// Is this possible using native query and ResultSetMappingBuilder? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment