I\'ve got a table containing some duplicates (defined as some specific columns contain the same values). What\'s the best way to get all those rose back? I need all the duplictes, so group by in开发者
I would like to write the following SQL in HQL so it executes as a single statement: 开发者_JAVA百科update child_thingy c
I want to get the count of the results of a dynamically-generated HQL query, without actually getting the list of results. Say that the query I have is something like:
I have a one-to-many mapping between a parent entity and child entities. Now I need to find the number of children associated with each parent for a list of parents. I am trying to do this with HQL bu
I 开发者_运维知识库found this example in jboss\'s documentation. select new Family(mother, mate, offspr)
I have trouble with converting native SQL query to HQL. Query is something like follows: select count(*)
I want to delete certain records from a table. These records have some child-records in other tables.
I would like to perform the following query in HQL: select count(distinct year(foo.date)) from Foo foo
I\'m trying to execute a long \'INSERT ON DUPLICATE KEY UPDATE\' with up to a few thousand rows in a MySQL+JBoss+Hibernate application. It looks something like:
I have two Objects, Entries and Samples.Each entry has an associated set of Samples, and each Sample has a vote associated with it.I need to query the database for all E开发者_开发问答ntries, but for