Generated QClasses do not compile under certain circumstances
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Querydsl |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
After upgrading from 2.2.0.beta5 to 2.2.0 or 2.2.1 we got a compilation error in the generated Query classes, e.g. similar to that one:
[INFO] -------
[ERROR] BUILD FAILURE
[INFO] -------
[INFO] Compilation failure
C:\W\xxx\
symbol : constructor QSomeMappedSupe
location: class base.QSomeMappe
This one was really hard to create a test case for. The most minimal setup I could find to produce this bug involves 3 separate maven projects, an @Embeddable implementing Comparable and having at least one attribute, a @MappedSuperClass referencing the @Embeddable and another reference to the @Embeddable... weird, I know!
The attached example maven multimodule project should fail with a compilation error when you mvn clean install it.
Circumstances under which it compiles:
- remove the foo attribute from MyEmbeddable
- or: do not implement Comparable in MyEmbeddable
- or: make the SomeMappedSuper
- or: remove the reference to MyEmbeddable in A
- or: move either SomeMappedSuper
Unfortunately, none of the above workarounds is a viable fix for us :-(
Changed in querydsl: | |
status: | New → In Progress |
Environment:
C:\W\querydsl- does-not- compile- testcase> mvn -v jdk1.6. 0_24\jre
Apache Maven 2.2.1 (r801777; 2009-08-06 21:16:01+0200)
Java version: 1.6.0_24
Java home: C:\Program Files\Java\
Default locale: de_DE, platform encoding: Cp1252
OS name: "windows 7" version: "6.1" arch: "amd64" Family: "windows"