Comparable<...> interface on class causing Alias.$(..) to return null

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

Bug Description

With a plain ValueObject class, everything works fine, but when trying to use a ValueObject class that implements Comparable<...>, I get the following Exception:

Exception in thread "main" java.lang.IllegalArgumentException: target should not be null
 at com.mysema.commons.lang.Assert.assertThat(Assert.java:149)
 at com.mysema.commons.lang.Assert.notNull(Assert.java:60)
 at com.mysema.query.JoinExpression.<init>(JoinExpression.java:37)
 at com.mysema.query.DefaultQueryMetadata.addJoin(DefaultQueryMetadata.java:81)
 at com.mysema.query.collections.AbstractColQuery.from(AbstractColQuery.java:88)
 at com.mysema.query.collections.ColQueryImpl.from(ColQueryImpl.java:17)
 at test.TestCase.testComparable(TestCase.java:54)
 at test.TestCase.main(TestCase.java:17)

This is caused by Alias.$(...) returning null, which is then fed into from(...).
I've tested this with 2.1.2, 2.1.1 and 2.2.0-beta4.

See attached testcase which is itself a minimal eclipse project, thanks for your help.

Revision history for this message
gsubes (gsubes) wrote :
Revision history for this message
Timo Westkämper (timo-westkamper) wrote :

Fixed in SVN trunk

Changed in querydsl:
status: New → Fix Committed
Revision history for this message
gsubes (gsubes) wrote :

I would like to benefit from this right now. Is there an estimate when 2.2.0-beta5 will be released?

Revision history for this message
Timo Westkämper (timo-westkamper) wrote :

Released in 2.2.0.beta5

Changed in querydsl:
status: Fix Committed → Fix Released
Revision history for this message
gsubes (gsubes) wrote :

thanx its worx

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.