1. how do i generate a list using hibernate? (currently stuck) forum.hibernate.orgHibernate version: 3.1.2 First post here, so please tell me if i'm not tuned in to the forum's culture.. (and english isn't my first language, so glaring grammatical errors are possible) my problem is: i'm trying to generate a class with a "List" element, but keep getting error messages from the IDE i use (jboss 1.5, eclipse 3.1.1): code: Code: |
2. NPE when calling query.list() in AbstractEntityTuplizer forum.hibernate.orgHibernate version: 3.1.2 Mapping documents: [many] Code between sessionFactory.openSession() and session.close(): query = session.createQuery( "select distinct(t.journal) from Toc as t" ); List resources = query.list(); Full stack trace of any exception that occurs: Exception in thread "main" java.lang.NullPointerException at org.hibernate.tuple.AbstractEntityTuplizer.createProxy(AbstractEntityTuplizer.java:372) at org.hibernate.persister.entity.AbstractEntityPersister.createProxy(AbstractEntityPersister.java:3121) at org.hibernate.event.def.DefaultLoadEventListener.createProxyIfNecessary(DefaultLoadEventListener.java:232) at org.hibernate.event.def.DefaultLoadEventListener.proxyOrLoad(DefaultLoadEventListener.java:173) at org.hibernate.event.def.DefaultLoadEventListener.onLoad(DefaultLoadEventListener.java:87) at org.hibernate.impl.SessionImpl.fireLoad(SessionImpl.java:891) at org.hibernate.impl.SessionImpl.internalLoad(SessionImpl.java:859) at org.hibernate.type.EntityType.resolveIdentifier(EntityType.java:266) at org.hibernate.type.EntityType.resolve(EntityType.java:303) at org.hibernate.engine.TwoPhaseLoad.initializeEntity(TwoPhaseLoad.java:113) at org.hibernate.loader.Loader.initializeEntitiesAndCollections(Loader.java:842) at ... |
3. named parameter binding for list indices? forum.hibernate.orgI have a question concerning the upgrade from hibernate 2.1.8 to 3.1.2 with respect to the binding of named parameters. I have a query of the following form in my java code: Query q = session.createQuery( "select cat from foo.Cat cat, foo.CatList catList" + "where catList.id=:listId and catList.cats[:listPosition] = cat" } q.setInteger("listPosition", position); q.setLong("listId", id.longValue()); return (Cat) q.uniqueResult() There is a ... |
4. Exception in list() function forum.hibernate.orgI just want to read some record from the Database. But I get a "could not execute query" exception. Is it cause of MS Access or what is wrong with my code? The exception is thrown bei the list() function. Hibernate version: 3.1.2 Mapping documents: Code: public class TestCase implements Serializable { private String TestCaseID; ... |
5. Specified join fetching, but owner not in select list. forum.hibernate.orgAfter upgrading to Hibernate 3.1.2 from 3.0 some of our HQL queries fails with an exception saying that query specified join fetching, but the owner of the fetched association was not present in the select list Can anyone tell me what this message means? One of he failing queries is included below. Kind regards Claus Nielsen Hibernate version: 3.1.2 (Partial) Mapping ... |
6. reordering collection (list) forum.hibernate.orgWhen trying to reorder a List, I have the following error : org.hibernate.exception.ConstraintViolationException: could not update collection rows: [com.netappsid.erp.server.bo.base.BaseDiscountGroup.details#3] Here is a simple mapping of what I got : @IndexColumn(name="sequence") @Cascade(org.hibernate.annotations.CascadeType.DELETE_ORPHAN) @OneToMany(fetch=FetchType.LAZY, cascade={CascadeType.ALL}) public List |
7. Wrap a native query result into a list of maps. forum.hibernate.org |
8. getNamedQuery issue with not in restriction when list is IN forum.hibernate.orgBeginner Joined: Tue Aug 09, 2005 1:34 am Posts: 26 Location: Bangalore Hi, I am trying to execute a query which I wrote in my .hbm.xml in which I am passing 2 input parameters 1 String and 2nd one an Object array. When I try to run the the query missing in or out parameter for the 2nd argument in the ... |
9. Using Query.list() will close connection? forum.hibernate.orgI am trying to do a summation computation with results retrieved from the database and storing that result back in the database on a different table. I am not using any transaction to handle my connections and am manually setting the session and connection properties. Below are the summary of the codes for that method: Code: if (session != null) { ... |
10. |
11. Unknown column 'gamechess0_.playerBlack' in 'field list' forum.hibernate.orgHi, I hope you can help, I really don't understand why I'm getting the following error Code: 0 [main] ERROR org.hibernate.util.JDBCExceptionReporter - Unknown column 'gamechess0_.playerBlack' in 'field list' Hibernate version: 3.1 MySQL Version: 4.1.10a My User object Mapping: Code: |
12. Criteria.list() returns the same records twice forum.hibernate.org |
13. Watch out for non-deep copy when Hibernate processes List forum.hibernate.orgHi there, here's a solution to a problem I was having that cost me a couple of days. I'm just sticking it here since it could help others in the future. Basically, I have a class containing a List of children objects. This is a uni-directional one-to-many (parent/child) relationship. This simple relationship appears to be configured properly but hibernate was never ... |
14. null pointer exception when calling criteria.list() forum.hibernate.orgNewbie Joined: Mon Mar 20, 2006 6:42 pm Posts: 2 Hi I am new to Hibernate and trying to debug a colleagues code. I am geting a null pointer exception, as detailed below, the first time a query is activated via the front end. If I click back on the browser and re-initiate the code, then the query works and the ... |
15. How to return a List with different criterion? forum.hibernate.orgHi, I currently have a Java class which defines an order table and all order_lines (another table sorted by a sequence, and color) for that table. I use a Java List to return all of the order_lines rows and use the List index values as a reference. I need to make sure these index values remain constant even though new rows ... |
16. how to sort a list by size of associated collect object forum.hibernate.orgdon't know how to do it in Criteria off hand, but here is an SQLQuery by example: Code: SQLQuery q=sess.createSQLQuery("select {Person.*},count(a.address_id) cnt " + " from SAMPLE1_PERSON Person, Sample1_ADDRESS a" + ... |
17. Bidirectional (list) 1-to-many association not working forum.hibernate.orgAuthor Message michael.c.smith Post subject: Bidirectional (list) 1-to-many association not working Posted: Sun Mar 26, 2006 3:25 am Newbie Joined: Sat Mar 25, 2006 10:29 pm Posts: 2 I'm trying to get a bidirectional, 1-to-many (list) association working. When I try to add the child object to the parent's list, the generated SQL fails, as the foreign key (and ... |
18. Mapping Lists forum.hibernate.orgHi there Im tring to map a list to a recordset that is returned from a SELECT statement but cant quite seem to get it. Esentially all I tring to do is create an new class for each unique QuestionID, create a new object called DefinedAnswers for each associated AnswereID and then add DefinedAnswer object to a List contaied within the ... |
19. Passing a collection (List) to a Oracle Stored Procedure. forum.hibernate.orgHi, all. I'm using Hibernate 3.0 and I need to pass to a oracle stored procedure a collection ( List ) as a parameter. In the stored procedure I need to interate over the collection to make some inserts operations. Has anyone ever done it ? Could anyone show me an example of how to do that ? |
20. Mapping: Have a Set return a List forum.hibernate.org |
21. how to add id field to table holding just a list of Strings forum.hibernate.org |
22. Efficiency on Collections or List forum.hibernate.org |
23. Efficiency on Collections or List forum.hibernate.orgI've read the documentation of hibernate and I found this: "Sometimes we need to ensure that a proxy or collection is initialized before closing the Session. Of course, we can alway force initialization by calling cat.getSex() or cat.getKittens().size(), for example. " My questions are: 0. From the above statement, does it means when I call load(SomeClass.class) to get all data even ... |
24. Does Criteria.setMaxResults().list() alter JDBC connection? forum.hibernate.orgI am wondering if the Criteria.setFirstResult() and Criteria.setMaxResults() manipulate the JDBC connection through the drivers to return the results? And, if so, whether it happens on the Database side or the Application server. This is why I ask. There are three parts to retrieving a query. The query must execute, the records must be retrieved (still on database side), and then ... |
25. hibernate list collection cascade auto? forum.hibernate.orgmy demo hbm: |
26. one-many bi-dir using List. idx is null in table. forum.hibernate.orgI have a class Test4 which owns a collection of Test5's. The collection is implemented as a List. The Test5 class also has a reference back to Test4 so this is a bi-directional one-many association. When I save an instance of Test4 it saves fine, as do the instances of Test5 in it's collection, but the idx column in the table ... |
27. session.createCriteria ...list() return wrong result forum.hibernate.org |
28. Help needed declaring a list that contains subclasses forum.hibernate.orgHibernate version: 3.1 Due to some excellent help from a forum member I was able to define a class containing a subclass that contains a list of the class: Code: |
29. querying for the size of lists and sets forum.hibernate.orgi have a persistent object which has a set mapped to it. the mapping looks something like this: |
30. List Index not saved with Hibernate 3.1 forum.hibernate.orgNewbie Joined: Thu Apr 06, 2006 6:08 pm Posts: 1 I am having a problem creating a simple one-to-many association using List. I've simplified the problem down to the basics. I have 2 objects Product and Image. Products can have a list of images. When I insert a new product containing a List of images (in this example, only 1), the ... |
31. List contains null-pointers forum.hibernate.orgI haven't got much experience with Hibernate, I just started with it last weekend for a school project. I already managed to do some things but there's just one thing I can't get to work. One of the classes I use contains a list (it actually contains 2 collections). When Hibernate loads those lists, the lists contain all necessary objects, but ... |
32. trouble retrieving list with hibernate forum.hibernate.orgI've completed the mapping,config and pojos everything looks fine untill i try to save datas into the table, but then when i run the createQuery and try to retrieve datas back from the table it for some reason updates record from the primary table and deletes records from the other table mapped to it. The table structure, primary table mapped to ... |
33. List of List forum.hibernate.org |
34. First row of the list is null always.... forum.hibernate.orgI'm trying to run example from Hibernate reference: Customer/Order/Product. Mapping is this: |
35. Generated SQL returns reulsts but list is empty forum.hibernate.orgMikee805 wrote: I figured it out thanks for the help. It was just a dumb mistake on my part. Hibernate 3.1.3 Mysql 4.1.2 Linux 2.6.12 I haven't been so lucky... I have yet to find my dumb mistake... --- The code: StringBuffer hql = new StringBuffer( "from mycompany.domain.pojo.Account "); hql.append( "a where a.username=:username" ); Query query = session.createQuery( hql.toString() ); query.setString( ... |
36. Transient list access becomes slow over time forum.hibernate.orgHi, I use a transient list to access array elements from an ArrayList which have been filtered by a status value. I am running some overnight tests and it seems everything runs fine in the beginning and the filtered list is returned in under 1 second. However, after several hours it starts taking about 5 seconds or longer to return the ... |
37. List access becomes slow over time forum.hibernate.orgHi, I use a list to access array elements from an ArrayList. I am running some overnight tests and it seems everything runs fine in the beginning and the list is returned in under 1 second. However, after several hours it starts taking about 5 seconds or longer to return the same list. Please note that the data that is being ... |
38. List index datatype & SQL query forum.hibernate.orgHi all, actually I have 2 questions for an application I'm currently working on. I have a classic parent-child relation which basically works. Parent has a getChildren getter wich returns a set. Now I wanted to change this to a List. Therefore I need an index. I wanted to use a Date field (dateOfBirth) for that purpose, but could not figure ... |
39. Saving a collection of List elements in one go forum.hibernate.orgHi, I seem to be a bit confused about using Hibernate with regards to 'dehydrating' a collection (list). I think if I could get a really simple idea to work then it shouldn't be too tough to get a harder example to work. Here's a pretty simple example with two objects and two tables. house 1:* person (an house has zero, ... |
40. list vs scroll question about efficiency. forum.hibernate.orgHibernate version: 3.0 Mapping documents: none for this case Code between sessionFactory.openSession() and session.close(): Code: SQLQueryImpl theQuery = (SQLQueryImpl)session.createSQLQuery(sqlString); theQuery.addScalar("startdate", Hibernate.TIMESTAMP) .addScalar("enddate", Hibernate.TIMESTAMP) ... |
41. Cache problem with updatin a list of objects forum.hibernate.orgThat looks like a symptom of accidentally using long sessions. Are you creating a new hiberante session for every web request? And are you closing the hibernate session at the end of the request? You have to either do that, or (if you're deliberately using long sessions) set a short expiry time on your cache. Check your cache's documentation for info ... |
42. Custom List Null Checks and UserCollectionTypes forum.hibernate.orgAuthor Message cyboc Post subject: Custom List Null Checks and UserCollectionTypes Posted: Mon May 29, 2006 7:39 pm Beginner Joined: Fri Apr 15, 2005 3:08 pm Posts: 26 Need help with Hibernate? Read this first: http://www.hibernate.org/ForumMailingli ... AskForHelp Hibernate version: 3.1.3 Mapping documents: Relevent portion: |
43. many-to-may list indexes not updated forum.hibernate.orgHello all, I have a many-to-may relationship defined as: |
44. Invalid SQL with dynamic list of values passed to in clause forum.hibernate.orgPage 1 of 1 [ 1 post ] Previous topic | Next topic Author Message dhannum Post subject: Invalid SQL with dynamic list of values passed to in clause Posted: Wed May 31, 2006 12:56 pm Newbie Joined: Wed May 31, 2006 11:17 am Posts: 15 The issue I'm seeing is ... |
45. PK Constraint Violated By many-to-many mapped with List forum.hibernate.orgNewbie Joined: Fri Nov 18, 2005 12:24 pm Posts: 8 Need help with Hibernate? Read this first: http://www.hibernate.org/ForumMailingli ... AskForHelp Hibernate version: 3.1.3 Mapping documents: |
46. Changing the order of items in an indexed list. forum.hibernate.orgHibernate version: 3.1.3 Mapping documents: Code: |
47. @ManyToOne with @IndexColumn. Deleting from the List forum.hibernate.orgI have a Menu entity, which has a ManyToOne relationship with itself. That is a Menu has sub menus. So I have Code: @OneToMany(cascade=CascadeType.ALL, fetch=FetchType.EAGER) @IndexColumn(name="submenuIndex") public List |
48. Query returns list of null references (No PK columns in DB) forum.hibernate.orgProblem is as follows: I have a legacy oracle db structure (that may not be changed). All the relevant tables do not have PK's and all the tables' are nullable (don't know if that's relevant). I want to use Hibernate as a simple read-only facade to the database. When I use the hibernatetools (eclipse plugin) to generate code, i get sensible ... |
49. How to map a Map of Lists of entities? forum.hibernate.orgLooks like you need to use an entity in the |
50. new list(mother, offspr, mate.name)?? forum.hibernate.org |
51. Null entities if list-index not sequential? forum.hibernate.org |
52. Tree structures and lists containing multiple types forum.hibernate.org |
53. SQLQuery: list has right number of entries, but all are null forum.hibernate.orgHi, I am attempting to use a SQLQuery to read from a view. The problem is that while the result list contains the right number of entries, all of them are null. It's as if the class that is being bound to is not being instantiated. For example, if there are 35 rows that match the query in the database, the ... |
54. Mapping a list containing an object :PropertyAccessException forum.hibernate.orgHibernate 3.2.CR2 MySQL 5.0 / InnoDB A RescueCenter contains 0...* Pet objects. A Pet contains a note:String and data:PetData. I'm at a lost of how to fix the mapping exception. Any help would be much appreciated!! -------------- BEANS -------------- public class RescueCenter { private Integer idRescueCenter; // ArrayList of Pet objects private ArrayList pets = new ArrayList(); public ArrayList getPets() { ... |
55. Method list() of Class Query is very slow!!! forum.hibernate.orgNewbie Joined: Wed Jun 28, 2006 4:45 pm Posts: 3 Hi, I am having a pretty weird situation here. I am using Hibernate 3.1.3 with Sybase 12. When I run a query returned by the "show_sql = true" parameter on a Sybase app like SQLAdvantage, the results are immediate, and it returns me 46 lines, however, through Hibernate, when I use ... |
56. Deleting from a List and Update the index column forum.hibernate.orgHaving a problem with List when deleting due to LIST-INDEX. How can I regenerate the LIST-INDEX column in the DB tables after deleting? So I was able to map a parent object and children objects using uni-directiona mapping. I used List for my collection and thus, as per the documentation created a list-index column. All is well, CREATING, UPDATING, and RETRIEVING ... |
57. Combination of Classes and Display from List How? forum.hibernate.orgName and version of the database you are using: MSSQL2000 The generated SQL (show_sql=true): Hi, I have 3 tables in MSSQL Database. 1. Auditfinding 2. AuditfindingsDisplayName 3. AuditFindingsFieldList Fine. I have Created Mapping Files And Java Bean files(Using getter and setter methods) My Hibernate Query is Working Perfectly. My Query is: select distinct Id as AuditId,substring(substring(CustomIssueField, patindex('%data_27="%',CustomIssueField)+9 ,len(CustomIssueField)),1,patindex('%"%',substring(CustomIssueField, patindex('%data_27="%',CustomIssueField)+9 ,len(CustomIssueField)))-1) as ... |
58. object is in return list more than once forum.hibernate.orgHi i have next query : select doctor from Doctor doctor left join fetch doctor.contactdoctorSet c where doctor.specialization in (:specialization) when doctor have more than one contact, he is in return list just as many times as contacts occurences. I thougth that join fetch only initialize collection and didn't really create join. This is problem for me because when i want ... |
59. Possible to exclude the index column in a list collection? forum.hibernate.org |
60. object with joined collection is in return list many times forum.hibernate.orgHello I have a two objects Doctor and Contact to doctor. Doctor can have more than one Contact. i have select like this select doctor from Doctor doctor left join fetch doctor.contactdoctorSet where doctor.specialization in (:specialization) When doctor1 have three contacts it returns three rows with the same doctor1 like this, than other doctors with one contact only once: [doctor1] [doctor1] ... |
61. Mapping collections as Set ot as List forum.hibernate.orgIf I am not mistaken you can use a java.ult.List contactdoctorSet (or perhaps contactdoctorList) but then your mapping would change too and would probably need to be |
62. how to get a list String objects using sql-query forum.hibernate.orgHi, Below one is my query. This will return the list of "univid" , I mean list of string objects. But I am not to get as list of String objects, without using class attribute in |
63. Feature Request. List |
64. scroll() does not fill a one-to-many rel. as list() does forum.hibernate.org |
65. Syntax for Select Distinct with "new list" or &quo forum.hibernate.org |
66. Query.list() doesn't see newly-inserted data forum.hibernate.orgHibernate version: 3.1.3 Code between sessionFactory.openSession() and session.close(): Asset asset = new Asset(); asset.setAttribute("abc"); session.save(asset); String hql = "from Asset as asset where asset.attribute=?"; List assets = session.createQuery(hql).setParameters(new String[] { "abc" }, new Type[] { new StringType() }).list(); Iterator it = assets.iterator(); if (it.hasNext()) { Asset a = (Asset)it.next(); System.out.println(a.getAttribute()); } else { throw new IllegalStateException("no data"); } Name and version ... |
67. Sort With Column And List Mapping forum.hibernate.orgI have two tables. Both tables are entities. (see below) Anyway, I have a one-to-many from att_option_group to att_option. There si a sort_order on the att_option table. When I retrieve the current set of att_option objects, I would like to be able to put them into a list in order by the sort_order. Then I could shuffle the List, and persist ... |
68. Property Access Exception inside setter of list forum.hibernate.orgEither way, it does not matter. Having instantiated the variable (specValues) as an ArrayList, to the best of my knowledge the code that you suggest will not work. Hence I have done it the way that I have. Nonetheless, what is odd is when I am using criteria queries, I do not get the same error implying that it is may ... |
69. List problem forum.hibernate.org<% Session hibsession = null; try{ System.out.println("Listing Records.."); // This step will read hibernate.cfg.xml and prepare hibernate for use SessionFactory sessionFactory = new Configuration().configure().buildSessionFactory(); ... |
70. A novice question, listing my relations? forum.hibernate.orgHello! Wrote my first hibernateapplication taken from the reference-guide 'Introduction to Hibernate'. The relation described is many-to-many. The tables are EVENTS,PERSON_EVENT and PERSON. The examples gives you the idea on how to create an event, create a person and then link them together through PERSON_EVENT. The example does not show you how to show the events for a particular person. The ... |
71. Query.list() intermittently returns null values in List forum.hibernate.orgNewbie Joined: Sat Aug 05, 2006 2:49 am Posts: 3 I've fought posting this, since it seems like such a basic thing, but after 3 days of fighting with it, I'm not getting anywhere. Either my keywords trying to find a solution in the archives and via google are poor, or sleep deprivation is really taking it's toll. We have a ... |
72. how do query.list() use cache? forum.hibernate.orgAh, I see what you mean. Query.iterator() uses scrollable result sets if it can, allowing you to defer loading. Query.list() will load all entities that you query for, before the call to list() returns. It won't do anything special about eagerly loading associated entities: you have to write your query to do that, if that's what you need. |
73. static lists forum.hibernate.orgHi all, Here are my relationships A CONTRACT is always assigned one and only one CONTRACT_TYPE (CSA Lite, PM) A CONTRACT_TYPE is always associated with zero or more CONTRACTs The CONTRACT_TYPE is a static list which will not change overtime. The problem I am facing is that I doesnt want to SAVE the Contract_Type for every contract the user enters. however ... |
74. Select list & createSQLQuery forum.hibernate.orgHi All I am using Hibernate version2 & the createSQLQuery. The createSQLQuery works fine when i retreive all the columns from the underlying table something like this Select rdl.* from |
75. Mapping a many-to-many relationship using lists forum.hibernate.orgI'm attempting to map a bidirectional many-to-many relationship between Users and Roles using lists instead of sets to maintain the order. The relevant portions of my mapping files look like this: Code: |
76. a unidirectional one-to-many list collection forum.hibernate.orgGreetings, I have two classes: Assembly and Component. An Assembly is a collection of Components. This suggests a one-to-many mapping. The order of Components in an Assembly is important. This suggests that I want a list collection. I want to be able to ask an Assembly for its Components, but I don't need to ask a Component what Assembly it belongs ... |
77. List problem forum.hibernate.org
|
78. Find an object with a list where an element of the list=valu forum.hibernate.org |
79. Retrieving a list of Blobs forum.hibernate.orgDear all, I am new on hibernate and am currently running into trouble with the persistence of a list of blobs. I have a class BlobData wich is used as a value type in another class Project. Projekt contains a java.util.List 'blobs'. Code: public class Project implements Serializable { /** * ... |
80. Mapping Maps of Maps or Maps of Lists forum.hibernate.org |
81. Criteria#list returning no objects for non-mapped classes. forum.hibernate.orgHi, from time to time I get screwed because I create a criteria for a class which is not persistable at all (= not mapped in hibernate configuration file). The criteria creation works fine and Criteria#list just returns silently an empty list. Example: java.lang.Integer not mapped ... Criteria crit = session.createCriteria(Integer.class); crit.list(); will work without exception (returning an empty list). Is ... |
82. Get collections as List in select clause... forum.hibernate.org |
83. Hibernate List filled with nulls forum.hibernate.orgHibernate3.xx We have a many to many relationship and are using a hibernate List, the database only has one object in it but when the query is done and the list is populated it is filled with approx 10 null values as well as the one value from the database. Is this a known issue with hibernate or possibly a problem ... |
84. Deleting a list of objects... forum.hibernate.org |
85. uniqueResult and list method throw StaleObjectStateException forum.hibernate.org |
86. size of query.list() timeout forum.hibernate.org |
87. |
88. Realtion 1--N .. take a list of subset element forum.hibernate.org |
89. Memory scalability when using list() and EHCache forum.hibernate.orgVT_hokies wrote: 1. I thought about doing this and was saving it for a last resort. It will probably be what I end up doing. This is a viable approach if you only need to process the results and then move on. If you need to transmit all that data back to another piece of code or another client (that is, ... |
90. Issues using |
91. Lazy and List mapping, no session or session was closed forum.hibernate.orgHibernate version: 3.1 Mapping documents: annotations Full stack trace of any exception that occurs: GRAVE: failed to lazily initialize a collection of role: UserBean.groups, no session or session was closed org.hibernate.LazyInitializationException: failed to lazily initialize a collection of role: UserBean.groups, no session or session was closed at org.hibernate.collection.AbstractPersistentCollection.throwLazyInitializationException(AbstractPersistentCollection.java:358) at org.hibernate.collection.AbstractPersistentCollection.throwLazyInitializationExceptionIfNotConnected(AbstractPersistentCollection.java:350) at org.hibernate.collection.AbstractPersistentCollection.readSize(AbstractPersistentCollection.java:97) at org.hibernate.collection.PersistentList.size(PersistentList.java:91) at tests.UserTest.testGroup(UserTest.java:393) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown ... |
92. Problem of query.list() forum.hibernate.orgCould you please post the content of HBM file? Also not sure how you are browsing the data. It shall be done in following fashion List lst = query.list(); Iterator itr = lst.iterator(); while(itr.hasNext()){ Car car = (Car) itr.next(); CarID = car.getID(); ===> This line shall give you all content } Let me know, if I made any mistake in above ... |
93. criteria.list() is not working properly with "fetch='jo forum.hibernate.org |
94. filter retrieved associate list forum.hibernate.orgHi! Like the query says: Get contacts in the group 7 where contacts firstname = 'tony' I try this: select c from Contact c INNER JOIN Groups g on g.contacts=c and c.FirstName = 'tony' and groups.GroupId = 7 and get the error: outer or full join must be followed by path expression There must be an simple way to do this. ... |
95. Get SQL query after executing criteria.list() ? forum.hibernate.orgHibernate version:3.1.3 / Java 1.5 Hi, is it possible to get the native sql query behind a criteria ? I use Criteria API to filter a list of pojo. After filtering, I need to export data to Excel with Jasper Reports. I want to retrieve the native SQL to associate it with my report ... I tried to use the statistics ... |
96. Indexed list with association table: Removals sometimes fail forum.hibernate.orgIve got Clients and Books. Clients have a list of Books which they are "borrowing". This is a |
97. Query.list() returns one item which is null forum.hibernate.orgAuthor Message MehdiRakhshani Post subject: Query.list() returns one item which is null Posted: Fri Sep 29, 2006 8:09 am Newbie Joined: Tue Sep 05, 2006 11:11 am Posts: 11 I have a query that correctly finds one record that matches the query, but the value that is returned is null. Running the same query in sqlplus returns shows the ... |
98. all-delete-orphan fails with list :hibernate 3.1 forum.hibernate.orgI am using hibernate 3.1 jar. My mapping file is as follows: |
99. List all Cats which does not have any white kitten forum.hibernate.orgThanks a lot for your response. I think I now get the 'flow' of how to achieve this. But I am not able to make it work. I am trying this piece of code to learn a bit about this detachedcriteria and notexists concept. Each subject has a few topics. I am trying to 'subtract' all topics that belong to subjectId=1 ... |
100. How to use java.lang.Date as an index in a list forum.hibernate.orgHi, I get the folowing exception when trying to use a java.lang.Date as the indexing column for a list. Please find the mapping and exception below. Does anyone have a clue why the type is not recognized and keeps defaulding back to int? Thank you, Joost Hibernate version: 3 Mapping documents: |