Symfony2 and Doctrine – Error: Invalid PathExpression. Must be a StateFieldPathExpression

You can use the currently undocumented IDENTITY function to select the FK IDs in a query:

SELECT IDENTITY(c.parent) ...

Leave a Comment