1. HQL 1 to many count() question stackoverflow.comI'm trying to write a query in HQL, and I'm having some trouble with it. It's probably not too difficult, but I'm pretty awful at query languages in general and ... |
2. Hibernate Subquery Question stackoverflow.comThis should be a simple one I hope. I have an invoice and that invoice has a list of payments. Using the Criteria API I am trying to return a list of invoices ... |
3. Criteria Querying question stackoverflow.comhow to select particular field using Criteria ? |
4. Basic Hibernate question using and sql query stackoverflow.comI have an java Object ‘Person’ with 3 properties firstname,lastname and username. I have an Oracle Store procedure returning a Resultset with the 3 column. All works fine for that. Now I have ... |
5. JPA-2.0 Simple Select-Where question stackoverflow.comI am stuck with a problem concerning JPA-2.0 queries with relationships. How would it be possible to select any
|
6. JPA/JPQL COUNT question stackoverflow.comI have the following JPQL query -
|
7. hibernate query question stackoverflow.comI'm having a Hibernate query problem, basically it goes like this ... I have a User object that has an associated set of Class objects. Class objects have a startDate (a ... |
8. Hibernate query question coderanch.com |
9. Hibernate query question coderanch.comI'm using hibernate for the first time in a 'real' project. These are 3 of the tables: Projects --------- keyproj projusers(set) .... ProjUsers ---------- keyproj keyuser role Users ------- keyuser username projusers(set) .... The relationships are set up correctly (I think), I'm just not sure how to construct the query. What I have to begin with is the users' username. How ... |
10. Design question Hibernate Query coderanch.comHi! I have a little problem that I can't find a good solution for. I have articles in a database that have mappings to brand, Colour, Category, Gender, and many more. A web user can filter out articles by choosing the above mentioned entities from drop downlists. If let's say a user chooses to filter by a brand only articles that ... |
11. Question in Hibernate Criteria Query coderanch.comHello, Could any one please help, I referred so many articles but don't get information. I have question in my below Criteria query:- List> menuGroups = HibernateUtil.getSession().createCriteria(Menugroup.class). add( Restrictions.eq("published", true)).addOrder( Property.forName("name").asc()).setResultTransformer(Criteria.DISTINCT_ROOT_ENTITY). setFetchMode("catgroups", FetchMode.JOIN). createCriteria("catgroups").addOrder( Property.forName("name").asc()). add( Restrictions.eq("published", true) ).setFetchMode("dealitems", FetchMode.DEFAULT) .list(); When you closely look at the query, the association is, Menugroups--(1 to many)-->Catgroups---(1 to many)---> Dealitems. I have configured lazy ... |
12. Hibernate Query Question coderanch.comHi, I am relatively new to using hibernate...Is it possible to invoke a query returning multiple rows WITH THE SAME PRIMARY KEY into a list object?....I have tried many things, but keep getting an error that multiple rows are being returned with the same identifier...but, that is what I need returned...Any help or suggestions would greatly be appreciated! |
13. Hibernate Subquery Question forum.hibernate.orgThis should be a simple one I hope. I have an invoice and that invoice has a list of payments. Using the Criteria API I am trying to return a list of invoices and their payment total. So, in SQL I want something like this: SELECT i.*, (SELECT SUM(PMT_AMOUNT) FROM INVOICE_PAYMENTS p WHERE p.INVOICE = i.INVOICE) FROM INVOICES i I can't ... |
14. Newbie Question - IN Clause forum.hibernate.orgI am a newbie to Hibernate, so I hope everyone bears with me on this question. I have gone through the basics and think I understand most of what I am doing, but I am completely confused on certain WHERE conditions -- namely the in-clause representation. For example (very loose example), I have the following ad-hoc query for an application which ... |
15. Query question forum.hibernate.orgOk, Class A can have many Class B. Class B can have many Class A Class A { List bs; } Class B { List as; } now I want to select some A classes that have a set of B classes in their list of B classes. I.e. give me all A that have the B's with b.id=3, b.id=4, b.id=5 ... |
16. New to Hibernate question about Hql query forum.hibernate.orgHi everybody. I have a question about hql queries. Here is my code. Code: return session.createQuery( "SELECT DISTINCT APFEE.FEEDESC, LicenseItem.APNO, CONTACT.CNTCTFIRST || ' '|| CONTACT.CNTCTLAST AS NAME, "+ "CONTACT.DAYPHN, CONTACT.CITY, CONTACT.STATE,CONTACT.ZIP, APFEE.QTY, LicenseItem.APKEY,"+ "LicenseItem.EXPDTTM, ... |
17. subquery question forum.hibernate.orgI'm new to both this board and Hibernate and wanted to know how I can mimic the following type of query in either HQL or using an instance of DetachedCriteria: Select a.field1, b.field2 From TableA a, TableB b, TableC c Where someCriteria = otherCriteria And b.idField In( select max(idField) from TableB b1 where b1.theField = b.theField and b1.anotherField = b.anotherField ) ... |
18. Order by combined columns question forum.hibernate.orgHi folks, I can't figure out how to do the following... maybe I'm getting a little tired :-( I have a table named 'CLIENT'. Among it's columns, there are 'businessName', 'contactLastName' and 'contactFirstName'. All of them can be null but contactLastName and contactFirstName cannot be null if businessName is null. I want to order by a combination of those three columns ... |
19. HQL Query Question forum.hibernate.org |
20. Query question forum.hibernate.org |
21. Projections.sum() question forum.hibernate.org |
22. Question about query cache and second level cache using forum.hibernate.orgHi, I'm using hibernate with ehcache (don't think it matters, tho).. When a user logs in i identify him by his email and i use his email for all subsequent calls. Now, since email is not my "hibernate id" (the one i annotated with @Id) i have to to load it with a query and thus, store it in the query ... |
23. Repost: question about session.find() forum.hibernate.org(Sorry, I put wrong title to the previous question, pls ignore it.) hi, I try to get a list of objects using the following code: Object[] args ={}; Type[] types = {}; String query = "from Student as student "; ...... session.find(query, args, types); The last line throws: java.lang.NoClassDefFoundError: net/sf/hibernate/type/Type What's wrong with my code? regards, |
24. Query.setProperties( Object ) question. forum.hibernate.orgLooked deeper into this. Seems as if it is handling the Native sql call as HQL. The query dies after parsing "department." it's expecting a class path, ( saw indexOf( '.' ) so I assume that is what was going on. Then it sets expectingIn to true. The next thing it sees is {d} and it chokes on it. Making a ... |
25. Subquery questions forum.hibernate.orgHi I am trying to put together a query with a subquery for the purpose of comparing elements of collections with elements from another collection. The elements are of the same type. The elements in the first collections must not exist in the elements of the subquery. Table relations: booking -n:1- resourceGroup -n:m- resources This is the narrowed version of my ... |
26. Recursivity and query questions forum.hibernate.orgHello, I want to use Hibernate with Parent / Child relationships and I have questions about it. I can't find answer in the userguide... When someone makes a query, only elements are retrieved and what about the relations? A 'getParent' ( or equivalent ) make a new request or the instance is yet retrieved ( with a parameter to tell the ... |
27. newbie question : unable to execute query forum.hibernate.orgHi : I am using hibernate-2.1 and trying to query Oracle 8i. I am able to connect to the database but my query fails ..and I get the following bunch of exceptions .Any pointers would be greatly appreciated. [java] 10:24:35,531 WARN JDBCExceptionReporter:38 - SQL Error: 936, SQLState: 42000 [java] 10:24:35,546 ERROR JDBCExceptionReporter:46 - ORA-00936: missing expression [java] 10:24:35,546 WARN JDBCExceptionReporter:38 - ... |
28. SQL Query -> Question forum.hibernate.org |
29. Question about onFlushDirty and select-before-update forum.hibernate.orgHello, I have a Customer class being persisted by Hibernate 2.1.2 to an Oracle 9i database with the select-before-update option on. This object will be used in "detatched" mode; in other words its not for a web application but instead for a swing desktop application. Of course this means that the object will not be loaded and saved in the same ... |
30. query question forum.hibernate.orgI have and object c and it has a collection of a. I need a query to returns all instances of c who have the a colletion empty. In SQL I would write something like this: select c.* from c , a where c.id= a.fk_id(+) and a.id is null How do I write it in HQL? I tried using having count(a) ... |
31. Query question forum.hibernate.orgI have the following relationship: Grandparent-Parent-Child - one to many down the hierarchy as you would expect. I have some set of Child IDs and I want to get Grandparent objects that contain Parents with those Parents in a Set, and Parents containing Children in a Set, but only those children that I queried on - not all children from the ... |
32. Beginer Query question forum.hibernate.orgHi, sorry for this really stupid question. but after searching in the forum I could find anything I could use for my problem. I have a parent-child relationship where there is many child or none I would to get parent objects where EITHER the parent.FLAG = 1 OR the any of the parents.child.FLAG = 1 I know in sql I would ... |
33. Query question forum.hibernate.orgI am trying to perform the following query: query = session.createQuery("from Screen1HPBean screen where screen.termid = 'ABC'); //One object is found Screen1HPBean screen = (Screen1HPBean)query.list().get(0); //Now I can get information from ScreenqHPBean with no problem, //but when I try to get - Set plans; it only returns one object of type //PlanBean when it should have returned 23 Set plans = ... |
34. HQL Query question forum.hibernate.orgHi! I am a newbie to Hibernate. Could please someone translate me the following query into HQL. SELECT ofsuser.id, permission.id FROM permission INNER JOIN rolepermission ON (permission.id = rolepermission.permissionid) INNER JOIN role ON (rolepermission.roleid = role.id) INNER JOIN userrole ON (role.id = userrole.roleid) INNER JOIN ofsuser ON (userrole.userid = ofsuser.id) WHERE ( (ofsuser.id = ?) ) Thanks a million! - Markus ... |
35. a question of count() in HQL(mysql db) forum.hibernate.org |
36. Difficult HQL Query Question forum.hibernate.orgHi I am trying to write a query and am struggling to get it to do what I want.. I know my association here isn't the greatest, but it has to do for now. Here is my mapping for this object: Code: |
37. HQL Query question forum.hibernate.org |
38. hibernate query question forum.hibernate.org |
39. query criteria question forum.hibernate.org |
40. Report Queries Question forum.hibernate.org |
41. question about the HQL query forum.hibernate.org |
42. A question about distinct forum.hibernate.orgCaused by: java.sql.SQLException: The text, ntext, or image data type cannot be selected as DISTINCT. Severity 16, State 3, Procedure 'JAVASERVER2 null', Line 1 at weblogic.jdbc.mssqlserver4.TdsStatement.processWarning(TdsStatement.java:1193) at weblogic.jdbc.mssqlserver4.TdsStatement.parseMsWarning(TdsStatement.java:1104) at weblogic.jdbc.mssqlserver4.TdsStatement.getMoreResults(TdsStatement.java:771) at weblogic.jdbc.mssqlserver4.TdsStatement.execute(TdsStatement.java:210) at weblogic.jdbc.mssqlserver4.TdsStatement.executeQuery(TdsStatement.java:54) at weblogic.jdbc.mssqlserver4.TdsStatement.executeQuery(TdsStatement.java:1439) at weblogic.jdbc.wrapper.PreparedStatement.executeQuery(PreparedStatement.java:80) at weblogic.jdbc.rmi.internal.PreparedStatementImpl_weblogic_jdbc_wrapper_PreparedStatement_weblogic_jdbc_mssqlserver4_TdsPreparedStatement.executeQuery(Unknown Source) at weblogic.jdbc.rmi.internal.PreparedStatementImpl_weblogic_jdbc_wrapper_PreparedStatement_weblogic_jdbc_mssqlserver4_TdsPreparedStatement_WLSkel.invoke(Unknown Source) at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:407) at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:356) at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:353) at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:123) at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:351) at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:30) at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:178) at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:151) |
43. Query.setCalendar() question forum.hibernate.org |
44. Update without select - simple question forum.hibernate.org |
45. Question about Select new() usage forum.hibernate.orgAuthor Message delnoij Post subject: Question about Select new() usage Posted: Wed Nov 17, 2004 5:31 am Newbie Joined: Fri Nov 12, 2004 11:08 am Posts: 7 Location: Amsterdam I would like to create a query that returns a List of objects of Type Gallery. This query leads to a HibernateQueryException: Code: SELECT new Gallery() FROM com.vvdb.bus.gallery.Gallery AS gallery ... |
46. question about Query forum.hibernate.orgI have a quick question! Is it possible to do something like this in a Query (and how do I do it?): "select new MyObject('randomString', table.col1) from my_table table" ? My problem is that "MyObject" has a constructor that requires a string that is not available in "my_table" so I want to provide a default value through Hibernate. Of course I ... |
47. session per application and query cache -> question to de forum.hibernate.orgI tried to perform very simple test of reading just whole table : (UFO is very simple persistent class) /* ... first I add few UFO records */ { //all this few times (lets say 3) UFO ufo = new UFO(); session.save(ufo); } //then I call few times read { //all this few times (lets say 3) System.out.println("next read"); Criteria crit ... |
48. Question on how to use subqueries in HQL forum.hibernate.orgNewbie Joined: Wed Sep 17, 2003 9:02 pm Posts: 13 Hello. I have a situation where I need to use a resultant table of a subquery as a table in the join of a SQL statement. I am using Oracle 8i as the database. I was able to execute the native SQL without any errors using PL/SQL and other Oracle tools ... |
49. HQL question - creating temporary tables in FROM clause forum.hibernate.orgHello. I have a basic question. Can I use HQL to create a temporary table in the FROM clause of a select statement and then join the temporary table with another table in the same select clause. My native SQL (Oracle 8i) is as follows: select a.* from address_validation a, (select min(av_seqno) seqno, av_zipcode, av_state, av_city from address_validation where av_zipcode = ... |
50. Criteria Query question forum.hibernate.org[b]Hibernate version:[/b] 2.1 [b]Mapping documents:[/b] N/A [b]Code between sessionFactory.openSession() and session.close():[/b] result = session.createCriteria(tableA.class) .add(Expression.eq("columnB", null)) .list(); [b]Full stack trace of any exception that occurs:[/b] N/A [b]Name and version of the database you are using:[/b] Oracle 9i I have a table A with columnB which is nullable. I want to write a Criteria Query which will fetch all records of tableA ... |
51. Basic query question forum.hibernate.orgHi I have a parent-child relationship. Everything works fine. but I'm stuck with a query. I can do it SQL but I have problem how to translate it to HQL. Both the PARENT and the CHILD object has a field STATUS. I need to retrieve all the PARENT objects from the DB where - either the PARENTs status is X - ... |
52. use question concering Criteria and Projections... forum.hibernate.org |
53. HQL question - count forum.hibernate.orgHello Using the latest Hibernate - quick question about HQL query using count: I have two tables - Sessions and Messages. I run a from query on both of them although I mostly retrieve Session data. The two tables have a foreign key relationship on sessionId - Messages have sessionIDs which tell them which sessions they contain (each msg contains 1 ... |
54. query reuse, design question forum.hibernate.orgMy question is around query/database design. What I am running into could be bad schema design, however we are not in a position to re-design at this stage of the game. Also just thinking about it what I am about to describe is probably a valid use case. As I am creating queries for our object graph I end up writing ... |
55. Hibernate Query Question forum.hibernate.orgI have a quick question regarding Hibernate querying. We just started using Hibernate on our project. Our application is web based and has tons of table listings. On checking the sql generated by hibernate I was perplexed to find that for a HQL query such as from Site, multiple queries are run; first one to get the IDs and a query ... |
56. Question about named queries forum.hibernate.org |
57. Query Question forum.hibernate.orgHere is a short desc of how our domain model looks like. There is a unidirectional one-to-many mapping between A and B. B has subclasses C and D A has no knowledge of C and D. It is only aware of B by the mapping. Abstract superclass B and its subclasses C and D are mapped via table per hierarchy. C ... |
58. question about mulitple joins in a HQL or Criteria query forum.hibernate.org(sorry - i entered the message before finishing it) i would like to issue a query along the lines of 'find all the As where A.AToBLinks.C.name = "foo" and A.AToBLinks.C.Name = "bar"' as there can be many C objects hung off the A objects (through a B link), i'm looking for all the A objects which have (implicitly) more than one ... |
59. Criteria Query Question forum.hibernate.orgHi everyone. I'm in a situation that can be described like this: I have to search the Purchases(and return the Purchases in a List), but using a ilike expression to a String in the 3rd composition of the Purchase. Is something like this: Purchase has PurchaseItems PurchaseItems has Product Product has Brand I have to search by the brand name. |
60. HQL select question forum.hibernate.org |
61. HQL and ordering question forum.hibernate.org |
62. query question... forum.hibernate.org* @hibernate.bag * table="periodAddress" * lazy="true" * cascade="all-delete-orphan" * order-by="start" * ... |
63. query question involving a Set property forum.hibernate.orgActually, what I'm really after is a query that imposes several conditions on an element of the Set. Something like select profile from Profile profile where (profile.criteria.attribute='blue' and profile.criteria.value = 10) and (profile.criteria.attribute='green' and profile.criteria.value = 5) In words, selecting Profiles having one criteria element with attribute='blue', value = 10 and another element with attribute = 'green' and value = 5. ... |
64. " Could not execute query" question, not sql error forum.hibernate.orgI use hibernate + mysql , and configure the entity mapping with "lazy=false" .and deploy my applicaiton. The first day, all of it worked well, but since the second day. something exception occured: and stack message is " Could not execute query", and my application dump.... can anybody here help me? many thanks. ------------------------------------------------ |
65. Question regarding native SQL queries forum.hibernate.orgHi, In the |
66. Question about using named query and session API's for DML forum.hibernate.orgHibernate provides facility to do update , insert , delete by using session.update, session.delete, session.save. At the same time, we have concept of named queries which also provides facility of insert,update, delete as shown below.... |
67. Query By Exampl question forum.hibernate.orgI am using Hibernate 3.1.2 in a JBoss environment and PostgreeSQL database. I have two tables, say parent and child, mapped in a 1 to n association. Parent mapping is: |
68. hql query question forum.hibernate.orgHi, Is it possible to have hibernate populate a java object and its children (a List/Set etc) in a single select (with inner join) - when there is no mapping defined on the parent --> children (one-to-many)? Or does one need to perform 2 queries: 1. select the parent 2. select the children 3. parent.setChildren(children); |
69. question is "select new" forum.hibernate.orgthe box class ... public class Box extends AbstractBox implements java.io.Serializable{ private User TUserInfo; private Integer boxid; private String boxname; public Box(Integer boxid, User TUserInfo, String boxname) { super(boxid, TUserInfo, boxname); } .....get set mehod ..... } the user class pubilc class User extends AbstractUser implements java.io.Serializable { private Integer userid; private Integer username; private Set TUserBoxes = new HashSet(0); .....get ... |
70. Basic Newbie select question / problem forum.hibernate.orgI'm having a problem with a select I've created, basically i have the following situation: I have a domain class Property, which has some fields which are also domain objects a code snippet from Property is Code: .... private Address address; private PropertyType propertyType; private SaleType saleType; ... |
71. Visits: More like a design question forum.hibernate.orgHi, As the title suggests this is a design question. Imagine this simple example. I have a File entity and every time someone would view the file that would be considered to be a visit. I have two options to count the visits 1. the strainght forward way, keeping a file_visit table that will create a record everytime when the file ... |
72. simple query question forum.hibernate.org |
73. simple query question forum.hibernate.orghi, how can i get null values from a table.I have a query like this: String srvTypeID = "1"; String query = "FROM Service WHERE SRV_GROUP LIKE'"+srvTypeID+"%' ORDER BY SRV_GROUP,SRV_NO"; List result = session.createQuery(query).list(); i got a error like this: WARN - SQL Error: 17026, SQLState: null ERROR - Numeric Overflow Exception in thread "main" java.lang.RuntimeException: could not execute query at ... |
74. Question About Criteria Queries forum.hibernate.orgI hope this isn't a stupid question . . . I read chapters 10-15 on querying and it doesn't explicitly say whether entities returned by Criteria queries are persistent or detached. Chapter 10 notes that entities returned by Query.list() are persistent, but there is no mention of Criteria.list(). The problem we are having is that during a session in which we ... |
75. Questions about Hibernate Query over Collections forum.hibernate.orgThe relationship table between shop and contact ist a composite-element. It contains three id: shopid, contactid and relationId. (contact can be assigned to shop under different relationtype) here is the hbm Code: |
76. General Question about L2 / Query Cache forum.hibernate.orgHi, could someone point me to a document / article / Javadoc / anything that explains the in-depth workings of the L2 Cache ? I am particularly interesting in information about how it works (and why) about uncommitted transactions.. Basically, what I am doing is Importing 2+ million entries inside a single transaction. For a few objects and Queries : - ... |
77. Question regarding criterias and sort order forum.hibernate.orgHey, I have a quick question about sortorder when using building a query using criterias. I have an Hoering object with an Hoeringstype object and I would like to sort the Hoering's by the Hoeringstype.name property. Is this possible ? I've tried to do an addOrder(Order.asc("hoeringstype.name")) to my criteria, but that throws an org.hibernate.QueryException: could not resolve property: hoeringstype.name of: com.nnit.hoeringsportal.domain.Hoering ... |
78. HQL subquery question forum.hibernate.orgHibernate version:3.1 I have a table "Routing" that has a column "state" and a column "order_num", among others. The same state can be listed multiple times, and I am trying to return a collection of objects that have the highest order_num for each state. Here is the code i have so far. It works in TOAD, but Hibernate doesn't like it: ... |
79. Question about order-by forum.hibernate.orgHi, I have a one-to-many relationship in survey mapping file is defined as: Code: |
80. Distinct question forum.hibernate.orgHello. I have a table with many values. I would like to do something like this in Hibernate: select distinct fabrikatid,modellbetegnelse,modellvariantid,type from motor; This should retrieve a list of MotorData objects which are distinct. fabrikatid is from FabrikatData object and modellvariantid is from ModellvariantData object. The rest are properties in MotorData. Can someone help me please? |
81. QBC question about count forum.hibernate.org |
82. Question on 2nd level query Caching forum.hibernate.orgI have some questions on 2nd level query caching. Does 2nd level caching only allows caching of entities that have a mapping with database. Suppose if I fetch a query with projection, with selected columns , is it able to cache the query that return columns for different tables Suppose if I do this Query q = session.createQuery("select p.name,s.salAmount from Person ... |
83. Newbie with Named Query question forum.hibernate.org |
84. Query Uni-directional one-to-many Question forum.hibernate.orgHi guys I have a Parent and Child with a one-to-many uni-directional relationship. When I try to get all the Parent with a Child of a certain criteria (say age=8). I have a n+1 selection problem. Hibernate will first look into the Child table to get all Parent id who got a child age=8. And then it will do a select ... |
85. Report Query translation question forum.hibernate.orgI'm trying to make a report query that shows how many distinct entities appear a certain number of times, so that I can make a graph of it showing the number of appearances against the number of entities. The result of the query should be a table like : Code: #appearances | #entities ----------------------------- 12 ... |
86. question about count in hibernate forum.hibernate.orgHi all, I'm a newbie in hibernate. I have a question about how to use count() function in DetachedCriteria Table schema as follow Member Field plus jacky aaa 10 jacky bbb 10 I would like to execute the following sql Select field, count(plus) from transaction where member = jacky group by field How should I do in DetachedCriteria, pls help, thanks ... |
87. Query enhancement question... forum.hibernate.org |
88. Query question... forum.hibernate.orgI have follow schema: A - one to many - B B - one to many - C How can i realise follow query in hibernate language: select c.id from category as c where c.id in (select cat_id from tournament as t inner join wette as w on t.id like w.tournament_id ) |
89. 3 selects for one view page question forum.hibernate.orgMy viewpage is build up with the help of three selects. One to load the sub categories with the total number items. One to load special items per sub category One to load banner/advertisement information related to the parent category. My question is: Are 3 selects per viewpage to much? Can I build up this page with less selects? |
90. Multiple table sort question forum.hibernate.orgHibernate version: Hibernate 3.2.3 Mapping documents: |
93. Question on Hibernate Pagination forum.hibernate.orgHello, I'm trying to create a paginated list, but every time I use the setMaxResults and setFirstResult methods, my code breaks. Here is the code I'm using. I set the setFirstResult to 0 temporarily since I couldn't get it to work anyway: Code: public List |
94. Question in Criteria Query forum.hibernate.orgHello, Could any one please help, I referred so many articles but don't get information. I have question in my below Criteria query:- Code: List> menuGroups = HibernateUtil.getSession().createCriteria(Menugroup.class). add( Restrictions.eq("published", true)).addOrder( Property.forName("name").asc()).setResultTransformer(Criteria.DISTINCT_ROOT_ENTITY). setFetchMode("catgroups", FetchMode.JOIN). createCriteria("catgroups").addOrder( Property.forName("name").asc()). ... |
95. Question regarding discrimator and where clause forum.hibernate.org |
96. question about accessing unmapped DB columns in query forum.hibernate.orgHibernate version: Hibernate 2 Name and version of the database you are using: MySQL Hi there, When I'm doing the mappings of POJO properties to MySQL columns everything is running smoothly. With a snippet of code like this I get a list with UserGroup objects: Code: Query query = this.hibernate().getHibernateSession().createSQLQuery( ... |
97. query question forum.hibernate.orghi - i am having hard time translating the following regular sql.. select * from vb_product p left outer join (select * from vb_product_privilege where organization_id = 1) as pp on p.id = pp.product_id where p.name like 'ms%' my initial attempt to word it like follows applies the organization 'filter' to end result so it does not return all records from ... |
98. Query question forum.hibernate.orgHi I have a domain object Customer that contains a list of CustomerEvent objects in a List named customerEvents. A CustomerEvent has a field called "type" I would like to query for all Customers that has at least one CustomerEvent that has its type set to a spesific value. How do I do this in HQL? I've scanned the documentatjon, but ... |
99. Query Question: Starts with and internationalization forum.hibernate.orgLet's say I have the following class entities defined: Locale, User, Product, ProductLocales, and UserProduct. Here's the ERD for it: http://docs.google.com/Doc?id=ad2pvck7zk57_0tscm3ggb -- it has a typo, the name and description are varchars not integers. A user wants to find all products in their locale beginning with "Dog", but in the user's native language. I have a few questions. 1) This search ... |
100. JPA query question! forum.hibernate.org |