more fixes to entity to generate correct schema
Merge pull request #2774 from kurund/entity-fixes

more fixes to entity to generate correct schema