Prevent using non-root alias paths in joins

Bug #614374 reported by Marko Lavikainen on 2010-08-06
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fix Released

Bug Description

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

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)


  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.

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

summary: - Prevent using QType from path in joins
+ Prevent using non-root alias paths in joins
Changed in querydsl:
status: New → Fix Committed

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  Edit
Everyone can see this information.

Other bug subscribers