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.
I noticed that another user ran into this and filed a bug:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=477063Are entity lifecycle listeners ever called on a @ReadOnly entity, or does that just not make sense for some broad reason?
Is
is possible to make @PostLoad work in this situation? If so, could
someone please point me to roughly where in the source I could try
writing a patch to enable this?
Thanks,
Jason