


Property descriptorProperty = relationshipMemberMapper.getProperty(RelationshipDescriptor get("id")) //Id-field name taken from the meta-description of course lect(fromRelationshipIdentityType.get(relationshipProperty.getName()). Root fromRelationshipIdentityType = om(relationshipMemberMapper.getEntityType()) Subquery subquery = cq.subquery(relationshipMemberMapper.getEntityType())


I have the same error in Criteria API in the next call:īasicModel.hasRole(relationshipManager, identity.getAccount(), role) Ĭould you close the error something like this (compare entity ID in 'IN clause' and not entirely entity) in JPAIdentityStore: I will write about this error in eclipselink community, but it can take a very long time. (em.createQuery(cq).getResultList()) //Two records Query query = em.createQuery("select r from Entity r where r.id in (select e.owner.id from Identity e)") Query: ReadAllQuery(referenceClass=Entity )īut if I change requests as follows, it will work perfectly: (em.createQuery(cq).getResultList()) //ExceptionĮxception (Eclipse Persistence Services - 2.5.0.v20130507-3faac2b): .QueryExceptionĮxception Description: Illegal use of getField() in expression. Subquery subquery = cq.subquery(Identity.class) (query.getResultList()) //Two recordsĬriteriaBuilder cb = em.getCriteriaBuilder() ĬriteriaQuery cq = cb.createQuery(Entity.class) Query query = em.createQuery("select r from Entity r where r in (select e.owner from Identity e)") I tested in war application in glassfish 4:ġ) JPQL this query is working as excected: INSERT INTO `identity` VALUES ('5', 'xxx') INSERT INTO `identity` VALUES ('4', 'ccc') INSERT INTO `identity` VALUES ('3', 'zzz') INSERT INTO `identity` VALUES ('2', 'yyy') INSERT INTO `identity` VALUES ('1', 'aaa') getters and class Identity implements Serializable String = "OWNER_ID", referencedColumnName = "ID") I found out that it is a mistake eclipselink.Ī little example with two class Entity implements Serializable String id I fixed this previously in my project with orm.xml like this:īut I have another error with picketlink + eclipselink.
