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
Comments
See Issue #254 |
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. |
What's the best way to paste code without losing the special symbols? Is there wiki formatting for code, or an attach button somewhere? |
|
Here is a guide for github markdown https://help.github.com/articles/github-flavored-markdown |
@tpischke What's the type of HidaBezGruppe.bez in the sources? And how do you generate the code? |
|
Our generation plugin
|
Thanks, could also provide the execution element for the querydsl-maven-plugin in your project? |
|
I added now a test with Hibernate model based code generation also got What JDK do you use? |
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... |
Which 2.8.2 fix do you refer to? And what is your exact JDK 1.7 version? #254 is a different issue. |
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? |
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 |
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. |
I was now able to reproduce the JDK 1.7 compilation issues. |
Great! |
Ok, got it compiling after removing all the superfluous generics. |
|
Ok, I will still fix this also on the Querydsl side. |
Released in 3.4.2 |
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
In 3.4.1, we only get:
Note replaced greaterthan lessthan with braces, since they don't render properly
Which does not compile with the error mentioned above.
The text was updated successfully, but these errors were encountered: