Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-users] Problem with join quieries after update from 2.3.3 to 2.4.0

I agree this is a bug.

Your example query is, however, a bit strange. I cannot think of a good reason to write a query that includes an entity you are not using.

-Tom

On 20/07/2012 11:41 AM, Sandra.Kosmalla@xxxxxxxxxxxxx wrote:
Hello all,

I try a update from 2.3.3 to 2.4.0 and all my JPQL Queries with a join does not
work anymore. I write a test for demonstration:



@Test
@Transactional
*public**void*testParseFromClause() {
EntityA a = buildEntityA();
save(a);
EntityB b = buildEntityB();
save(b);

Object object = _entityManager_.createQuery("Select b From EntityA a, EntityB
b").getSingleResult();
/assertTrue/("Object class is "+ object.getClass().toString() + " but should be
"+ EntityB.*class*,
object *instanceof*EntityB);

}


With Eclipse Link 2.3.3 this test works.

I debug into Eclipse Link 2.4.0 and I see that a HermesParser builds a
DatabaseQuery with following informationReadAllQuery(referenceClass=EntityA
sql="SELECT t1.ID, t1.NAME, t1.VALUE FROM ENTITYB t0, ENTITYA t1"). In Eclipse
Link 2.3.3 I see that a ParseTreeContextbuilds a DatabaseQuery with following
information: ReportQuery(referenceClass=EntityA sql="SELECT t0.ID, t0.NAME,
t0.VALUE FROM ENTITYB t0, ENTITYA t1").

Maybe this information help.

I think it is a bug. What do you think?

Regards,

Sandra Kosmalla


_______________________________________________
eclipselink-users mailing list
eclipselink-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/eclipselink-users


Back to the top