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

Comments

Projects
None yet
2 participants
@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

This comment has been minimized.

Show comment
Hide comment
@timowest

timowest May 7, 2014

Member

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

Member

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

This comment has been minimized.

Show comment
Hide comment
@guedes

guedes 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?

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

This comment has been minimized.

Show comment
Hide comment
@timowest

timowest May 7, 2014

Member

No, there is currently no way to emulate that.

Member

timowest commented May 7, 2014

No, there is currently no way to emulate that.

@guedes

This comment has been minimized.

Show comment
Hide comment
@guedes

guedes May 7, 2014

Ok! :(

BTW, thank you for your nice work on Querydsl!

guedes commented May 7, 2014

Ok! :(

BTW, thank you for your nice work on Querydsl!

@timowest

This comment has been minimized.

Show comment
Hide comment
@timowest

timowest May 7, 2014

Member

Thanks! ;)

Member

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

This comment has been minimized.

Show comment
Hide comment
@timowest

timowest May 20, 2014

Member

Released in 3.3.4

Member

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