Re: [hibernate-dev] Feedback on the idea of PersistenceProviderResolver.getPersistenceProviders() caching the same org.hibernate.ejb.HibernatePersistence class instance for multiple application deploy

2014-09-17 Thread Emmanuel Bernard
PersistenceProvider implementations are not app specific. Hibernate Validator uses Persistence.getPersistenceUtil() This in turn is a static reference object that in its method calls Persistence.getProviders() *each time* to resolve operations like isLoaded(entity). So to answer your question,

Re: [hibernate-dev] Feedback on the idea of PersistenceProviderResolver.getPersistenceProviders() caching the same org.hibernate.ejb.HibernatePersistence class instance for multiple application deploy

2014-09-17 Thread Emmanuel Bernard
BTW there can be multiple persistence units deployed per application so if you are trying to tie your cache to the lifecycle of createContainerEntityManagerFactory, you might be making a mistake. On Wed 2014-09-17 11:22, Emmanuel Bernard wrote: > PersistenceProvider implementations are not app spe

[hibernate-dev] Embedded value not null when it includes an @ElementCollection

2014-09-17 Thread Davide D'Alto
Hi, I've created a test for OGM where we store an @Embeddable containing a list annotated with @ElementCollection [1]: This is the embedded: @Embeddable public class PhoneNumber { private String main; @ElementCollection private List alternatives; ... } In the test [2] I first sav

[hibernate-dev] Embedded value not null when it includes an @ElementCollection

2014-09-17 Thread Davide D'Alto
Hi, I've created a test for OGM where we store an @Embeddable containing a list annotated with @ElementCollection [1]: This is the embedded: @Embeddable public class PhoneNumber { private String main; @ElementCollection private List alternatives; ... } In the test [2] I first sav