HI,
I think I'll have to make it a little bit more clear in the docs as well. I
Knew about Hibernate comments and assumed they could be used as hints.
Now, that I look back on the Query API I see they were added in 4.3:
http://docs.jboss.org/hibernate/orm/4.3/javadocs/org/hibernate/Query.html#ad
See inline..
On Tue, Aug 1, 2017 at 9:05 AM Vlad Mihalcea
wrote:
> I created a new Pull Request so that comments can be handled for named
> queries (even for UPDATE/DELETE queries):
>
> https://github.com/hibernate/hibernate-orm/pull/1970
>
Not really following this. See
`org.hibernate.annotat
I created a new Pull Request so that comments can be handled for named
queries (even for UPDATE/DELETE queries):
https://github.com/hibernate/hibernate-orm/pull/1970
I think we should add two new issues;
1. So that we could pass Query Hints for Named (Native) Queries as well.
Right now we can on
They have different intentions and are potentially applied in different
ways for different databases - hence separate.
E.g. DB2 supports a query comment, but does not support optimizer hints...
so these need to be handled differently
On Tue, Aug 1, 2017, 8:19 AM Vlad Mihalcea wrote:
> I'm askin
I'm asking because the
org.hibernate.annotations.NamedNativeQuery or
org.hibernate.annotations.NamedQuery
define the comment attribute with the following Javadoc:
/**
* A comment added to the generated SQL query. Useful when engaging with DBA.
*/
String comment() default "";
So, Hibernate cl
Query hints are hints for the database' s query parser/optimizer.
A comment is a... well a comment :)
On Tue, Aug 1, 2017, 6:37 AM Vlad Mihalcea wrote:
> Hi,
>
> While working on integrating a Pull Request, I realized that the
> org.hibernate.engine.spi.QueryParameters provides these two attrib
Hi,
While working on integrating a Pull Request, I realized that the
org.hibernate.engine.spi.QueryParameters provides these two attributes:
private String comment;
private List queryHints;
Both these two are to be sent to the database, so why do we have both?
I also noticed that only for Query