I'm confused as well. The source explicitly disallows any optomistic lock strategy other than "version". From JoinedSubclassEntityPersister's constructor:
Code:
if ( optimisticLockMode()!=Versioning.OPTIMISTIC_LOCK_VERSION ) {
throw new MappingException(
"optimistic-lock attribute not supported for joined-subclass mappings: " + getEntityName()
);
}
I can't find any documentation in the manual, HiA, the wiki, or this forum actually stating that this is an as-designed rule... even though that condition seems to have been in the class for some time (source history wasn't preserved prior to a refactoring pre-hib3).
Can anyone confirm that this constraint is still needed and maybe share some insight as to why? Christian, it might be a useful note in the inheritance modeling chapter.. as this is a limitation that will certainly affect those decisions for some folks.
Thanks in advance!
Phill