I have an entity that looks like this:
/** * @Gedmo\\Tree(type=\"nested\") * @ORM\\Table(name=\"categories\") * @ORM\\Entity() */ class Category extends
You can use the currently undocumented IDENTITY function to select the FK IDs in a query:
IDENTITY
SELECT IDENTITY(c.parent) ...