Entity generator - trait in parent class

Fix for the [problem](https://github.com/doctrine/doctrine2/pull/632#issuecomment-22927500) mentioned by @AlexanderParker about my previous PR, #632.