EntityHierarchyHelper.applyToAllEntityHierarchies( entityHierarchies, 
rootEntityExecutor, subEntityExecutor) allows some operation to be executed 
across all entity hierarchies.

Some operations require something special to be done for the "root" entity that 
is not done with other entities in the hierarchy, requiring both a root 
executor (executed only on the RootEntitySource) and a sub-entity executor 
(executed on each non-root EntitySource object in the EntityHierarchy). An 
example of this is in 
Binder.bindEntityHierarchiesExcludingNonIdAttributeBindings(). Here, most of 
the special work done on the root entity is ID, version, etc, stuff you will be 
moving to the EntityHierarchy.

Most operations use the same executor for all EntitySource objects. You can see 
examples of those operations in Binder.bindEntityHierarchies(). 

I'm not sure how you will be splitting things out. Let's discuss after the 
meeting tomorrow. I can help sort that stuff out for you.

Gail

----- Original Message -----
> From: "Steve Ebersole" <st...@hibernate.org>
> To: "hibernate-dev" <hibernate-dev@lists.jboss.org>
> Sent: Monday, February 17, 2014 7:28:37 PM
> Subject: [hibernate-dev] 5.0 metamodel binding
> 
> Gail,
> 
> I am working on some changes to metamodel and have come across some things
> that I need your help deciphering in terms of things you do Binder.  The
> background is this...
> 
> At the moment all of metamodel binding completely mis-handles
> MappedSuperclasses.  The annotation source processor handles them somewhat,
> but in a very unusable way; it basically flattens all MappedSuperclass info
> into the nearest Entity.  This is because the source package does not at
> all support the definition of MappedSuperclass.  And then of course
> bindings do nothing with it, since it is not accounted for in source.
> 
> To add this support I plan on the following changes:
> 
> 1) Move lots of the information currently defined by RootEntitySource into
> EntityHierarchy.  The identifier, version, etc is actually a function of
> the hierarchy as a whole, so conceptually it makes more sense there anyway.
>  And that mirrors the way we modeled it in the binding spi.
> 2) Generalize the EntityHierarchy tree to allow mixing Entity and
> MappedSuperclass sources.  A MappedSuperclass source actually needs to be
> defined.
> 3) Model MappedSuperclass in the binding spi as well.
> 
> Which leads to my confusion.  I have no idea how to account for such
> changes in the Binder code and its calls through various executors and
> contexts.  I really need some pointers here.
> _______________________________________________
> hibernate-dev mailing list
> hibernate-dev@lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/hibernate-dev
> 
_______________________________________________
hibernate-dev mailing list
hibernate-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/hibernate-dev

Reply via email to