problem 1 « Query « JPA Q&A





1. HQL Order by query giving problem    stackoverflow.com

I have following query written in HQL for Hibernate. ========================================================================

select new map(ret.retailerDesc as ret_name, ret.id.retailerId as ret_id,
               ret.id.serviceId ...

2. How can i resolve the N+1 Selects problem?    stackoverflow.com

I have trouble understanding how to avoid the n+1 select in jpa or hibernate. From what i read, there's the 'left join fetch', but i'm not sure if it still works with ...

3. Problem in HQL query    stackoverflow.com

I written a query in my sql like this: "select * from table_name order by col_name = 101 desc " Which is working perfectly fine in mysql but when I tried to convert ...

4. Hibernate CreateSQL Query Problem    stackoverflow.com

I'm trying to use hibernates built in createsql function but it seems that it doesn't like the following query.

List =hibernateSession.createSQLQuery("SELECT number, location FROM table 
WHERE other_number IN 
(SELECT f.number FROM table2 ...

5. Problem on Hql query    stackoverflow.com

I have the following hql query:

from Admin a where a.genericTable is null or (a.genericTable.allowInsertion = true or a.genericTable.allowInsertion is null)
The problem is that the result set is excluding all entries that ...

6. Problem with Hibernate/JPA Query and categories    stackoverflow.com

I have a Hibernate/JPA data model that lets me place objects (MyObj) into various categories (MyCategory). Each category may have 0 or more subcategories, and categories that do not instead ...

7. Hibernate Envers: Problem querying revisions    stackoverflow.com

I use Hibernate Envers for auditing. My entity looks like this:

@Entity
@Audited
public class Child
{
    @GeneratedValue
    @Id
    @Column
    private Long id;

 ...

8. Problems with the HQL Query    stackoverflow.com

Below is my HQL Query.

delete from Table t 
where 
    (t.column1=:value1 and t.column2=:value2) 
    or (t.column3=:value3 and t.column4=:value4) 
When I run this query it generates ...

9. Problem with HQL (Hibernate) Query    forums.netbeans.org

Hi. I have a database which possesses only one table. This table is called "Login" and has two columns: "username" and "password". I have inserted two rows in it, so it ...





10. hibernate query problem    coderanch.com

i was quite happy cause hibernate successfully mapped my class to the db when i tried to execute a query and got a sql invalid column name error!! but im sure i mapped the class's field to the correct column name this is the query: from fuckthegest.model.PropostaOrdine as po where po.cmp = :cmp and po.prg = ...

11. Hibernate Query problem.    coderanch.com

I am trying to run a sample program with hibernate. I have two records in DB with 5 columns. all four column valus are same except one.If issue Select * from TestTable where id = 4545; I a mgetting two records. With Hybernate the collection is having two bo's but both are identical returning first row in the table twise. Could ...

12. Hibernate: Problem with subset query    coderanch.com

Paul, All my properties are mapped properly in the mapping file, but it seems like if I use native SQL, I would need to select all columns rather than subset of columns. I switched to HQL using createQuery() instead of createSQLQuery(), and now it works fine. The only issue I have with createQuery() is that I have to manually map the ...

13. Hibernate HQL query problem    coderanch.com

Hello, I have a very strong problem with an HQL query and I'm looking for your precious help ;-) My HQL query is : select distinct articles from com.iserva.model.Article as articles inner join articles.column as column inner join articles.state as state where articles.language =:language and articles.state.stepId =:stepId and articles.state.status =:status and articles.column =:column The SQL Equivalent generated by Hibernate is : ...

14. hibernate : problem in select query    coderanch.com

this is my hibernate.cfg.hbm com.sap.dbtech.jdbc.DriverSapDB jdbc:sapdb://localhost/BARSDB?sqlmode=oracle local local 10 false org.hibernate.dialect.SAPDBDialect and AppMst.hbm.xml ...

15. HQL query problem    coderanch.com

16. Problem with Hibernate Query    coderanch.com

Hi everyone! Im using the following HQL to pull up records from Oracle 9i. QUERY ====== SELECT DISTINCT inv.invoiceId, per.surname, per.firstName, assig.assignmentNumber, assig.rate, assig.unit, trunc(inv_pd.startDate), trunc(inv_pd.endDate), trunc(inv.invoiceDate), b_code.invoiceTimeDue, inv.status , (SELECT SUM(units) FROM HpInvoiceDetails invoiceD WHERE invoiceD.invoice_id = inv.invoiceId) as conUnits FROM HpInvoice inv, HpInvoiceDetails inv_d, HpBillingCode b_code, HpInvoicePeriodDates inv_pd, HpAssignmentsD assig, HpPersonD per WHERE inv_d.invoiceId = inv.invoiceId AND assig.assignmentId = ...





17. Problem creating query when using Hibernate and Axis2    coderanch.com

I've created a web service using Axis2. I want to use Hibernate to connect to my database back end. However, it's not working correctly. I'm not sure what the exact problem is. I'm using Tomcat 6.0.18 with Axis2 1.4.1 running inside Eclipse 3.4. I'm using Hibernate 3.3.1 and talking to HSQLDB 1.8.0 I can create and insert an object into the ...

18. hibernate query problem    coderanch.com

Hello All, I have an domain object Student with some attributes Id, first_name,last_name,contact_number etc. I want to get only first_name and last_name for all the students and return value should be list of student objects. The following sql is returning list of student objects. String sql = "from Student"; getHibernateTemplate().find(sql); // returns list of student objects Where as the following sql ...

19. Problem with Hibernate Query    coderanch.com

20. Hibernate query problem    coderanch.com

Hi, I have to do outer joing on two tables using three columns. I get the result set here is the problem when I try to retrieve values from the resultset there is a chance for getting null values. for example result set looks like 1 2 null null 1 2 null null 1 2 3 null 1 2 3 null ...

21. Hibernate Criteria Query Problem    coderanch.com

Hi I just want to ask that the following code can add a row in the table. If the logonid doesn't exist in the system then the logonid will give null Or it will create a new row in the table. Criteria criteria = currentSession.createCriteria(com.test.cs.model.user.User.class); criteria.add(Restrictions.eq("logonID", logonID)); user = (User)criteria.uniqueResult(); The problem is that initially there is no record in the ...

22. HQL SELECT problem    coderanch.com

SELECT mynote from Mynote as mynote, Notedescription as notedescription WHERE mynote.username = :username and mynote.usersurname = :usersurname and notedescription.username = mynote.username and notedescription.usersurname = mynote.usersurname and notedescription.isturkish = :isturkish query.setParameter("username", username); query.setParameter("usersurname", usersurname); query.setParameter("isturkish", isturkish); could not resolve property: username of: com.examples.entity.MyNote There is PK-FK relationships between these tables. username and usersurname But i didn't define them on mapping files. Why ...

24. Problem with select query in hibernate    coderanch.com

Hi all, I am facing problem in issuing select command using hibernate. I wrote a sample code package hibernate; import java.util.Iterator; import org.hibernate.Query; import org.hibernate.Session; import org.hibernate.SessionFactory; import org.hibernate.Transaction; import org.hibernate.cfg.Configuration; public class ForeignKey { public static void main(String kk[]) { Configuration cfg=new Configuration(); cfg=cfg.configure(); SessionFactory factory=cfg.buildSessionFactory(); Session session=factory.openSession(); Query query=session.createQuery("select sur_name from surname "); session.close(); } } When I try ...

25. problem on hibernate Query    coderanch.com

26. Query problem with Xpath    forum.hibernate.org

I have a BBDD table with XMLType column ("atributos") for Oracle 10g, and HQL with Xpath not works. The xml structure: My query: SELECT extractValue(d.atributos, '/atributos/atributo[@id=\"52\"]/@valor') from DocumentacionServicio d My Exception: java.lang.IllegalStateException: No data type for node: org.hibernate.hql.ast.tree.MethodNode \-[METHOD_CALL] MethodNode: '(' +-[METHOD_NAME] IdentNode: 'extractValue' {originalText=extractValue} \-[EXPR_LIST] SqlNode: ...

27. What to do if Criteria queries limitations are a problem?    forum.hibernate.org

What does one do when the Criteria api presents enough limitations that you have to go to HQL anyway? I have to build a massive, dynamic query. It's basically a really complicated one where one string needs to be matched on several joins and columns (and there's lots of these type) and sometimes the user can say things like, "Only the ...

29. 5N+1 selects problem    forum.hibernate.org

30. problem with doing query in PreEventInsertListener    forum.hibernate.org

Hello, I have a implementation code for hibernate's PreInsertEventListener, where I need to do a hql query to check some data - based on that query, I need to update the object which originally caused this PreInsertEventListener. Problem is that when query() is called in this code which implements PreInsertEventListener, hibernate tries to flush the session, which in turn tries to ...

31. 1250 charset query problem in Firebird    forum.hibernate.org

Hi, I am trying to wite a database bridge between old and new Firebird database using Java SE and Hibernate. Old database is to obsolete but still is used by old application (there is noway to replace it and noway to use utf-8 in old one). In old database are a lot of characters from charset 1250 and when I try ...

32. Query problem    forum.hibernate.org

user = (Users) session.createQuery("from Users users where UserName=:userName") .setString("userName", userName) .uniqueResult(); ...

33. problems with HQL query .....    forum.hibernate.org

I have a project class that has a set of userstories called userStories12many im having trouble trying to get the project that has a certain userstory in its set getComponent(int userStoryID) I think im on the right track but i dont know what i did wrong public Projects getComponent(int userStoryID) { Session session = SessionFactoryHelper.getSessionFactory() .getCurrentSession(); session.beginTransaction(); List compo = session.createQuery("select ...

34. Problem writing HQL Query    forum.hibernate.org

HI, i am trying to write an hql query with nested select statements, e.g, Select new Cat(id, name, color,........) from ( select cat.id as id, cat.color as color, cat.name as name, sum(case when sibs.color = 'Black' and sibs.Type = 'Male' then 1 else 0 end ) as BlackSibs , sum(case when sibs.color = 'White' and sibs.Type = 'Male' then 1 else ...

35. Problem with HQL query (SOLVED)    forum.hibernate.org

36. Simple Query problem    forum.hibernate.org

Hello, I am trying to do a query using: Product lProduct= (Product)this.mSession.load(Product.class, id); Id field being the primary key This does not return anything. However, this Query query = this.mSession.createQuery("from Product"); returns all values. I have show_sql turned on. For the first statement is shows something similar to: Hibernate: select product0_.productCode as productC1_1_, product0_.productName as productN2_1_, product0_.productLine as productL3_1_, product0_.productScale as ...

37. HQL huge problem with cutting query    forum.hibernate.org

38. Problem with query    forum.hibernate.org

@NamedQuery(name = "Supplier.findBySupplierNameLike", query = "SELECT s FROM Supplier s WHERE s.clientId = :clientId and lower(s.name) like lower(concat(:name, '%'))") }) @Override public List getSuppliersBySupplierNameLike(Integer clientId, String supplierName) { em.getTransaction().begin(); @SuppressWarnings("unchecked") List sups = em.createNamedQuery("Supplier.findBySupplierNameLike") ...

39. HQL query problem    forum.hibernate.org

Hi, I'm having problem with the HQL query. I'm using MySQL. This is my query: Code: select o.uuid as uuid, o.code as code, o.title as title, o.category.category as category, o.priority.priority as priority, o.difficulty.difficulty as difficulty, o.type.type as type, ...

40. Strange N+1 problem when using Order.desc    forum.hibernate.org

I am afraid I have come to a Hibernate bug and I am wondering if someone might have an other explanation before I try to generate a test case. I have a class which contains a simple parent-child relation to itself. If I fetch this class via the Criteria API without any ordering (addOrder) all the entities are fetched with a ...

41. FindById and Query Problem    forum.hibernate.org

Hi! I have a problem with some query, in particular with method findById, I have a web application connected to 3 databases. The fuctionality based on two databases work correctly, the new functionality that uses the third database execute the query but the returned object (of findById method) return an object with only id is enhanced. The other 2 fields (String) ...

42. Problem with paginated, ordered, restricted queries.    forum.hibernate.org

I'm having issues with how sorting seems to be handled in the following situation: I have a table of Contacts, holding their first and last name in separate columns. I want to pull the results paginated and sorted alphabetically by name. What I did first was following: Code: Criteria criteria = session.createCriteria(Contact.class); ...

44. Problems with HQL query...    forum.hibernate.org

I'm working with my first class/mapping with Hibernate. I've got the mapping built and know that it works as I'm able to persist objects to the database (I verrified the persistence via a database browser). The problem is with queries. I'm trying to execute the most simple query: from Mailbox and I get the following output from my test case: 2003-10-21 ...

45. N + 1 Query Problem    forum.hibernate.org

How do I avoid generating N+1 queries in Hibernate? I am using a simple entity with no relationships. I want to find all Users for a password expiry date <= a given date. I am using P6Spy to check the queries generated and I find N+1 queries being fired. Here is the DAO code ------------------------- public Collection findByExpiryDate(Date edate){ ArrayList users ...

46. Query problem    forum.hibernate.org

47. HQL - Problem with very simple query    forum.hibernate.org

48. Query Problem    forum.hibernate.org

49. Query problem ?    forum.hibernate.org

50. Query problem ???    forum.hibernate.org

Hello, How can I define q query in the following condition? - I want to get a LIST of the Player with the descending order by the SUM(Team.score) ??? The following is my beans definition. Bets regards, Eric Code: Player.java ------- public void setTeams(Set teams) { this.teams = teams; } ...

51. Problems with Query interface    forum.hibernate.org

52. Having problem of executing a HQL query    forum.hibernate.org

Author Message vfonger Post subject: Having problem of executing a HQL query Posted: Mon Feb 16, 2004 11:07 am Beginner Joined: Wed Sep 10, 2003 5:32 pm Posts: 28 Hi everyone, I am having problem of executing the following HQL query: Code: select grp from com.company4.internaldatasource.database.AccGroupInfo as grp inner join grp.getAccUsers as usr where usr.usrLname like 'V%' Everytime I ...

53. Problem with Query interface    forum.hibernate.org

String findAuctionInfo = "from Person as person where person.AUCTID = :auctionId"; Query query = sess.createQuery(findAuctionInfo); query.setString("auctionId", auctionId);// some id List list = query.list(); // I checked this line in debug mode. I have 500 people in database for this id with FNAME and LNAME. But my list has all 500 Person objects with "Dorothy", "Advins". This is the first record. FNAME ...

54. Order by problem in HQL    forum.hibernate.org

55. query problem with many-to-many    forum.hibernate.org

56. one-to-one n+1 SQL query problem    forum.hibernate.org

Is this 'left join fetch' supposed to work with 'key-many-to-one' relationships ? It seems not. I also have this problem about n+1 SQL queries. I tried to activate the proxies, but nothing changed. A solution would be to use a different PK, and change the 'key-many-to-one' to a more simple 'many-to-one' relationship. (I wouldn't like this solution, since the db model ...

57. HQL query problem    forum.hibernate.org

Newbie Joined: Wed Feb 11, 2004 12:03 pm Posts: 15 Hello, i'm trying to do a standard HQL query but I couldn't succeed... I checked again and again the code and there is nothing different from the exemples i've read ! Could someone check and say what he thinks of it please ? ^^; here is the code : Code: public ...

58. query with order by and setMaxRows() - problem    forum.hibernate.org

Hello, When I use 'order by' in query with setMaxRows (and setFirstResult) I have error in Oracle I don't know which query hibernate send to Oracle, because Hibernate write query after do statement - when statement fail query don't logged I have this test : public void testMaxRows () { String query = "from AdmSnpeRoles entity where entity.id like '%' order ...

59. Problem with hibernate query    forum.hibernate.org

Dear everyone, i have problem with my hibernate query. This is the code ; String sql = "SELECT message.MESSAGE_TEXT, message.MESSAGE_ID FROM MESSAGES message ORDER BY message.MESSAGE_TEXT Asc where {message.MESSAGE_ID} = :messId"; List messages = sess.createSQLQuery(sql, "message", Message.class) .setLong("messId", 3) .list(); trans.commit(); it produce this error in the Jboss console : WARN - SQL Error: 0, SQLState: null ERROR - No such ...

60. Problems with (simple?) query.    forum.hibernate.org

My model has a two 1 to n relations: ordergroup 1-n order 1-n orderline these relations are bidirectional, cascade=all-delete-orphan I need a query to find all ordergroups where the total price exceeds a given amount. In regular SQL I would do something along these lines: (ignoring the fact that MySQL 4.0 doesn't support this nesting) select * from ordergroup where id ...

61. Problem with query on one-to-one    forum.hibernate.org

62. Problem with query (again)    forum.hibernate.org

2.1.3:

63. Problem with query    forum.hibernate.org

64. HQL Query problems    forum.hibernate.org

Newbie Joined: Fri Jul 16, 2004 2:18 am Posts: 5 Im having some trouble with hibernate collections in constructing and returning a HQL Query I am attempting to select all transaction objects that are related to a particular market the HQL Query I am using is "from Transaction c where elements(c.purchases).product.productGroup.market.id = 2" [without the surrounding quotes] however when I attempt ...

65. Maybe a n+1 select problem    forum.hibernate.org

66. order-by problems    forum.hibernate.org

Newbie Joined: Mon Nov 22, 2004 11:41 am Posts: 8 Hi, I am having a problem using order-by on as400. I have used it previously in other mapping files, no problem, but for some reason hibernate seems to be using the wrong field name in the order-by. It looks as if it is giving the result field a new name in ...

67. Problem querying for items stored in a hashmap    forum.hibernate.org

Greetings everyone. I'm at a loss right now as I'm stuck trying to query for a contact with a given phone number. I would think it's a pretty simple query but I'm stumped. I have a class called Contact that has a hash map for the various phone numbers the contact can have. The key in the hash map is an ...

68. Problem with eager queries?    forum.hibernate.org

[b]Hibernate version:[/b] 2.1.6 I have to use psuedo code to express my problem since I'm using spring and our own framework. I've set the hibernate property hibernate.cache.use_query_cache to true. I've set the setCacheable to true for Criteria object for me get and getEager routines. Here is my calling code. The only difference between getEager and get is that for getEager we ...

69. Problems with a Query    forum.hibernate.org

Hello people, I'm prblem with my query. I have execute the query not sucess: "FROM com.se.test.bo.Employer as obj where obj.cdUser = 10 and obj.idUser = 20" Note, propoerties cdUser and idUser are part of the class father User which the Employer class is derived. The stack error is: The number name 'com.se.test.bo.' contains more than the maximum number of prefixes. The ...

70. Problem while executing SQL query.    forum.hibernate.org

Hi, I have a class mapped to a table. To specify columns for the properties, i am using alias names that i ll be giving in query. I am getting the following SQL exception when i am trying to execute. Can somebody please help me out. Pleaaaaaseeeeee..... Hibernate version:2.1.7 Mapping documents: ...

71. many-to-many criteria query problem    forum.hibernate.org

72. Problem with HQL query    forum.hibernate.org

73. Complicated Hql query problem.    forum.hibernate.org

Hi. I need to implement searching in product catalog. For example I have 2 classes: class Category { public int Id; public Category Parent; public String Name; public IList ChildCategories; } class Product { public int Id; public String Name; public Category Category; } How to retrieve products in category which id I know and products in all child categories with ...

74. Problems with Query by Criteria and Many-to-One    forum.hibernate.org

When I try to define a query by criteria on an object with a many to one relationship, it throws an IllegalArgumentException on the referred to object. Anyone have any ideas on what is causing this? When I change to using HQL instead, it seems to all work correctly. Many thanks for any help. Ben Version: Hibernate 3 (Not RC1) Request ...

75. Query problem    forum.hibernate.org

76. Problem ordering-by a many to one    forum.hibernate.org

Hi, I'm using hibernate 2.1.7 and i've got some problems ordering a table. This is my mapping: ... I need to get all users, ordered by fullName, which is a Client field So, i do : ...

77. Query problem    forum.hibernate.org

Hello, I am using hibernate 2.1.8 on a client/server architecture. When I do a querie for some Objects these objects contain a set with other objects. Now when I look wich type the Set is it is of the type net.sf.hibernate.collection.Set. Is it posible to make the type java.util.Set else I have to distribuite te hibernate package with the client. The ...

78. Problem in Query formation    forum.hibernate.org

79. Order by problem on sql-query    forum.hibernate.org

Hibernate version: 3.0 Name and version of the database you are using: Oracle 8.1.7 Mapping documents:

80. I18N problem in Query    forum.hibernate.org

Hello, I have a Netbeans 4.1 RC2 project with many source files. When I use UTF-8 encoding do I have to convert all files? Is it possible (in the future) that the Hibernate 3 (like Hibernate 2) uses a the system encoding settings and uses eg.: ISO-8859-2 or "central european windows (1250?)" encoding, so I don't have to convert files :( ...

81. PROBLEM in using HQL select new construct    forum.hibernate.org

Hi I am trying to use typesafe Java object in HQL QUERY: (Session) getHibernateSession()).createQuery("select new IssueTracker(d.documentID, dq.queryDesc) from Document d, DocumentQuery dq where d.documentID = dq.documentID"); i created a class IssueTracker having constructor : IssueTracker(Long docID, String desc) but when i run the query I am getting the exception : net.sf.hibernate.QueryException: class not found: IssueTracker [select new Issue Tracker(d.documentID, dq.queryDesc) from ...

82. Problem with 'Order By'    forum.hibernate.org

Need help with Hibernate? Read this first: http://www.hibernate.org/ForumMailingli ... AskForHelp [b]Hibernate version:3.0[/b] [b]Mapping documents:[/b] [b]Code between sessionFactory.openSession() and session.close(): session = HibernateUtil.currentSession(); session.connection().setAutoCommit(true); Query query = session.createQuery("FROM User u WHERE u.isDeleted = :isDeleted ORDER BY u.name"); query.setParameter("isDeleted", new Boolean(false)); Iterator iterate = query.list().iterator(); while (iterate.hasNext()) { User user = (User)iterate.next(); System.out.println("userName: " + user.getName()); } [/b] [b]Full stack trace of any ...

83. problems seting up many-to-many.... too many queries    forum.hibernate.org

Author Message zwollner Post subject: problems seting up many-to-many.... too many queries Posted: Mon Jun 06, 2005 2:04 pm Newbie Joined: Mon Jun 06, 2005 12:51 pm Posts: 16 Hibernate version: 2.1.7 Database you are using: AS400 I have all my many-to-many relationships setup using two one-to-many's, with an association table, also I'm using surragote keys throughout my database. ...

84. Problem doing a simple query    forum.hibernate.org

Beginner Joined: Wed Jun 15, 2005 2:00 pm Posts: 38 Need help with Hibernate? Read this first: http://www.hibernate.org/ForumMailingli ... AskForHelp Hibernate version: 3.0.5 Mapping documents: Code: ...

85. Scalar queries problem    forum.hibernate.org

The following code comes from the section "9.3.1. Scalar queries" in the Hibernate documentaion Iterator results = sess.iterate( "select cat.color, min(cat.birthdate), count(cat) from Cat cat " + "group by cat.color" ); while ( results.hasNext() ) { Object[] row = results.next(); Color type = (Color) row[0]; Date oldest = (Date) row[1]; Integer count = (Integer) row[2]; ..... } When I put this ...

86. problem with complicated query    forum.hibernate.org

I need to execute a complicated query as below -- select a.covno, a.covdesc, b.limitsno from Coverage a, Policycoverage b where policyno = :policyno and customerno = :customerno and a.covno = b.coverage.covno union select covno, covdesc, null from Coverage where covno not in (select c.covno from Coverage c, Policycoverage d where c.covno = d.coverage.covno and d.policyinfo.policyno = :policyno and d.customerno = :customerno) ...

87. Indiscriminate query problem    forum.hibernate.org

Hello I've run into a snag. It's not clear to me if it's a problem with Hibernate or a problem with the way I'm using it. Essentially Hibernate is not using the discriminator where I would expect it to. Vital stats: Hibernate Version 2.1.8 DB: Oracle 9 (thin driver) Here is the mapping for our Test type. Test is abstract with ...

88. hibernate query problem    forum.hibernate.org

was quite happy cause hibernate successfully mapped my class to the db when i tried to execute a query and got a sql invalid column name error!! but im sure i mapped the class's field to the correct column name this is the query: from fuckthegest.model.PropostaOrdine as po where po.cmp = :cmp and po.prg = :prg ...

89. Strange problem with a simple query    forum.hibernate.org

Hello everybody. I'm using Hibernate in my proyect, and till now it has been working perfectly. But now, I have a problem doing a simple query. I have three mapped classes, called TOPlanos, TOPlanosGMS and TOPlanosSAP, where TOPlanos has a one-to-one relation wich each one. TOPlanos has a property called idOrdenTrabajo and I need to find all TOPlanos for a given ...

90. Problem with sql-query    forum.hibernate.org

I have a SQL query that returns several columns, i.e. instead of Code: from com.business.sem.Statistics where ... I have Code: select column1, column2 from Table. When I specify , Hibernate complains that there's noi persistent entity called myValueObject. As a result, query.list() always returns empty collection. What I want is: 1. ...

91. Hibernate 3.0.5 querying encoding problem    forum.hibernate.org

Greetings, i am curently upgrading an application from hibernate 2 to hibernate 3. Everything was ok until i tried to query the database using greek characters (iso-8859-7 encoding). Although it works fine under hibernate 2 i do not get any results under hibernate 3. Can someone point out whether i have to do something first (parameter etc) ? Thank you very ...

92. Problem with a simple query    forum.hibernate.org

Author Message jcfreire Post subject: Problem with a simple query Posted: Thu Aug 04, 2005 6:41 pm Newbie Joined: Thu Aug 04, 2005 5:34 pm Posts: 5 Hi, I started the development of a new project and I intend to use Hibernate to ORM. After read the Bauer and King book and tried some tutorials I started my development. ...

93. Ordering problem    forum.hibernate.org

Hello developers, I have an object, lets say `Parent`. In this Parent I have a lazy `Set` of `Child` objects. `Child` object has a field `ChildName`. `ChildName` has a field `name`. I would like to get `Parents` (using Criteria) and order their `Children` by their `ChildName.name`. How to do it? Mapping Set only allows to order-by column, so ie. by `Child.name`, ...

94. Problem with German Umlaute in Query    forum.hibernate.org

95. Problems with SQL-Query    forum.hibernate.org

Hi! I'm developing the FAQ component in an e-learning application using Hibernate 3. In the mapping XML-file I've a class tag - mapping the Java object FaqSubject to the table faq_subject. Later in the same file I've created a sql-query returning FaqSubject. The problem is that I get a SQLException and it complains about a ".". Do you have an idea ...

96. A query problem    forum.hibernate.org

97. Order problem with upper- and lowercase letters    forum.hibernate.org

98. Hibernate Query Problem    forum.hibernate.org

Author Message sam74 Post subject: Hibernate Query Problem Posted: Tue Dec 06, 2005 2:02 pm Newbie Joined: Wed Nov 02, 2005 2:03 pm Posts: 15 Hi All, I am using Spring and Hibernate 3 with oracle 9i. I am getting following exception Code: org.hibernate.HibernateException: More than one row with the given identifier was found: 1131506, for class: edu.umich.med.pbs.domain.model.Task ...

99. HQL query problems    forum.hibernate.org

I have an employee class with a collection of address an address as a TEALookup as a component. The TEALookup class has two properties an Integer and a Date. I just want a list of all of the employee ids where the Integer = a certain value. I have tried serveral diffrent queries without any luck. This is the one I ...

100. Problem with Query and Informix query optimizer    forum.hibernate.org

Author Message jtoselli Post subject: Problem with Query and Informix query optimizer Posted: Fri Dec 23, 2005 3:08 pm Newbie Joined: Fri Dec 23, 2005 1:18 pm Posts: 7 Need help with Hibernate? Read this first: http://www.hibernate.org/ForumMailingli ... AskForHelp Hibernate version: Hibernate 2.1.8 Code between sessionFactory.openSession() and session.close(): Transaction t = session.beginTransaction(); Session session = HibernateSessionFactory.currentSession(); Criteria criterios = ...