1. Hibernate, return custom object with Criteria or HQL stackoverflow.comthere is a way to return a custom object with a criteria query or hql query? For example, i have a class MyClass with a constructor MyClass(int id, String text), i want ... |
2. Hibernate Criteria for assotiated objects stackoverflow.comI have the next structure of DTO objects:
|
3. Hibernate Criteria object - how to... ? coderanch.com |
4. AND/OR in Hibernate - Criteria object coderanch.comI have a query like "select this_.appNum as y0_ from CoreApplication this_ inner join LoanAndDeposit loananddep2_ on this_.appNum=loananddep2_.CoreApplication_appNum inner join OptionTrade optiontrad1_ on this_.appNum=optiontrad1_.CoreApplication_appNum where this_.applicationType in ( ?, ?, ?, ? ) and this_.status in ( ?, ?, ? ) and optiontrad1_.lastModifiedUser=? and loananddep2_.status=? ". For the last part i.e. OptionTrade.lastModifiedUser and LoanAndDeposit.status I have to do an OR and ... |
5. Cretae Criteria is not working for inner objects in NHiberna forum.hibernate.orgHi, I have Region and City entities like this, namespace HelloNHibernate { [Serializable] public class Region { public int id; public string name; public IList |
6. Hibernate criteria to return more objects forum.hibernate.orgHello is it possible with hibernate Criteria to return fields from more than one object....? something like this: .createQuery("select new map( b as bill, c as client, (SELECT sum((i.itemprice * rs.quantity) .......... ) FROM rstavka rs, item i WHERE .... URDER BY r.billno desc")... etc If yes, could someone show me some example??? I need to be able to users to ... |
7. how to use Criteria to get whole tree (N level) of object forum.hibernate.org |
8. Criteria - Multiple object forum.hibernate.orgIf you are doing a query on bank accounts and how they relate to a bank, then you will want to have a many-to-one association in your mapping file. As an example, here is a snippet for one that I have done, where many reservations are associated with one guest: Code: |
9. How to modify criteria object? forum.hibernate.orgI don't think so. Download the source code and look at org.hibernate.impl.CriteriaImpl. You can cast your Criteria object to a CriteriaImpl and get further control over it, but I don't see methods for modifying it in the way you want. What's your reason for modifying it? Are you caching it and trying to reuse it? If so, you may want to ... |
10. How to modify criteria object? forum.hibernate.orgI don't think so. Download the source code and look at org.hibernate.impl.CriteriaImpl. You can cast your Criteria object to a CriteriaImpl and get further control over it, but I don't see methods for modifying it in the way you want. What's your reason for modifying it? Are you caching it and trying to reuse it? If so, you may want to ... |
11. Criteria returning multiple copies of same object forum.hibernate.orgNewbie Joined: Fri Jan 26, 2007 3:44 pm Posts: 4 Location: Kansas, US This appears to be related to EAGER fetching. I setup my DB to have 1 'Parent' record and 4 'Child' records, based on the following two classes... Code: package datamodel; import java.util.Set; import javax.persistence.Entity; import javax.persistence.FetchType; import javax.persistence.Id; import javax.persistence.OneToMany; /** * * @code_status Alpha * @author jayhawk ... |
12. OR between two sub-Criteria objects forum.hibernate.orgI have a query like "select this_.appNum as y0_ from CoreApplication this_ inner join LoanAndDeposit loananddep2_ on this_.appNum=loananddep2_.CoreApplication_appNum inner join OptionTrade optiontrad1_ on this_.appNum=optiontrad1_.CoreApplication_appNum where this_.applicationType in ( ?, ?, ?, ? ) and this_.status in ( ?, ?, ? ) and optiontrad1_.lastModifiedUser=? and loananddep2_.status=? ". For the last part i.e. OptionTrade.lastModifiedUser and LoanAndDeposit.status I have to do an OR instead ... |
13. Criteria and using a proxy object forum.hibernate.orgHi, I'm using a ClientProxy object with a subset of the details from a full Client object. How can I create a query that queries using criteria from the full Client object but which returns only that information in ClientProxy? For example a Client has a marital status attribute, while a ClientProxy does not, but I want a list of ClientProxy's ... |
14. How to set nolock for a hibernate object using criteria? forum.hibernate.org |
15. Getting repeated objects when creating a criteria forum.hibernate.orgHello, When executing a criteria i'm getting repeated object. The criteria is: List results = session.createCriteria(MyClass.class) .add(Expression.eq("attr1", attr1)) .add(Expression.eq("attr2", attr2)) .list(); And the hbm.xml file for MyClass is: |
16. Criteria instance object problem forum.hibernate.org |