Skip to main content

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

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 information ReadAllQuery(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 ParseTreeContext builds 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

Back to the top