Home » Eclipse Projects » EclipseLink » EclipseLink 2.5.2 is returning empty vector with size 1 with getResultList (EclipseLink 2.5.2 is returning empty vector with size 1 with getResultList when using relationship in select in jpql)
EclipseLink 2.5.2 is returning empty vector with size 1 with getResultList [message #1412012] |
Mon, 25 August 2014 04:38 |
Santhosh Thatipally Messages: 1 Registered: September 2011 |
Junior Member |
|
|
The Equipment and EquipmentHolder is defined as OneToOne relationship. The Equipment entity has a record in table and EquipmentHolder does not have any matching records. The EclipseLink is returning the vector with size 1 and has no elements in it when used the "select o.equipmentHolders from Equipment o where o.entityId = 9000001" JPQL query.
Recently upgraded from Weblogic 11g to 12.1.3. This used to work earlier. This is an regression compared with earlier EclipseLink. Could some tell how to go with this issue.
The details are given below:
Environment:
Weblogic : 12.1.3
EclipseLink : 2.5.2.v20140319-9ad6abd
When using the following JPQL the getResultList on Query is returning the vector with size 1 and has no elements it it.
javax.persistence.EntityManager em = PersistenceHelper.makePersistenceManager().getPersistenceManager();
javax.persistence.Query query = em.createQuery("select o.equipmentHolders from Equipment o where o.entityId = 9000001");
Collection result = query.getResultList();
The following is the logs generated for the above query:
EL Finer: connection: 2014-08-22 10:58:52.227--ServerSession(1803230214)--Thread(Thread[)--client acquired: 999394231
EL Finer: transaction: 2014-08-22 10:58:52.235--ClientSession(999394231)--Thread(Thread[)--acquire unit of work: 1349237230
EL Finest: query: 2014-08-22 10:58:52.236--UnitOfWork(1349237230)--Thread(Thread[)--Execute query ReportQuery(referenceClass=EquipmentDAO sql="SELECT t0.ENTITYID, t0.ENTITYCLASS, t0.ACTIVITY, t0.ADMINSTATE, t0.CREATEDDATE, t0.CREATEDUSER, t0.DESCRIPTION, t0.ENDDATE, t0.ENTITYVERSION, t0.ID, t0.LASTMODIFIEDDATE, t0.LASTMODIFIEDUSER, t0.NAME, t0.NATIVEEMSNAME, t0.NOSPEC, t0.OBJECTSTATE, t0.OWNER, t0.PARTITION, t0.PERMISSIONS, t0.PHYSICALLOCATION, t0.SERIALNUMBER, t0.STARTDATE, t0.EQUIPMENT, t0.CURRENTASSIGNMENT, t0.SPECIFICATION, t0.E_EQUIPMENTHOLDERS_ORDER FROM Equipment t1 LEFT OUTER JOIN EquipmentHolder t0 ON (t0.EQUIPMENT = t1.ENTITYID) WHERE ((t1.ENTITYID = ?) AND (t1.ENTITYCLASS = ?))")
EL Fine: 2014-08-22 10:58:52.237--Thread(Thread[)--JPQL> select o.equipmentHolders from Equipment o where o.entityId = 9000001
EL Finest: connection: 2014-08-22 10:58:52.239--ServerSession(1803230214)--Connection(746850487)--Thread(Thread[)--Connection acquired from connection pool read.
EL Finest: connection: 2014-08-22 10:58:52.24--ServerSession(1803230214)--Thread(Thread[)--reconnecting to external connection pool
EL Fine: sql: 2014-08-22 10:58:52.242--ServerSession(1803230214)--Connection(325057319)--Thread(Thread[)--SELECT t0.ENTITYID, t0.ENTITYCLASS, t0.ACTIVITY, t0.ADMINSTATE, t0.CREATEDDATE, t0.CREATEDUSER, t0.DESCRIPTION, t0.ENDDATE, t0.ENTITYVERSION, t0.ID, t0.LASTMODIFIEDDATE, t0.LASTMODIFIEDUSER, t0.NAME, t0.NATIVEEMSNAME, t0.NOSPEC, t0.OBJECTSTATE, t0.OWNER, t0.PARTITION, t0.PERMISSIONS, t0.PHYSICALLOCATION, t0.SERIALNUMBER, t0.STARTDATE, t0.EQUIPMENT, t0.CURRENTASSIGNMENT, t0.SPECIFICATION, t0.E_EQUIPMENTHOLDERS_ORDER FROM Equipment t1 LEFT OUTER JOIN EquipmentHolder t0 ON (t0.EQUIPMENT = t1.ENTITYID) WHERE ((t1.ENTITYID = ?) AND (t1.ENTITYCLASS = ?))
bind => 9000001, EquipmentDAO
EL Finest: connection: 2014-08-22 10:58:52.247--ServerSession(1803230214)--Connection(746850487)--Thread(Thread[)--Connection released to connection pool read.
EL Finer: transaction: 2014-08-22 10:58:52.248--UnitOfWork(1349237230)--Thread(Thread[)--release unit of work
EL Finer: connection: 2014-08-22 10:58:52.248--ClientSession(999394231)--Thread(Thread[)--client released
|
|
|
Goto Forum:
Current Time: Wed Apr 24 19:25:42 GMT 2024
Powered by FUDForum. Page generated in 0.25248 seconds
|