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

Bug #785935 reported by gsubes on 2011-05-20
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.

gsubes (gsubes) wrote :

Fixed in SVN trunk

Changed in querydsl:
status: New → Fix Committed
gsubes (gsubes) wrote :

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

Released in 2.2.0.beta5

Changed in querydsl:
status: Fix Committed → Fix Released
gsubes (gsubes) wrote :

thanx its worx

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers