1. Hibernate DetachedCriteria in FROM clause stackoverflow.comI have 2 tables:
I would like to make following query using Hibernate Criteria (DetachedCriteria):
|
2. How do i create a Hibernate Criteria to order by some properties of collection stackoverflow.comSay, i have an entity that has a history of operations as a collection. I want to sort entities by the date of the latest operation (it's the first element of ... |
3. Hibernate Criteria: Perform JOIN in Subquery/DetachedCriteria stackoverflow.comI'm running into an issue with adding JOIN's to a subquery using DetachedCriteria. The code looks roughly like this:
|
4. Hibernate Subquery and DetachedCriteria stackoverflow.comI have created a DetachedCriteria that is retrieving estates that have the isApproved and isPublished set to true. It is defined in this way:
|
5. Criteria query whith FROM clause which contains only one query and does not contain any tables stackoverflow.comI have the following query and I don't know how can I write it using criteria.
|
6. Hibernate Query DetachedCriteria VS bulkUpdate SQL using Collection with "in" Calause Problem stackoverflow.comI facing a problem on how to use SQL "in" in bulkUpdate Hibernate.
Example :
Country is an enum type.
Hibernate ... |
7. Hibernate select groupProperty , rowCount with rowCount > n? stackoverflow.comSorry if it is a dumb question but I've stuck with this problem for a whole afternoon but cannot find a solution because I'm not skilled with complicated SQL : I want ... |
8. How do I get hql string from DetachedCriteria stackoverflow.comI'd like to get hql request from DetachedCriteria. Is there any right way of doing it(I mean toString is not right)? |
9. Using Hibernate DetachedCriteria for calling aggregate functions stackoverflow.comI have a |
10. Hibernate criteria: why no Subqueries.isNull(DetachedCriteria)? stackoverflow.comI want to translate a script like this into criteria:
|
11. Hibernate Criteria: performing left outer join in Subquery and DetachedCriteria stackoverflow.comI have three entities
|
12. How to write Hibernate query for collections Set stackoverflow.comI have following Entity
|
13. About Distinct using DetachedCriteria in Hibernate forum.hibernate.orgCan any solve this problem ? if possible plz give reply to me. The problem is as follows: I got a problem whenever i am using this query , DetachedCriteria query = DetachedCriteria.forClass(GoodsReturned.class) .add(Property.forName("returnedDate").between(cal1.getTime(), cal2.getTime())) .setProjection(Projections.distinct(Property.forName("GRTNo"))); List |
14. Get the total record count of an existing DetachedCriteria forum.hibernate.orgExtendedPaginatedList epl= paginatedListFactory.getPaginatedListFromRequest(request); . . . DetachedCriteria criteria = DetachedCriteria.forClass(MyClass.class); criteria.add(Restrictions.eq("id", "12"); ProjectionList projectList = Projections.projectionList(); projectList.add(Projections.groupProperty("foo")); projectList.add(Projections.groupProperty("bar")); projectList.add(Projections.groupProperty("baz")); ExtendedPaginatedList myList = dao.findByDetachedCriteria(epl, criteria); ... |
15. DetachedCriteria : count before limitation? forum.hibernate.orgFearless, You may set the max results to be returned as 50. But it may not always cross 50 records it may also be less than 50. If you need only the count from the query, it is advisable to use count() instead returning all the results. As you said, you can also go with the size of the list. |
16. Workaround for NPE using DetachedCriteria with subqueries forum.hibernate.org |
17. DetachedCriteria & Distinct on a table not just a proper forum.hibernate.org |
18. DetachedCriteria & Distinct on a table not just a proper forum.hibernate.org |
19. DetachedCriteria SQL miss implicit join used as sub-select forum.hibernate.orgDetachedCriteria dc = DetachedCriteria.forClass(ProjectTask.class, "task"). createAlias("project", "proj"). setProjection(Projections.property("task.id")). ... |
20. Problem with DetachedCriteria and Subqueries forum.hibernate.orgNewbie Joined: Mon Jun 20, 2005 2:51 pm Posts: 13 Location: Brasil Hibernate version: 3.1.3 Please, I could use some help with DetachedCriteria and Subqueries. I would like to use Subqueries with the Criteria API, but I am getting a java.lang.ClassCastException: org.hibernate.impl.CriteriaImpl$Subcriteria. I have the following joined entities: User.hbm.xml: Main Table "users" Lernender.hbm.xml: secondary table: "lernender": linked to the first with ... |
21. Transform HQL query with notExists into DetachedCriteria forum.hibernate.org |
22. DetachedCriteria Query on Collection forum.hibernate.orgHi, I want to create a DetachedCriteria query using Hibernate3.1 the query is on collection of obects. For eg Class A { Collection b; // Collection of object B } Class B { String name; C c; // reference To class C } Class C { String cid; } The query is Search for A where childrens B are b1 AND/OR ... |
23. Mix Named Query and DetachedCriteria forum.hibernate.orgI just joined a team using Hibernate and we have a need to use a named query. The code already uses a DetachedCriteria to do all the filtering but I cannot find any examples of how to use it with a DetachedCriteria object. Can it be done? If so, how? Do I use DetachedCriteria.forEntityName()? I looked all over but cannot find ... |
24. DetachedCriteria Projections and Outer joins forum.hibernate.org |
25. Using DetachedCriteria in Subqueries question. forum.hibernate.orgHibernate version: 3.2.3 I have User object that holds a set of Groups. I'm trying to create a criteria query that will provide me with a list of Groups the that any particular user doesn't belong to at the moment, so not in the set of groups on user. First I created a DetachedCriteria to be used as a subquery. DetachedCriteria ... |
26. Sub-query with DetachedCriteria forum.hibernate.orgI am trying to get hibernate to generate the following sql query: select count (*) from (select distinct msisdn, productid from PURCHASES) I've managed to generate the sub-query select distinct msisdn, productid from PURCHASES with the following code: criteria.setProjection(Projections.distinct(Projections.projectionList() .add(Projections.property("msisdn")) .add(Projections.property("productId")))) I've been looking at DetachedCriteria. Is this possible? I'm using hibernate 3.0. |
27. DetachedCriteria and select disctinct forum.hibernate.org |
28. Hibernate DetachedCriteria query forum.hibernate.orgHello, I am new to Hibernate. We are using hibernate 3.0. I am getting InstantiationException. Here is my scenario: We are retrieving data using DetachedCriteria Query API. In the DetachedCriteria we are passing the name of the abstract class. The abstract class has two join sub classes which are again abstract class. If we pass the name of concrete class then ... |
29. Proper Use Of Projection To Add A Subquery DetachedCriteria. forum.hibernate.org//Main query DetachedCriteria criteria = DetachedCriteria.forClass(E2KAccounts.class); criteria.add(Restrictions.eq(Constants.ACCOUNTTYPE, "GEN")); criteria.add(Restrictions.ilike(Constants.ACCOUNT_NUMBER, accountNumberPrefix + "%")); criteria.add(Restrictions.gt(Constants.INACTIVATION_DATE, currentDate)); criteria.addOrder(Order.asc(Constants.ACCOUNT_NUMBER)); ... |
30. Show SQL Query from DetachedCriteria object forum.hibernate.org |