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

Support query delegates on collection classes #260

Open
edudar opened this issue Jan 21, 2024 · 0 comments
Open

Support query delegates on collection classes #260

edudar opened this issue Jan 21, 2024 · 0 comments

Comments

@edudar
Copy link

edudar commented Jan 21, 2024

Originally filed as querydsl/querydsl#3327

@QueryDelegate is a powerful feature that does not work properly with collections. QueryDSL creates Q-classes, but they extend BeanPath. As a result, one can't use expressions already available in these classes and can't pass appropriately typed Path parameters to custom extensions.

Actual:

public class QSet extends BeanPath<Set<?>> {
  ...
}

Expected:

public class QSet<V, E extends SimpleExpression<V>> extends SetPath<V, E> {
  ...
} 

public class QEntity extends BeanPath<Entity> {
  public final QSet<String, ext.java.lang.QString> s = 
    new QSet<String, ext.java.lang.QString>(forProperty("s"));
}

I tried to tinker around the annotation processor, but it does not look like it generally supports the generation of parameterized classes.

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

No branches or pull requests

1 participant