Reputation: 1838
How to get the names of all columns in a doctrine entity?
Upvotes: 27
Views: 23038
Reputation: 13329
As described in the documentation for ClassMetadataInfo you can use the getColumnNames
method:
$em->getClassMetadata('Entities\MyEntity')->getColumnNames();
Upvotes: 55