[hibernate-dev] entity modes

Steve Ebersole steve at hibernate.org
Fri Sep 10 10:16:14 EDT 2010


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.

On Fri, 2010-09-10 at 09:10 +0200, Adam Warski wrote:
> Hello,
> 
> > Of course all this situations only occur where apps are using multiple
> > entity modes simultaneously, which we are not even sure is widely used;
> > I, at least, am not really sure exactly how entity modes are commonly
> > used.  I know people use the dynamic map mode for integration with
> > scripting languages and such, but beyond that I am not sure TBH.
> 
> Envers is also using the Map mode to map audit entities. Maybe an entity type could be bound to a single entity mode? At least in the scope of a session factory?
> 

-- 
Steve Ebersole <steve at hibernate.org>
http://hibernate.org




More information about the hibernate-dev mailing list