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

A QString is created by @QueryDelegate(String.class) but not used on generated code using SQL generation #746

Closed
guedes opened this issue May 7, 2014 · 6 comments
Milestone

Comments

@guedes
Copy link

@guedes guedes commented May 7, 2014

I created the following delegated method in the class FooDelegate:

    @QueryDelegate(String.class)
    public static BooleanExpression eqFoo(SimpleExpression<String> expression, String other)
    {
        return expression.ne(other);
    }

I'm using apt-maven-plugin and com.mysema.query.apt.QuerydslAnnotationProcessor and querydsl-maven-plugin + querydsl-sql-codegen to generate the QMyTable from database. I don't have classes annotated as @QueryEntity since I'm generating then from my database.

I run mvn compile and I see a class QString generated as expected and a QMyTable that represent my_table from database.

BTW, I was expecting that in QMyTable the QString was used instead of StringPath. In other projects that uses Hibernate or JPA everything is fine, but in this that I'm generating classes from database I couldn't figure whether @QueryDelegate work or not with generation from database. Despite of that and since all examples in documentation point to use @QueryEntity I think that docs should show an example or have a notice that it not work.

Thanks!

@timowest
Copy link
Member

@timowest timowest commented May 7, 2014

@guedes You are right, QueryDelegate doesn't work for querydsl-sql-codegen code generation. Shall we mention it in the Querydsl SQL docs?

@guedes
Copy link
Author

@guedes guedes commented May 7, 2014

@timowest Thanks for your reply! I think that will be very nice to have a mention, so 👍 .

BTW, there is some way to emulate that?

@timowest
Copy link
Member

@timowest timowest commented May 7, 2014

No, there is currently no way to emulate that.

@guedes
Copy link
Author

@guedes guedes commented May 7, 2014

Ok! :(

BTW, thank you for your nice work on Querydsl!

@timowest
Copy link
Member

@timowest timowest commented May 7, 2014

Thanks! ;)

@timowest timowest added fixed and removed fixed labels May 8, 2014
@timowest timowest modified the milestone: 3.3.4 May 8, 2014
@timowest
Copy link
Member

@timowest timowest commented May 20, 2014

Released in 3.3.4

@timowest timowest closed this May 20, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.