Prevent using non-root alias paths in joins

Bug #614374 reported by Marko Lavikainen
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Querydsl
Fix Released
Undecided
Unassigned

Bug Description

It is possible to instantiate QTypes from path i.e.

QCat cat = QCat.cat;
QRace race1 = QRace.race;
QRace race2 = cat.race;

This means that also joins are possible in two ways:

  HibernateQuery qry = createQuery(cat);
  qry.leftJoin(cat.race, race1)

or

  HibernateQuery qry = createQuery(cat);
  qry.leftJoin(cat.race, race2)

Both options can be used to construct a query, but the latter option yields a QuerySyntaxException in Hibernate, because the HQL-query will look something like: "from Cat tag left join cat.race as cat.race ..."

The latter construction should probably be prevented.

Revision history for this message
FilipVercauteren (filip-vercauteren-agfa) wrote : Filip Vercauteren is out of the office.

I will be out of the office starting 21/07/2010 and will not return until
09/08/2010.

summary: - Prevent using QType from path in joins
+ Prevent using non-root alias paths in joins
Changed in querydsl:
status: New → Fix Committed
Revision history for this message
Timo Westkämper (timo-westkamper) wrote :

Released in 1.8.5

Changed in querydsl:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.