For case when we not generate annotation (by default at doctrine orm:generate-entities) allow to not generate extra use for it -
```php
use Doctrine\ORM\Mapping as ORM;
```
For example if generate entities for my project that use only dbal in pord but use orm for generate entities in dev mode.
The already existing follow-up check throwing "Not all identifier properties can be found in the ResultSetMapping: %s" is a much more technical description.
If $sqlIdentifier is empty (count 0) it can be concluded that there are no mapped results. An alternative error message could thus be "The Paginator does not support queries without mapped results." (line 153).
Possibly '!=' on line 154 could be replaced by '>' because i think this is the only situation that can occur. But since i don't know this for sure, i left it like i found it.
Didn't use elseif in this commit as per Stof his suggestion.
The already existing follow-up check throwing "Not all identifier properties can be found in the ResultSetMapping: %s" is a much more technical description.
If $sqlIdentifier is empty (count 0) it can be concluded that there are no mapped results. An alternative error message could thus be "The Paginator does not support queries without mapped results." (line 153).
Possibly '!=' on line 154 could be replaced by '>' because i think this is the only situation that can occur. But since i don't know this for sure, i left it like i found it.
Hello,
I added two blank lines in comments two avoid the following error with PHPCS Symfony2 coding standard :
Error Code: SpacingAfterParams
Error Description: Last parameter comment requires a blank new line after it.
The properties of EntityGenerator are now protected instead of private.
But this does not make sense until they are accessed with static::.
Otherwise the templates cannot be overwritten within a sub class.
People like me think the problem is that there is no association
mapping, when the problem in fact could be that there also is a field
mapping on the property.
This message makes it clearer why we are getting an error message.