Skip to main content

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

Hi Tom,

you are right, it is strange to include a unused entity. It should only demonstrate the problem. In my original query I use this "unused" entity in where clause.


I will open a bug.


Regards,

Sandra


eclipselink-users-bounces@xxxxxxxxxxx schrieb am 20.07.2012 17:52:50:

> Von: Tom Ware <tom.ware@xxxxxxxxxx>

> An: eclipselink-users@xxxxxxxxxxx
> Datum: 20.07.2012 17:52
> Betreff: Re: [eclipselink-users] Problem with join quieries after
> update from 2.3.3 to 2.4.0

> Gesendet von: eclipselink-users-bounces@xxxxxxxxxxx
>
> 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 EntityAa, 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
> _______________________________________________
> eclipselink-users mailing list
> eclipselink-users@xxxxxxxxxxx
>
https://dev.eclipse.org/mailman/listinfo/eclipselink-users

Back to the top