[hibernate-dev] entity modes

Adam Warski adam at warski.org
Fri Sep 10 11:46:04 EDT 2010


On Sep 10, 2010, at 4:16 PM, Steve Ebersole wrote:

> I'd have to look closer at the envers code to know for sure, but the
> option I can see here is to say that the entity mode specified for a
> session factory is the entity mode we use when building the metamodel
> from hbm.xml or annotations.  Envers would then build its metamodel
> structures as it needs using the map entity mode.  So it would be "per
> entity" in a way, but in more broad strokes, the net effect being that a
> given entity could only have one mode representation in a given session
> factory.

Sounds good. So it wouldn't be illegal to use a different entity mode than the one specified for a SessionFactory, as long as one entity type is used consistently with one entity mode? (Currently Envers specifies the entity mode as map in the hibernate entity mapping it generates)

-- 
Adam Warski
http://www.warski.org
http://www.softwaremill.eu








More information about the hibernate-dev mailing list