Omgili - forum search, search forums  
  

Discussions about hql

Displaying 1 - 10 out of 938 discussions.  
Time Frame: (Any time)   Minimum number of replies: (2)   Minimum number of discussing users: (0)
  |  

Page: 1   2   3   4   5   6   7   8   9   10  
Keep this page open to be updated with the newest discussions automatically.
Hello Hibernate Experts, i would very much appreciate your help in transforming the following SQL statement to a valid HQL Statement. I tried for hours but was not successfull: SELECT * FROM master as m left outer join (select * from child as c where ...
Started by on , 3 posts by 3 people.  
Insert the SQL that correspond to your subrequest..
That formulas take SQL, not HQL.
Is there a way to create a Distinct query in HQL. Either by using the "distinct" keyword or some other method. I am not sure if distinct is a valid keywork for HQL, but I am looking for the HQL equivalent of the SQL keyword "distinct".
Started by on , 4 posts by 4 people.  
If you....
(Names have been changed to protect identities) String[] {startDate, endDate, bar}); It's worth noting that the "distinct" keyword in HQL does not map directly to the "distinct" keyword in SQL.
Here's a snippet of hql that we use.
If I write in HQL A between 5 and 10 is that equivalent to A >= 5 and A <= 10 or A > 5 and A < 10 or some other of the 4 combinations?
Started by on , 3 posts by 3 people.  
So between in HQL is also.
In HQL is translated to the between operator in SQL, which is inclusive.
Ask your Facebook Friends
Where can I find a list of all HQL keywords?
Started by on , 4 posts by 4 people.  
Try this ...not sure if it's complete or exact, but it may be, as it's a list of HQL tokens.
What is the recommended way to truncate a table using hibernate/hql? I've tried this: Query query = session.createQuery("truncate table MyTable"); query.executeUpdate(); But it didn't work (truncate doesn't seem do be documented anywhere in hql...)
Started by on , 4 posts by 4 people.  
Works great: public abstract class(); int rowsAffected = 0; try {... .
I used the delete syntax in an HQL to maintain portability.
String hql = String.format("delete from %s",myTable); Query query = session.createQuery(hql) return.
What are the pros and cons of using Criteria or HQL? The Criteria API is a nice object-oriented way to express queries in Hibernate, but sometimes Criteria Queries are more difficult to understand/build than HQL. When do you use Criteria and when HQL?...
Started by on , 10 posts by 10 people.  
Criteria is an object-oriented API, while....
For different join types.
Also, HQL is a bit more powerful, I think, e.g.
On the other hand I'm using HQL for static and complex queries, because it's much easier to understand/read HQL.
Hello there. Does hibernate HQL queries support using select min, max, count and other sql functions? like select min(p.age) from person p Thanks
Started by on , 3 posts by 3 people.  
Are supported in HQL.
I'd like to "dry-run" Hibernate HQL queries. That is I'd like to know what actual SQL queries Hibernate will execute from given HQL query without actually executing the HQL query against real database. I have access to hibernate mapping for tables, the...
Started by on , 3 posts by 3 people.  
For HQL, it's the same concept - you have to cast to Hibernate with a the 3.2-3.3 versions of Hibernate....
Update: for an offline, dry-run of some HQL, using HQLQueryPlan at this answer for Criteria Queries.
There has to be a better approach.
Is there any way to do the following in HQL: SELECT case when flag = true then SUM(col1) else SUM(col2) FROM myTable
Started by on , 6 posts by 6 people.  
End Apparently the ability to do this was added in 3.0.4 , with the limitation that you ... .
Else ...
Then ...
End , and "searched" case, case when ...
Else ...
Then ...
When ...
I guess you can [inline edit] ...for where-clauses: "Simple" case, case .. .
In HQL, how can I use bitwise operators? I want the resulting SQL query to look something like SELECT RoleId, RoleName, RolePerms WHERE (RolePerms & @Parameter) = @Parameter However, writing this HQL select from Role where (RolePerms & :param) = :param...
Started by on , 4 posts by 4 people.  
Writing the HQL this way works: select r from Role r where (r.Permissions & :param) > 0.
From section 13.8 of the NHibernate documentation , HQL does not support these bitwise operators to this.
Page: 1   2   3   4   5   6   7   8   9   10  
Related Searches
join hql    hql fetch    between hql date    Hql select from view    join fetch HQL    hql left out    left join in hql    hql left join    hql date between    hql fetch collections   
More Information


Forum Search About Omgili Help Plugins Forum/Board Owners Privacy

i
In Title
In Topic
In Reply
Exclude
Boost