more fixes to entity to generate correct schema