Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

type argument is not within bounds of type-variable Q #849

Closed
tpischke opened this issue Jul 14, 2014 · 22 comments · Fixed by #851
Closed

type argument is not within bounds of type-variable Q #849

tpischke opened this issue Jul 14, 2014 · 22 comments · Fixed by #851
Labels
Milestone

Comments

@tpischke
Copy link

Regression in 3.4.1. Worked correctly with 2.8.2

[ERROR] generated-sources/model/QHidaBezGruppe_Last.java:[28,35] type argument model.hida.QHidaBez is not within bounds of type-variable Q

In 2.8.2, the following was generated in QHidaBezGruppe_Last

public final SetPath<HidaBez<?, ? extends HidaBezGruppe<?, ? extends HidaBez<?, ? extends HidaBezGruppe<?, ?>>>>, QHidaBez> bez;

In 3.4.1, we only get:

public final SetPath<HidaBez, QHidaBez> bez;

Note replaced greaterthan lessthan with braces, since they don't render properly

Which does not compile with the error mentioned above.

@tpischke
Copy link
Author

See Issue #254

@timowest
Copy link
Member

Could you provide example sources for HidaBez and HidaBezGruppe? There is already a Querydsl test case with a similar domain https://github.com/querydsl/querydsl/blob/28810ccd6d4a9ba519c4b361c232653891dd2d8e/querydsl-apt/src/test/java/com/mysema/query/domain/Generic4Test.java

Feel free to use this as the basis.

#254 is related to Path class usage, but the error message might be the same.

@timowest timowest added the bug label Jul 14, 2014
@tpischke
Copy link
Author

What's the best way to paste code without losing the special symbols? Is there wiki formatting for code, or an attach button somewhere?

@tpischke
Copy link
Author

public abstract class HidaBez<B extends HidaBez<B, G>, G extends HidaBezGruppe<G, B>> extends CapiBCKeyedByGrundstueck {

public abstract class HidaBezGruppe<G extends HidaBezGruppe<G, B>, B extends HidaBez<B, G>> extends
CapiBCKeyedByGrundstueck {

public abstract class CapiBCKeyedByGrundstueck extends CapiBusinessClass {

public abstract class CapiBusinessClass implements ICapiBusinessClass {

public interface ICapiBusinessClass extends Comparable<ICapiBusinessClass>, ResourceToString, PruefungsObject {

<hibernate-mapping package="ch.bedag.gba.capitastra.model.hida" default-access="field">

<class name="HidaBezGruppe">

<set name="bez" inverse="true" cascade="all-delete-orphan" sort="natural" fetch="subselect">
    <key column="gruppe_FK_ID"/>
    <one-to-many class="HidaBez"/>
</set>

@timowest
Copy link
Member

Here is a guide for github markdown https://help.github.com/articles/github-flavored-markdown

@timowest
Copy link
Member

@tpischke What's the type of HidaBezGruppe.bez in the sources?

And how do you generate the code?

@tpischke
Copy link
Author

public abstract class HidaBezGruppe<G extends HidaBezGruppe<G, B>, B extends HidaBez<B, G>> extends
    CapiBCKeyedByGrundstueck {        

SortedSet<B> bez = new TreeSet<B>();

@tpischke
Copy link
Author

Our generation plugin

<?xml version="1.0" encoding="UTF-8"?>


4.0.0

<groupId>ch.bedag.gba.maven</groupId>
<artifactId>querydsl-maven-plugin</artifactId>
<version>1.1-SNAPSHOT</version>
<packaging>maven-plugin</packaging>
<name>GBA QueryDSL Code Generator Plugin</name>

<parent>
    <groupId>ch.bedag.gba</groupId>
    <artifactId>parent</artifactId>
    <version>1.2.2</version>
</parent>

<build>
    <plugins>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <version>3.1</version>
            <configuration>
                <source>1.7</source>
                <target>1.7</target>
                <encoding>UTF-8</encoding>
            </configuration>
        </plugin>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-resources-plugin</artifactId>
            <configuration>
                <encoding>UTF-8</encoding>
            </configuration>
        </plugin>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-source-plugin</artifactId>
            <executions>
                <execution>
                    <id>attach-sources</id>
                    <goals>
                        <goal>jar</goal>
                    </goals>
                </execution>
            </executions>
        </plugin>
        <plugin>
            <groupId>org.codehaus.plexus</groupId>
            <artifactId>plexus-maven-plugin</artifactId>
            <executions>
                <execution>
                    <goals>
                        <goal>descriptor</goal>
                    </goals>
                </execution>
            </executions>
        </plugin>
    </plugins>
</build>

<properties>
    <querydsl.version>3.4.1</querydsl.version>
</properties>

<dependencies>
    <dependency>
        <groupId>org.apache.maven</groupId>
        <artifactId>maven-plugin-api</artifactId>
        <version>2.0</version>
        <scope>provided</scope>
    </dependency>
    <dependency>
        <groupId>org.apache.maven</groupId>
        <artifactId>maven-project</artifactId>
        <version>2.0.9</version>
        <scope>provided</scope>
    </dependency>
    <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-api</artifactId>
        <version>1.5.8</version>
    </dependency>
    <dependency>
        <groupId>com.mysema.querydsl</groupId>
        <artifactId>querydsl-apt</artifactId>
        <version>${querydsl.version}</version>
    </dependency>
    <dependency>
        <groupId>com.mysema.querydsl</groupId>
        <artifactId>querydsl-jpa-codegen</artifactId>
        <version>${querydsl.version}</version>
    </dependency>
    <dependency>
        <groupId>com.mysema.querydsl</groupId>
        <artifactId>querydsl-jpa</artifactId>
        <version>${querydsl.version}</version>
    </dependency>
    <dependency>
        <groupId>org.hibernate</groupId>
        <artifactId>hibernate-core</artifactId>
        <version>4.1.7.Final</version>
    </dependency>
</dependencies>

@timowest
Copy link
Member

Thanks, could also provide the execution element for the querydsl-maven-plugin in your project?

@tpischke
Copy link
Author

<plugin>
                <groupId>ch.bedag.gba.maven</groupId>
                <artifactId>querydsl-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <goals>
                            <goal>generate</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <prefix>Q</prefix>
                    <targetFolder>${basedir}/target/generated-sources</targetFolder>
                    <hibernateMappingFiles>
                        <param>src/main/resources/ch/bedag/gba/capitastra/auftrag/Auftrag.hbm.xml</param>
                        <param>src/main/resources/ch/bedag/gba/capitastra/auftrag/FileStore.hbm.xml</param>
                        <param>src/main/resources/ch/bedag/gba/capitastra/auftrag/EgvtAuftrag.hbm.xml</param>
                        <param>src/main/resources/ch/bedag/gba/capitastra/betrieb/Leistungsmerkmal.hbm.xml</param>
                        <param>src/main/resources/ch/bedag/gba/capitastra/model/AbstractNotiz.hbm.xml</param>
                        <param>src/main/resources/ch/bedag/gba/capitastra/model/AdressOrder.hbm.xml</param>
                        <param>src/main/resources/ch/bedag/gba/capitastra/model/CapiProperty.hbm.xml</param>
                        <param>src/main/resources/ch/bedag/gba/capitastra/model/CapiTimePoint.hbm.xml</param>
                        <param>src/main/resources/ch/bedag/gba/capitastra/model/MaxNummer.hbm.xml</param>
                        <param>src/main/resources/ch/bedag/gba/capitastra/model/Land.hbm.xml</param>
                        <param>src/main/resources/ch/bedag/gba/capitastra/model/DBUpgradeLog.hbm.xml</param>
                        <param>src/main/resources/ch/bedag/gba/capitastra/model/avgbs/AVGBSLieferung.hbm.xml</param>
                        <param>src/main/resources/ch/bedag/gba/capitastra/model/avgbs/AVGBSFehlerliste.hbm.xml</param>
                        <param>src/main/resources/ch/bedag/gba/capitastra/model/avgbs/AVGBSFehlermeldung.hbm.xml</param>
                        <param>src/main/resources/ch/bedag/gba/capitastra/model/benutzer/Benutzer.hbm.xml</param>
                        <param>src/main/resources/ch/bedag/gba/capitastra/model/benutzer/BenutzerRecht.hbm.xml</param>
                        <param>src/main/resources/ch/bedag/gba/capitastra/model/benutzer/ClassPermission.hbm.xml</param>
                        <param>src/main/resources/ch/bedag/gba/capitastra/model/benutzer/PropertyPermission.hbm.xml</param>
                        <param>src/main/resources/ch/bedag/gba/capitastra/model/benutzer/Rolle.hbm.xml</param>
                        <param>src/main/resources/ch/bedag/gba/capitastra/model/benutzer/RolleZuBenutzer.hbm.xml</param>
                        <param>src/main/resources/ch/bedag/gba/capitastra/model/benutzer/Locking.hbm.xml</param>
                        <param>src/main/resources/ch/bedag/gba/capitastra/model/benutzer/DruckEinstellung.hbm.xml</param>
                        <param>src/main/resources/ch/bedag/gba/capitastra/model/benutzer/ICapiRequestLog.hbm.xml</param>
                        <param>src/main/resources/ch/bedag/gba/capitastra/model/beschreibung/AbstractGrundstueckAdresse.hbm.xml</param>
                        <param>src/main/resources/ch/bedag/gba/capitastra/model/beschreibung/AmtlicheBewertung.hbm.xml</param>
                        <param>src/main/resources/ch/bedag/gba/capitastra/model/beschreibung/AmtlicheBewertungGebaeude.hbm.xml</param>
                        <param>src/main/resources/ch/bedag/gba/capitastra/model/beschreibung/AvBemerkung.hbm.xml</param>
                        <param>src/main/resources/ch/bedag/gba/capitastra/model/beschreibung/AvBemerkungMaster.hbm.xml</param>
                        <param>src/main/resources/ch/bedag/gba/capitastra/model/beschreibung/AvBemerkungZuGrundstueck.hbm.xml</param>
                        <param>src/main/resources/ch/bedag/gba/capitastra/model/beschreibung/BodenbedeckungAnteil.hbm.xml</param>
                        <param>src/main/resources/ch/bedag/gba/capitastra/model/beschreibung/BodenbedeckungAnteilMaster.hbm.xml</param>
                        <param>src/main/resources/ch/bedag/gba/capitastra/model/beschreibung/Gebaeude.hbm.xml</param>
                        <param>src/main/resources/ch/bedag/gba/capitastra/model/beschreibung/GebaeudeArt.hbm.xml</param>
                        <param>src/main/resources/ch/bedag/gba/capitastra/model/beschreibung/GebaeudeEingangAdresse.hbm.xml</param>
                        <param>src/main/resources/ch/bedag/gba/capitastra/model/beschreibung/GebaeudeEingangAdresseMaster.hbm.xml</param>
                        <param>src/main/resources/ch/bedag/gba/capitastra/model/beschreibung/GebaeudeAufGrundstueck.hbm.xml</param>
                        <param>src/main/resources/ch/bedag/gba/capitastra/model/beschreibung/GebaeudeMaster.hbm.xml</param>
                        <param>src/main/resources/ch/bedag/gba/capitastra/model/beschreibung/GebaeudeMitAdresseRechtsgueltigSnapshot.hbm.xml</param>
                        <param>src/main/resources/ch/bedag/gba/capitastra/model/beschreibung/GbPlan.hbm.xml</param>
                        <param>src/main/resources/ch/bedag/gba/capitastra/model/beschreibung/GbPlanMaster.hbm.xml</param>
                        <param>src/main/resources/ch/bedag/gba/capitastra/model/beschreibung/HilfsadresseA47.hbm.xml</param>
                        <param>src/main/resources/ch/bedag/gba/capitastra/model/beschreibung/Lokalisation.hbm.xml</param>
                        <param>src/main/resources/ch/bedag/gba/capitastra/model/beschreibung/LokalisationMaster.hbm.xml</param>
                        <param>src/main/resources/ch/bedag/gba/capitastra/model/beschreibung/Nomenklatur.hbm.xml</param>
                        <param>src/main/resources/ch/bedag/gba/capitastra/model/beschreibung/NomenklaturMaster.hbm.xml</param>
                        <param>src/main/resources/ch/bedag/gba/capitastra/model/beschreibung/Ortschaft.hbm.xml</param>
                        <param>src/main/resources/ch/bedag/gba/capitastra/model/beschreibung/OrtschaftMaster.hbm.xml</param>
                        <param>src/main/resources/ch/bedag/gba/capitastra/model/beschreibung/ProjektiertGebaeude.hbm.xml</param>
                        <param>src/main/resources/ch/bedag/gba/capitastra/model/beschreibung/ProjektiertGebaeudeAufGrundstueck.hbm.xml</param>
                        <param>src/main/resources/ch/bedag/gba/capitastra/model/beschreibung/ProjektiertGebaeudeEingangAdresse.hbm.xml</param>
                        <param>src/main/resources/ch/bedag/gba/capitastra/model/beschreibung/Teilgrundstueck.hbm.xml</param>
                        <param>src/main/resources/ch/bedag/gba/capitastra/model/beschreibung/TeilgrundstueckMaster.hbm.xml</param>
                        <param>src/main/resources/ch/bedag/gba/capitastra/model/code/CapiCode.hbm.xml</param>
                        <param>src/main/resources/ch/bedag/gba/capitastra/model/code/FremdCode.hbm.xml</param>
                        <param>src/main/resources/ch/bedag/gba/capitastra/model/code/FremdCodeMapping.hbm.xml</param>
                        <param>src/main/resources/ch/bedag/gba/capitastra/model/code/Fremdsystem.hbm.xml</param>
                        <param>src/main/resources/ch/bedag/gba/capitastra/model/capweb/CapwebTexte.hbm.xml</param>
                        <param>src/main/resources/ch/bedag/gba/capitastra/model/capweb/CapwebGbMeldungenStatus.hbm.xml</param>
                        <param>src/main/resources/ch/bedag/gba/capitastra/model/egbv/Praefix.hbm.xml</param>
                        <param>src/main/resources/ch/bedag/gba/capitastra/model/eigentum/ArchivierteGrundbuchmeldung.hbm.xml</param>
                        <param>src/main/resources/ch/bedag/gba/capitastra/model/eigentum/EigentumAnteil.hbm.xml</param>
                        <param>src/main/resources/ch/bedag/gba/capitastra/model/eigentum/EigentumAnteilMaster.hbm.xml</param>
                        <param>src/main/resources/ch/bedag/gba/capitastra/model/eigentum/EigentumPersonRechtsgueltigSnapshot.hbm.xml</param>
                        <param>src/main/resources/ch/bedag/gba/capitastra/model/eigentum/PersonZuEigentumAnteil.hbm.xml</param>
                        <param>src/main/resources/ch/bedag/gba/capitastra/model/gemeindefusion/GemeindeFusion.hbm.xml</param>
                        <param>src/main/resources/ch/bedag/gba/capitastra/model/geschaeft/AdministrativerPerimeter.hbm.xml</param>
                        <param>src/main/resources/ch/bedag/gba/capitastra/model/geschaeft/Geschaeft.hbm.xml</param>
                        <param>src/main/resources/ch/bedag/gba/capitastra/model/geschaeft/GeschaeftsAktivitaet.hbm.xml</param>
                        <param>src/main/resources/ch/bedag/gba/capitastra/model/geschaeft/grundbuch/Gebuehr.hbm.xml</param>
                        <param>src/main/resources/ch/bedag/gba/capitastra/model/geschaeft/grundbuch/GemeindeBeleg.hbm.xml</param>
                        <param>src/main/resources/ch/bedag/gba/capitastra/model/geschaeft/grundbuch/GrundbuchGeschaeft.hbm.xml</param>
                        <param>src/main/resources/ch/bedag/gba/capitastra/model/geschaeft/grundbuch/GrundstueckInGeschaeft.hbm.xml</param>
                        <param>src/main/resources/ch/bedag/gba/capitastra/model/geschaeft/grundbuch/Meldungstext.hbm.xml</param>
                        <param>src/main/resources/ch/bedag/gba/capitastra/model/geschaeft/grundbuch/ProvisorischerEigentuemer.hbm.xml</param>
                        <param>src/main/resources/ch/bedag/gba/capitastra/model/geschaeft/grundbuch/Publikation.hbm.xml</param>
                        <param>src/main/resources/ch/bedag/gba/capitastra/model/geschaeft/grundbuch/Rechnung.hbm.xml</param>
                        <param>src/main/resources/ch/bedag/gba/capitastra/model/geschaeft/grundbuch/Vertragsdaten.hbm.xml</param>
                        <param>src/main/resources/ch/bedag/gba/capitastra/model/geschaeft/grundbuch/Vertrag.hbm.xml</param>
                        <param>src/main/resources/ch/bedag/gba/capitastra/model/geschaeft/geometer/Flaechenmutation.hbm.xml</param>
                        <param>src/main/resources/ch/bedag/gba/capitastra/model/geschaeft/geometer/GeschaeftFolgemutation.hbm.xml</param>
                        <param>src/main/resources/ch/bedag/gba/capitastra/model/geschaeft/geometer/GeometerGeschaeft.hbm.xml</param>
                        <param>src/main/resources/ch/bedag/gba/capitastra/model/geschaeft/geometer/GeometerGeschaeftKopfdaten.hbm.xml</param>
                        <param>src/main/resources/ch/bedag/gba/capitastra/model/geschaeft/geometer/GrundstueckInGeoGeschaeft.hbm.xml</param>
                        <param>src/main/resources/ch/bedag/gba/capitastra/model/geschaeft/geometer/GeometerGeschaeftGenf.hbm.xml</param>
                        <param>src/main/resources/ch/bedag/gba/capitastra/model/grundstueck/Flaechenanteil.hbm.xml</param>
                        <param>src/main/resources/ch/bedag/gba/capitastra/model/grundstueck/FlaechenanteilMaster.hbm.xml</param>
                        <param>src/main/resources/ch/bedag/gba/capitastra/model/grundstueck/GrundstueckImpl.hbm.xml</param>
                        <param>src/main/resources/ch/bedag/gba/capitastra/model/grundstueck/GrundstueckBemerkung.hbm.xml</param>
                        <param>src/main/resources/ch/bedag/gba/capitastra/model/grundstueck/GrundstueckFlaeche.hbm.xml</param>
                        <param>src/main/resources/ch/bedag/gba/capitastra/model/grundstueck/GrundstueckFlaecheMaster.hbm.xml</param>
                        <param>src/main/resources/ch/bedag/gba/capitastra/model/grundstueck/GrundstueckNummer.hbm.xml</param>
                        <param>src/main/resources/ch/bedag/gba/capitastra/model/grundstueck/NummerZuGrundstueck.hbm.xml</param>
                        <param>src/main/resources/ch/bedag/gba/capitastra/model/grundstueck/QualitaetBodenbedeckung.hbm.xml</param>
                        <param>src/main/resources/ch/bedag/gba/capitastra/model/grundstueck/QuoteKuhrecht.hbm.xml</param>
                        <param>src/main/resources/ch/bedag/gba/capitastra/model/grundstueck/QuoteKuhrechtMaster.hbm.xml</param>
                        <param>src/main/resources/ch/bedag/gba/capitastra/model/grundstueck/Sonderrecht.hbm.xml</param>
                        <param>src/main/resources/ch/bedag/gba/capitastra/model/grundstueck/SonderrechtMaster.hbm.xml</param>
                        <param>src/main/resources/ch/bedag/gba/capitastra/model/ham/ErwerberVeraeusserer.hbm.xml</param>
                        <param>src/main/resources/ch/bedag/gba/capitastra/model/ham/Handelsangaben.hbm.xml</param>
                        <param>src/main/resources/ch/bedag/gba/capitastra/model/ham/Zusatzangaben.hbm.xml</param>
                        <param>src/main/resources/ch/bedag/gba/capitastra/model/hida/HidaBez.hbm.xml</param>
                        <param>src/main/resources/ch/bedag/gba/capitastra/model/hida/HidaBezGruppe.hbm.xml</param>
                        <param>src/main/resources/ch/bedag/gba/capitastra/model/hida/HidaRechtsgrund.hbm.xml</param>
                        <param>src/main/resources/ch/bedag/gba/capitastra/model/hida/HidaServitut.hbm.xml</param>
                        <param>src/main/resources/ch/bedag/gba/capitastra/model/hida/HidaVertragstext.hbm.xml</param>
                        <param>src/main/resources/ch/bedag/gba/capitastra/model/organisation/Gemeinde.hbm.xml</param>
                        <param>src/main/resources/ch/bedag/gba/capitastra/model/organisation/GemeindeZuOrtschaft.hbm.xml</param>
                        <param>src/main/resources/ch/bedag/gba/capitastra/model/organisation/GrundbuchGemeinde.hbm.xml</param>
                        <param>src/main/resources/ch/bedag/gba/capitastra/model/organisation/OrganisatorischeEinheit.hbm.xml</param>
                        <param>src/main/resources/ch/bedag/gba/capitastra/model/organisation/OrgEinheitZuGemeinde.hbm.xml</param>
                        <param>src/main/resources/ch/bedag/gba/capitastra/model/param/ParameterValue.hbm.xml</param>
                        <param>src/main/resources/ch/bedag/gba/capitastra/model/personGb/PersonGb.hbm.xml</param>
                        <param>src/main/resources/ch/bedag/gba/capitastra/model/personGb/PersonGbMaster.hbm.xml</param>
                        <param>src/main/resources/ch/bedag/gba/capitastra/model/personGb/PersonGbInGemeinschaftGb.hbm.xml</param>
                        <param>src/main/resources/ch/bedag/gba/capitastra/model/personStamm/PersonAdresse.hbm.xml</param>
                        <param>src/main/resources/ch/bedag/gba/capitastra/model/personStamm/PersonFremdsystem.hbm.xml</param>
                        <param>src/main/resources/ch/bedag/gba/capitastra/model/personStamm/PersonStamm.hbm.xml</param>
                        <param>src/main/resources/ch/bedag/gba/capitastra/model/personStamm/PersonStammMaster.hbm.xml</param>
                        <param>src/main/resources/ch/bedag/gba/capitastra/model/pfandrecht/CapiTitel.hbm.xml</param>
                        <param>src/main/resources/ch/bedag/gba/capitastra/model/pfandrecht/Glaeubiger.hbm.xml</param>
                        <param>src/main/resources/ch/bedag/gba/capitastra/model/pfandrecht/GlaeubigerMaster.hbm.xml</param>
                        <param>src/main/resources/ch/bedag/gba/capitastra/model/pfandrecht/GlaeubigerAvis.hbm.xml</param>
                        <param>src/main/resources/ch/bedag/gba/capitastra/model/pfandrecht/Grundpfandrecht.hbm.xml</param>
                        <param>src/main/resources/ch/bedag/gba/capitastra/model/pfandrecht/GrundpfandrechtMaster.hbm.xml</param>
                        <param>src/main/resources/ch/bedag/gba/capitastra/model/pfandrecht/PfandrechtBelastung.hbm.xml</param>
                        <param>src/main/resources/ch/bedag/gba/capitastra/model/pfandrecht/PfandrechtBelastungMaster.hbm.xml</param>
                        <param>src/main/resources/ch/bedag/gba/capitastra/model/pfandrecht/PfandTitel.hbm.xml</param>
                        <param>src/main/resources/ch/bedag/gba/capitastra/model/pfandrecht/Rangregelung.hbm.xml</param>
                        <param>src/main/resources/ch/bedag/gba/capitastra/model/pfandrecht/RechtAufGrundstueckMaster.hbm.xml</param>
                        <param>src/main/resources/ch/bedag/gba/capitastra/model/pfandrecht/Schuldner.hbm.xml</param>
                        <param>src/main/resources/ch/bedag/gba/capitastra/model/pfandrecht/SchuldnerMaster.hbm.xml</param>
                        <param>src/main/resources/ch/bedag/gba/capitastra/model/pfandrecht/TeilpfandGruppe.hbm.xml</param>
                        <param>src/main/resources/ch/bedag/gba/capitastra/model/recht/GrundstueckZuStandardRecht.hbm.xml</param>
                        <param>src/main/resources/ch/bedag/gba/capitastra/model/recht/LastRechtGruppe.hbm.xml</param>
                        <param>src/main/resources/ch/bedag/gba/capitastra/model/recht/PersonZuLastRechtGruppe.hbm.xml</param>
                        <param>src/main/resources/ch/bedag/gba/capitastra/model/recht/Rechtsgrund.hbm.xml</param>
                        <param>src/main/resources/ch/bedag/gba/capitastra/model/recht/StandardRecht.hbm.xml</param>
                        <param>src/main/resources/ch/bedag/gba/capitastra/model/recht/StandardRechtBeteiligung.hbm.xml</param>
                        <param>src/main/resources/ch/bedag/gba/capitastra/model/recht/StandardRechtBeteiligungMaster.hbm.xml</param>
                        <param>src/main/resources/ch/bedag/gba/capitastra/model/recht/StandardRechtMaster.hbm.xml</param>
                        <param>src/main/resources/ch/bedag/gba/capitastra/model/recht/ursprung/UrsprungRecht.hbm.xml</param>
                        <param>src/main/resources/ch/bedag/gba/capitastra/model/recht/rbez/RechteBeziehung.hbm.xml</param>
                        <param>src/main/resources/ch/bedag/gba/capitastra/views/master/AbstractEffectivityWithBelastungView.hbm.xml</param>
                        <param>src/main/resources/ch/bedag/gba/capitastra/views/master/AbstractGeschaeftView.hbm.xml</param>
                        <param>src/main/resources/ch/bedag/gba/capitastra/views/master/EigentumPersonRechtsgueltigView.hbm.xml</param>
                        <param>src/main/resources/ch/bedag/gba/capitastra/views/master/GeometerGeschaeftView.hbm.xml</param>
                        <param>src/main/resources/ch/bedag/gba/capitastra/views/master/GebaeudeView.hbm.xml</param>
                        <param>src/main/resources/ch/bedag/gba/capitastra/views/master/GrundbuchGeschaeftView.hbm.xml</param>
                        <param>src/main/resources/ch/bedag/gba/capitastra/views/master/GrundstueckView.hbm.xml</param>
                        <param>src/main/resources/ch/bedag/gba/capitastra/views/master/PfandRechtView.hbm.xml</param>
                        <param>src/main/resources/ch/bedag/gba/capitastra/views/master/PfandtitelView.hbm.xml</param>
                        <param>src/main/resources/ch/bedag/gba/capitastra/views/master/RechnungView.hbm.xml</param>
                        <param>src/main/resources/ch/bedag/gba/capitastra/views/master/StandardRechtView.hbm.xml</param>
                        <param>src/main/resources/ch/bedag/gba/capitastra/views/master/RelevantStandardRechtMasterView.hbm.xml</param>
                        <param>src/main/resources/ch/bedag/gba/capitastra/views/perimeter/GrundstInGeoGeschaeftView.hbm.xml</param>
                        <param>src/main/resources/ch/bedag/gba/capitastra/views/perimeter/GrundstueckEigentuemerBelastetView.hbm.xml</param>
                        <param>src/main/resources/ch/bedag/gba/capitastra/views/perimeter/GrundstueckInGeschaeftView.hbm.xml</param>
                        <param>src/main/resources/ch/bedag/gba/capitastra/views/perimeter/GrundstueckPfandBelastetView.hbm.xml</param>
                        <param>src/main/resources/ch/bedag/gba/capitastra/views/perimeter/GrundstueckRechtBelastetView.hbm.xml</param>
                        <param>src/main/resources/ch/bedag/gba/capitastra/views/perimeter/GrundstueckUebrigeBelastetView.hbm.xml</param>
                        <param>src/main/resources/ch/bedag/gba/capitastra/views/third/AngemerkteGrundstueckeEigentuemerView.hbm.xml</param>
                        <param>src/main/resources/ch/bedag/gba/capitastra/views/third/GlaeubigerZuPfandrechtView.hbm.xml</param>
                        <param>src/main/resources/ch/bedag/gba/capitastra/views/third/GrundstueckAdresseView.hbm.xml</param>
                        <param>src/main/resources/ch/bedag/gba/capitastra/views/third/PersonAdresseView.hbm.xml</param>
                        <param>src/main/resources/ch/bedag/gba/capitastra/views/third/SchuldnerZuPfandrechtView.hbm.xml</param>
                        <param>src/main/resources/ch/bedag/gba/capitastra/domainfacade/views/AbstractPersonView.hbm.xml</param>
                        <param>src/main/resources/ch/bedag/gba/capitastra/domainfacade/views/EigentuemerView.hbm.xml</param>
                        <param>src/main/resources/ch/bedag/gba/capitastra/domainfacade/views/GlaeubigerSchuldnerView.hbm.xml</param>
                        <param>src/main/resources/ch/bedag/gba/capitastra/domainfacade/views/UebrigePersonenView.hbm.xml</param>
                        <param>src/main/resources/ch/bedag/gba/capitastra/datatransfer/bridge/mapping/D_BeteiligungRechtMapping.hbm.xml</param>
                        <param>src/main/resources/ch/bedag/gba/capitastra/datatransfer/bridge/mapping/D_PersonGbMapping.hbm.xml</param>
                        <param>src/main/resources/ch/bedag/gba/capitastra/datatransfer/bridge/mapping/D_PersonStammMapping.hbm.xml</param>
                        <param>src/main/resources/ch/bedag/gba/capitastra/datatransfer/bridge/mapping/D_PfandrechtBelastungMapping.hbm.xml</param>
                        <param>src/main/resources/ch/bedag/gba/capitastra/datatransfer/bridge/mapping/D_PfandrechtMasterMapping.hbm.xml</param>
                        <param>src/main/resources/ch/bedag/gba/capitastra/datatransfer/bridge/mapping/D_SiCZuCapiBenutzerMapping.hbm.xml</param>
                        <param>src/main/resources/ch/bedag/gba/capitastra/datatransfer/bridge/mapping/D_SiCZuCapiGeschaeftMapping.hbm.xml</param>
                        <param>src/main/resources/ch/bedag/gba/capitastra/datatransfer/bridge/mapping/D_SiCZuCapiGrundstueckMapping.hbm.xml</param>
                        <param>src/main/resources/ch/bedag/gba/capitastra/datatransfer/bridge/mapping/D_SiCZuCapiRechtMapping.hbm.xml</param>
                        <param>src/main/resources/ch/bedag/gba/capitastra/datatransfer/bridge/mapping/D_SiCZuCapiRechtsgrundMapping.hbm.xml</param>
                        <param>src/main/resources/ch/bedag/gba/capitastra/datatransfer/bridge/mapping/DatatransferState.hbm.xml</param>
                        <param>src/main/resources/ch/bedag/gba/capitastra/datatransfer/bridge/mapping/D_UnmappedCodes.hbm.xml</param>
                    </hibernateMappingFiles>
                </configuration>
                <dependencies>
                    <dependency>
                        <groupId>org.slf4j</groupId>
                        <artifactId>slf4j-api</artifactId>
                        <version>${slf4j.version}</version>
                    </dependency>
                    <dependency>
                        <groupId>org.slf4j</groupId>
                        <artifactId>slf4j-log4j12</artifactId>
                        <version>${slf4j.version}</version>
                    </dependency>
                    <dependency>
                        <groupId>ch.bedag.gba.capitastra</groupId>
                        <artifactId>capcore-model</artifactId>
                        <version>${project.version}</version>
                    </dependency>
                    <dependency>
                        <groupId>org.hibernate</groupId>
                        <artifactId>hibernate-core</artifactId>
                        <version>${hibernate.version}</version>
                    </dependency>
                </dependencies>
            </plugin>

@timowest
Copy link
Member

I added now a test with Hibernate model based code generation also got public final SetPath<HidaBez, QHidaBez> bez;, but without any compilation error.

What JDK do you use?

@tpischke
Copy link
Author

Standard JDK 1.7. Why is the generated code different than 2.8.2? 2.8.2 was patched to fix exactly this problem, but now the old pre-2.8.2 behavior is back...

@timowest
Copy link
Member

Which 2.8.2 fix do you refer to? And what is your exact JDK 1.7 version?

#254 is a different issue.

@timowest
Copy link
Member

For reference the generated class

package com.mysema.query.jpa.domain17;

import static com.mysema.query.types.PathMetadataFactory.*;

import com.mysema.query.types.path.*;

import com.mysema.query.types.PathMetadata;
import javax.annotation.Generated;
import com.mysema.query.types.Path;
import com.mysema.query.types.path.PathInits;


/**
 * QHidaBezGruppe is a Querydsl query type for HidaBezGruppe
 */
@Generated("com.mysema.query.codegen.EntitySerializer")
public class QHidaBezGruppe extends EntityPathBase<HidaBezGruppe<?, ? extends HidaBez<?, ? extends HidaBezGruppe<?, ?>>>> {

    private static final long serialVersionUID = -444539848L;

    public static final QHidaBezGruppe hidaBezGruppe = new QHidaBezGruppe("hidaBezGruppe");

    public final QCapiBCKeyedByGrundstueck _super = new QCapiBCKeyedByGrundstueck(this);

    public final SetPath<HidaBez, QHidaBez> bez = this.<HidaBez, QHidaBez>createSet("bez", HidaBez.class, QHidaBez.class, PathInits.DIRECT2);

    public final NumberPath<Long> id = createNumber("id", Long.class);

    @SuppressWarnings("all")
    public QHidaBezGruppe(String variable) {
        super((Class)HidaBezGruppe.class, forVariable(variable));
    }

    @SuppressWarnings("all")
    public QHidaBezGruppe(Path<? extends HidaBezGruppe> path) {
        super((Class)path.getType(), path.getMetadata());
    }

    @SuppressWarnings("all")
    public QHidaBezGruppe(PathMetadata<?> metadata) {
        super((Class)HidaBezGruppe.class, metadata);
    }

}

How does your version look like?

@tpischke
Copy link
Author

Aha! Forgot to mention that we use the aspectj 1.7.4 compiler with source level set to 1.7. That is probably the issue. I refer to patch in Issue #254

@tpischke
Copy link
Author

I'm working on simplifying the generic usage in our domain model. It is horrible, so I'm not surprised that it is too much for QueryDSL + AspectJ compiler to handle.

Will post again with simplified model.

@timowest
Copy link
Member

I was now able to reproduce the JDK 1.7 compilation issues.

@tpischke
Copy link
Author

Great!

@tpischke
Copy link
Author

Ok, got it compiling after removing all the superfluous generics.

@tpischke
Copy link
Author

 public abstract class HidaBezGruppe<B extends HidaBez> extends CapiBCKeyedByGrundstueck {

@timowest
Copy link
Member

Ok, I will still fix this also on the Querydsl side.

@timowest timowest added this to the 3.4.2 milestone Jul 20, 2014
@timowest
Copy link
Member

Released in 3.4.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants