primary key, readonly and private setter are not serialized when serializing with entity type

This is uses for the template, you don't want to put in the id of a new
entity or some vales the code handles....