You may be able to use the discriminator pattern
http://docs.jboss.org/hibernate/orm/3.3/reference/en-US/html/mapping.html
You will need to create a parent superclass and then subclass it, something like
ClassWithSharedFields ClassExtensionThatUpdatesCertainFields ClassExtensionThatReadsCertainFields
Then ClassExtensionThatReadsCertainFields can specify a field that you do not plan to update, only as read.
This may be a slightly vague sentence, so if you want more specific help, you might want to provide some more specific examples of how your domain classes should behave in relation to your database.
Jason lowenthal
source share