@PostLoad method not called when loading @ReadOnly entity from database
I have an entity that is meant to be immutable which wraps an
XML LOB column in the table which contains additional data. Instead of
modeling that additional data as explicit columns in the table, I want
to process the XML after the entity is loaded via @PostLoad lifecycle
listener and expose this additional data through methods of the
read-only entity class.
If this entity is annotated @ReadOnly,
then the post load listener is not called. I realize that many other
lifecycle listener methods probably don't make sense on a read only
entity, but it sure seems like @PostLoad should work. If I remove the
read-only annotation, the post load listener works just fine.