List 9 « Map « JPA Q&A





1. how do i generate a list using hibernate? (currently stuck)    forum.hibernate.org

Hibernate 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.org

Hibernate 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.org

I 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.org

I 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.org

After 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.org

When 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 getDetails() { return details; } Hibernate manage this relation automatically by populating the DiscountGroup_DiscountDetail table. If I add a new item to the collection the update ...

8. getNamedQuery issue with not in restriction when list is IN    forum.hibernate.org

Beginner 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.org

I 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.     forum.hibernate.org

Yah, thats true. But the thing is that I am porting an existing Business app onto hibernate. So I cannot change existing interface in those class, I can only do whatever in xml and databases. So the API still remains like this : Code: Speaker[] speakers; ... void setSpeakers(Speaker[] speakers ) { this.speakers = speakers; } Speaker[] ...

11. Unknown column 'gamechess0_.playerBlack' in 'field list'    forum.hibernate.org

Hi, 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.org

Hi 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.org

Newbie 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.org

Hi, 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.org

don'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.org

Author 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.org

Hi 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.org

Hi, 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

In this example the String idPriority is the primary key. It is labeled "assigned" meaning that the java code will generate it. That makes ...

22. Efficiency on Collections or List    forum.hibernate.org

23. Efficiency on Collections or List    forum.hibernate.org

I'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.org

I 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.org

my demo hbm: this hbm don't set "cascade" property, so it's "none" ....... Customer tom = new Customer(); tom.addPhone("1"); tom.addPhone("2"); ..... session.merge(tom); ...... I think this just save tom in Customer ...

26. one-many bi-dir using List. idx is null in table.    forum.hibernate.org

I 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.org

Hibernate 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.org

i have a persistent object which has a set mapped to it. the mapping looks something like this: MYSCHEMA.N_COLLECTION_ID_COUNTER this works well. the problem i'm facing is i need a ...

30. List Index not saved with Hibernate 3.1    forum.hibernate.org

Newbie 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.org

I 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.org

I'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.org

I'm trying to run example from Hibernate reference: Customer/Order/Product. Mapping is this: In table Order I have one order and in table line_items I have one lineItem for this Order. But, ...

35. Generated SQL returns reulsts but list is empty    forum.hibernate.org

Mikee805 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.org

Hi, 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.org

Hi, 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.org

Hi 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.org

Hi, 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.org

Hibernate 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.org

That 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.org

Author 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: Code between ...

43. many-to-may list indexes not updated    forum.hibernate.org

Hello all, I have a many-to-may relationship defined as: When I insert an Employee into the Employer's employee list, the employee list index is updated but not the employee's employer list. My code automatically insert the ...

44. Invalid SQL with dynamic list of values passed to in clause    forum.hibernate.org

Page 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.org

Newbie 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: student_seq

46. Changing the order of items in an indexed list.    forum.hibernate.org

Hibernate version: 3.1.3 Mapping documents: Code: ...

47. @ManyToOne with @IndexColumn. Deleting from the List    forum.hibernate.org

I 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

getSubMenus() { if (subMenus == null) ...

48. Query returns list of null references (No PK columns in DB)    forum.hibernate.org

Problem 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.org

Looks like you need to use an entity in the , and the entity would have just an , optionally a back to your existing (parent) entity, and the that you need. I tried figuring out what the DB schema that implements your initial idea would look like, and I don't think that it's possible. You need a table ...

50. new list(mother, offspr, mate.name)??    forum.hibernate.org

51. Null entities if list-index not sequential?    forum.hibernate.org

53. SQLQuery: list has right number of entries, but all are null    forum.hibernate.org

Hi, 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.org

Hibernate 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.org

Newbie 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.org

Having 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.org

Name 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.org

Hi 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 ...

60. object with joined collection is in return list many times    forum.hibernate.org

Hello 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.org

If 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 however with the list it creates a index_column in your database. You can avoid that by using in your mapping which is just an un-indexed list. There are slight ...

62. how to get a list String objects using sql-query    forum.hibernate.org

Hi, 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. Here is it neccessary to create the Object and mapping xml to get the list of String. ? Are there any other solutions? Please ...

63. Feature Request. List getPropertyAnnotatio    forum.hibernate.org

66. Query.list() doesn't see newly-inserted data    forum.hibernate.org

Hibernate 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.org

I 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.org

Either 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.org

Hello! 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.org

Newbie 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.org

Ah, 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.org

Hi 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.org

Hi 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 where rdl.deal_date = blah blah But now I want to do something like this select rdl.deal_date from where blah blah but this fails with the following error *********************** No ...

75. Mapping a many-to-many relationship using lists    forum.hibernate.org

I'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.org

Greetings, 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

79. Retrieving a list of Blobs    forum.hibernate.org

Dear 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.org

Hi, 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.org

Hibernate3.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

86. size of query.list() timeout    forum.hibernate.org

87.  - does a DB versus in-memory ordering happen?    forum.hibernate.org

Mapping: One-Many Side: Many-One Side: When i traverse the association, i.e. client.getPreferredCommunicationModes() here is my observation: The SQL fired on fetching the List is of this nature: Hibernate: select prefferedc0_.CUSTOMER_ID as CUSTOMER4_1_, prefferedc0_.CUSTOMER_PREF_COMMN_MODE_ID as CUSTOMER1_1_, prefferedc0_.PRIORITY as PRIORITY1_, prefferedc0_.CUSTOMER_PREF_COMMN_MODE_ID as ...

88. Realtion 1--N .. take a list of subset element    forum.hibernate.org

89. Memory scalability when using list() and EHCache    forum.hibernate.org

VT_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 collection mapping. Unable to dele    forum.hibernate.org

Newbie Joined: Fri Sep 15, 2006 11:00 am Posts: 1 Issue Description: I am able to persist a PersistentQueue obj that contains a list of PersistentMessages. I am unable to remove a Message from the PersistentQueue obj and call .saveOrUpdate(PersistentQueue obj). View relevant details below. Also are there better examples of using bi-derectional indexed collection which include the mapping file (And ...

91. Lazy and List mapping, no session or session was closed    forum.hibernate.org

Hibernate 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.org

Could 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 ...

94. filter retrieved associate list    forum.hibernate.org

Hi! 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.org

Hibernate 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.org

Ive got Clients and Books. Clients have a list of Books which they are "borrowing". This is a with a join table (mappings below). I've got an index (=IDX) column to manage the list index. Something very wierd is happening when remove Books from a Client: Say I add 4 books to the Clients List. I can then successfully remove ...

97. Query.list() returns one item which is null    forum.hibernate.org

Author 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.org

I am using hibernate 3.1 jar. My mapping file is as follows: GME_SEQ_QUEST_ELEMENT_ID ...

99. List all Cats which does not have any white kitten    forum.hibernate.org

Thanks 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.org

Hi, 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: ...