Community
Participate
Working Groups
Build Identifier: According to the Eclipselink javadoc it is possible to create an EntityManagerFactory with a ServerSession. The EntityManager created is able to execute JPQL but not Criteria API. see following code snippt: ServerSession serverSession = EclipselinkService.getInstance().getServerSession() EntityManagerFactory entityManagerFactory = JpaHelper.createEntityManagerFactory(serverSession); EntityManager entityManager = entityManagerFactory.createEntityManager(); CriteriaBuilder cb = entityManager.getCriteriaBuilder(); Following exception is thrown since setupImpl is null: java.lang.NullPointerException at org.eclipse.persistence.internal.jpa.EntityManagerFactoryDelegate.getMetamodel(EntityManagerFactoryDelegate.java:592) at org.eclipse.persistence.internal.jpa.EntityManagerFactoryDelegate.getCriteriaBuilder(EntityManagerFactoryDelegate.java:566) at org.eclipse.persistence.internal.jpa.EntityManagerImpl.getCriteriaBuilder(EntityManagerImpl.java:2287) Note: Our data model is created automatically, so it hard to use JPA annotation or XML mapping, we create however owr own org.eclipse.persistence.sessions.Project and therefore a ServerSession. How can we reuse these objects to construct a full-feature EntityManagerFactory? Reproducible: Always
Setting target and priority. See the following page for the meanings of these fields: http://wiki.eclipse.org/EclipseLink/Development/Bugs/Guidelines Community: Please vote for this bug if it is important to you. Votes are one of the main criteria we use to determine which bugs to fix next.
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink