fix nullables not written for simple types
allow entities to override non entity classes