Since I was the 'victim' of all of this, and worked through a solution,
My suggestion wold be to contribute some sort of a configuration map
of persistence units to package names, maybe a one-line of code,
an annotation of some sort.

On Jul 12, 2011, at 4:56 PM, Igor Drobiazko wrote:

> The recent discussion on the user's list on JPA integration is quite
> interesting. The question is whether Tapestry should automatically add
> entities found anywhere on the classpath to the EntityManagers. Here is the
> link to the discussion:
> 
> http://markmail.org/message/wb3iu3adpotbephh
> 
> Currently it works as:
> 
> 1) if there is only a single persistence unit configured, only entities from
> app's entities package are automatically added to the EntityManager. This
> conforms to behavior of the Hibenrate library and works out of the box.
> However, this conflicts with the JPA specification in some way. JPA
> specification says that <exclude-unlisted-classes> controls whether
> auto-scanning should be done or not. Currently, this element is ignored in
> Tapestry.
> 
> 2) If multiple persistence units are configured, no auto-scanning happens.
> None of the entities is added to any EntityManager. When discovering an
> entity class on the classpath, Tapestry can't know to which EntityManager it
> belongs. It also doesn't make sense to add all the entities to all the
> EntityManagers. So, when using multiple persistence unit, the user needs to
> add the entities explicitly.
> 
> Any feedback? Ideas?
> 
> -- 
> Best regards,
> 
> Igor Drobiazko
> http://tapestry5.de


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to