hql
HQL date query question
if I am expecting a Date object say for 2011-03-05 and I want to use HQL to pull everything in 2011-03, ignoring the day/05开发者_开发问答[详细]
2023-04-04 00:55 分类:问答Order a set of translations, according to a specific language
Assuming two classes Product and ProductTranslation. The product has a property Product.Title, which is a set of ProductTranslation.[详细]
2023-04-03 23:49 分类:问答Converting HQL 'in' restriction to Criteria
I have a query like this: Query query = session.createQuery(\"from table1 c where c.colummewhatever =:value and (select p.colummewhatever fr开发者_如何学编程om table2 p where c.fkidcolumme=p.idcolumm[详细]
2023-04-03 05:50 分类:问答Hibernate entity property defined by a query
I try to implement document modifications tracking system with Java and Hibernate. Every mod to document is saved with autor and timestamp. To get the creator of document I开发者_JAVA技巧 need to get[详细]
2023-04-01 18:34 分类:问答HQL Path expected for join (when joining same table)
I am trying to get pairs of measurement for two different devices, joined on equal Timestamps. In SQL, this works as expected:[详细]
2023-04-01 17:50 分类:问答getSingleResult() alters the count() Query
My application uses Hibernate to connect to SQL Server. I recently changed my DAO function that retrieves the count from one of the tables from \"return query.getResultList().get(0)\" to \"query.getSi[详细]
2023-04-01 11:08 分类:问答HQL: Trouble with trivial select with aggregate function
I have very simple data model 开发者_JAVA技巧like this: create table Company ( id int primary key,[详细]
2023-04-01 10:10 分类:问答Fastest way of checking if one (or more) entries with given id is present in several tables
In my application DB, for a given Foo Object with a String id, there are seven tables, each one contains information about Foo Object, and each of the 7 tables has a field with the String id of the Fo[详细]
2023-04-01 01:59 分类:问答Query M:N relationship with GORM for entity instances _not_ in relation to each other?
I need to track a M:N relationship with attributes, so I\'m using a link table (following the pattern at Many-to-Many Mapping without Hibernate XML) ... but, I can\'t see how to query that Membership[详细]
2023-03-31 23:17 分类:问答Hibernate: How do I rewrite this criteria to HQL?
I want to write HQL, where I find out if Company has Persons(employees) with some of given names. I\'ve managed to do that with criteria:[详细]
2023-03-31 19:31 分类:问答