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

How about add setComment(String) to JPAQuery? #28

Closed
keesun opened this Issue Oct 13, 2011 · 5 comments

Comments

Projects
None yet
2 participants
@keesun

keesun commented Oct 13, 2011

Now, we can set a query comment with JPAQuery.setHint("org.hibernate.comment", "hint"). I think, It would be nice to also be able to do something like this:

JPAQuery.setComment("hint');

What do you think about this?

@timowest

This comment has been minimized.

Show comment
Hide comment
@timowest

timowest Oct 13, 2011

Member

No, that's problematic, since org.hibernate.comment is a Hibernate specific key. How would you implement JPAQuery.setComment(String) ?

You can put comment key into a static final constant :

private static final String COMMENT_KEY = "org.hibernate.comment";

and use it like this

query.setHint(COMMENT_KEY, "hint");
Member

timowest commented Oct 13, 2011

No, that's problematic, since org.hibernate.comment is a Hibernate specific key. How would you implement JPAQuery.setComment(String) ?

You can put comment key into a static final constant :

private static final String COMMENT_KEY = "org.hibernate.comment";

and use it like this

query.setHint(COMMENT_KEY, "hint");
@keesun

This comment has been minimized.

Show comment
Hide comment
@keesun

keesun Oct 13, 2011

That's right. I agree with you. Then, How about add that method to HibernateQuery?

keesun commented Oct 13, 2011

That's right. I agree with you. Then, How about add that method to HibernateQuery?

@timowest

This comment has been minimized.

Show comment
Hide comment
@timowest

timowest Oct 14, 2011

Member

Ok. I will do so.

Member

timowest commented Oct 14, 2011

Ok. I will do so.

@keesun

This comment has been minimized.

Show comment
Hide comment
@keesun

keesun Oct 14, 2011

Thank you, Timo.

keesun commented Oct 14, 2011

Thank you, Timo.

timowest added a commit that referenced this issue Oct 14, 2011

@timowest

This comment has been minimized.

Show comment
Hide comment
@timowest

timowest Oct 23, 2011

Member

Released in 2.2.4

Member

timowest commented Oct 23, 2011

Released in 2.2.4

@timowest timowest closed this Oct 23, 2011

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment