List 11 « Map « JPA Q&A





1. Parent child and list    forum.hibernate.org

Hibernate version: 3.2.4.sp1 Despite (or... in consequence of..) an accurate reading of on line documentation, the book of Christian Bauer and Gavin King (2nd edition) and a long long search in the forum, i can say that.. I've nothing understood. I'm in total confusion. I have to implement a large number of parent-child structures in a web application. I need the ...

2. Map,List,Set    forum.hibernate.org

3. Auto relationship using a list    forum.hibernate.org

Hi, I have class with auto relationship represented by a list of childs in my class and represented by a parent foreign key in my database table. Is possible to do this? The informations had been saved in database but the parent foreign key and index columns are null. table: CREATE TABLE message ( id BIGINT GENERATED BY DEFAULT AS IDENTITY(START ...

4. HowTo: Save list of objects    forum.hibernate.org

5. Confusion with element.    forum.hibernate.org

I've got a problem when trying to replace with in the hbm.xml describing bi-directional relation (one-to-many). I've got a list of 8 children instead of 4 (as it should be). Half of those 8 are nulls. I'm using: hibernate-3.2.4 SP1 mysql 5 java 5 My java code: In main(): Customer load = (Customer)b.getLazySets("from persist.domain.Customer _o where _o.custId = " ...

6. Saving a List of ojbects    forum.hibernate.org

Hello, I have a Java List of 2500+ objects, is there a way to pass the List to Hibernate and have it save the entire List in 1 call, or do I have to loop through the List and save each object 1 at a time? I'm currently doing the loop but it takes a long time and am looking for ...

7. Querying a child list of strings    forum.hibernate.org

I have the following mapping. I'd like to retrieve all 'Things' which have a 'myString' within a given list of strings. What I'm basically looking for is the hql to create the following sql , where 'foo','bar' is a List parameter. select ...

8. two lists with same entity    forum.hibernate.org

Entity B has table TABLE_B and Entity A has table TABLE_A, TABLE_B has a FK to TABLE_A, so parent table has no FKs. Maybe a solution can be to subclass B as C and D and have lists of subclasses but it does not make sense to make subclass just for the sake of loading problem for me, any thoughts ? ...

9. query given list of object ids from different classes    forum.hibernate.org

I have a list of object ids - the ids are for objects that are instances of different classes, but they all inherit from AbstractElement. I want to get the AbstractElement.name property for each of these objects, but for performance reasons I do not want to iterate through the list, load the object, get the name property and put it in ...





11. Criteria.list() producing nothing on 2nd query    forum.hibernate.org

New to Hibernate and working with WSAD/Eclipse, mySQL, Tomcat, Hibernate latest version, l3po connection pooling. 1. First query works fine and produces expected result: Session session = HibernateUtil.getSessionFactory().getCurrentSession(); session.beginTransaction(); List l = new ArrayList(); try { l = session.createCriteria(Users.class) .add( Restrictions.eq("user_id", uid)) .add( Restrictions.eq("password", pw)) .list(); if (l.size() <= 0) return false; if (l.size() > 1) { System.out.println("System error"); return false; ...

12. Undocumented null-padding of lists?    forum.hibernate.org

Hibernate version: Hibernate 3.2.3 Mapping documents: This is a fragment of themapping file for our Module class... Code: ...

13. Question about list indexes, reordering and performance    forum.hibernate.org

Hi again, replying mostly to help if someone has similar needs and to ask if somebody has good point on doing things this way: After some thinking and a little bit of prototyping one way to do the wanted thing could be something like that: - Forget the automatic indexing & ordering with List and make the index column a normal ...

14. IN keyword with list of Strings    forum.hibernate.org

15. ManyToMany: list with duplicates, doesn't update collection    forum.hibernate.org

Hibernate version - 3.2.1 Database - mySql 5 Application.java @Entity @Table(name = "applications") private Set places; @ManyToMany( targetEntity=com.myco.myapp.model.Place.class, cascade={CascadeType.ALL}, fetch = FetchType.EAGER ) @JoinTable( name="applicationsplaces", joinColumns={@JoinColumn(name="idApplication")}, inverseJoinColumns={@JoinColumn(name="idPlace")} ) public Set getPlaces(){ return places; } Place.java @Entity @Table(name = "places") @ManyToMany( cascade={CascadeType.ALL}, mappedBy="places", targetEntity=Application.class ) public Set getApplications() { return applications; } I am using Spring and Spring MVC (appfuse). My problems: ...

16. Map>... is it possible to    forum.hibernate.org





17. retrieving a list of specific type on table-per-hierarchy    forum.hibernate.org

I have a legacy table that resembles table-per-hierarchy. I can map different subclasses to that table using @Inheritance(strategy = InheritanceType.SINGLE_TABLE) and @DiscriminatorColumn. However I want to map one-to-many association to this table but only return a list of a specific class. Is this possible? Below is an example of what I'm trying to do. Unfortunately, the database schema is production schema, ...

18. Usage of parameter list in named sql-query    forum.hibernate.org

Hi All, I am facing some issue in dealing with named sql query. Im pasting the following query.

19. Delete from uni-directional List    forum.hibernate.org

We have spent two days reading documentation, consulting experts, searching the web, etc. on a Hibernate issue that seems very, very obvious, to no avial. Any help will be appreciated. We are using Hibernate (3.2.1.ga) with annotations (also 3.2.1.ga). We have two persistent classes, called "Survey" and "Page". Each survey consists of a list of pages, and each page consists of ...

20. query.List() returning strange results for a joined subclass    forum.hibernate.org

Newbie Joined: Mon Apr 03, 2006 5:12 pm Posts: 15 Location: Glasgow, Scotland Hibernate 1.2.0.4000 I have the following mapping where the Event object includes a joined subclass TrainingEvent: Code: ...

21. How to map lists that have lists inside of them ?    forum.hibernate.org

Hibernate version: 3.2 Mapping documents: Athlete, TrainProgram, Exercise My problem is that I have to map classes that have Lists inside of them and I don't know how to do it. For example: Code: ClassA{ List classB } ClassB{ List classC } ClassC{ *not anymore* } ClassA.hbm.xml Code: ...

22. Is bidirectional list association possible?    forum.hibernate.org

Newbie Joined: Fri Sep 07, 2007 4:53 am Posts: 2 Hi, I've been struggling with getting bidirectional list associations working and am now wondering if they are even possible. My copy of hibernate in action (probably out of date) says that such an association is not possible but this page on the hibernate site says that it is supported in hibernate3 ...

23. Ordered List    forum.hibernate.org

24. Persistence API package-list    forum.hibernate.org

25. Query result list of 1 NULL object ??    forum.hibernate.org

Newbie Joined: Wed Sep 12, 2007 10:18 am Posts: 1 Location: Quebec Hi everyone, I have a problem with a query. I have a criteria which return a list of one object (in this case) but this object is Null. I dont understand what is the problem so I need your help. Here is my java code : Code: Criteria criteria ...

26. [Resolved] Unwanted updates when retrieving list of objects    forum.hibernate.org

Author Message henryju Post subject: [Resolved] Unwanted updates when retrieving list of objects Posted: Tue Sep 18, 2007 11:41 am Newbie Joined: Tue Sep 18, 2007 11:24 am Posts: 9 Hi all, I'm using Hibernate + Spring and I want to get a list of all objects from a table. It works fine, but after I took a look ...

27. OrderBy annotation and persisting a list    forum.hibernate.org

Hi Akemi, As far as I know OrderBy does NOT guarantee the order in which elements are saved, but only the sequence in which elements are loaded. This is translated into an orderby clause in the select query. In reality the ordering will be the same because when an A entity is saved, the cascade feature will iteratate over all B's ...

28. many to one mapping list problem    forum.hibernate.org

Hi, I have small problem with list/save/persist operations in 1:n mapping. I have 1:n mapping between Item and Attribute classes. Item.hbm.xml Code: Attribute.hbm.xml ...

29. How to map a HashMap containing a List    forum.hibernate.org

Hibernate Version : 3.1.3 I am looking for a way to map HashMap> as a property. The classes looks something like: class A { } class B { ... private C ref; private A keyProperty; ... } class C { ... private HashMap> map; ... } Since the relationship in C's mapping file is, inverse="true", linking tables are not ...

30. mapping trouble with association    forum.hibernate.org

Hello dear colleagues! I have trouble with association. I will try to explain. I have UserGroup 1:n QuestionGroup relation. Here is the mapping code.. UserGroup: Code:

31. hibernate mapping for a buddy list    forum.hibernate.org

32. List with CollectionOfElements & EAGER    forum.hibernate.org

33. List's "key Column" and "List Index" = n    forum.hibernate.org

Hibernate version: 3.x Mapping documents: .....

34. two child lists of the same type    forum.hibernate.org

I have one parent class which must keep two child lists, both are of the same class. // parent public class CustomTable { private List fieldStatements; private List gridButtonStatements; } CustomTable.hbm.xml: // child public class FieldStatement extends Entity { ...

35. convert a list into resultset    forum.hibernate.org

36. SQL Collation conflict on list sizing in HQL -class hierachy    forum.hibernate.org

Hibernate version: 3 Mapping documents: See below Full stack trace of any exception that occurs: Hibernate operation: could not execute query; uncategorized SQLException for SQL [select siebelserv0_.SR_NUMBER as SR1_121_ ......where siebelserv0_.SR_PR_ORG_NAME=? and (select count(surveys1_.case_ref) from ( select Q14, case_ref, 1 as clazz_ from dbSurvey.dbo.tbl__ResultsItServiceDeskSurvey ) surveys1_ where siebelserv0_.SR_NUMBER=surveys1_.case_ref)>0]; SQL state [S1000]; error code [446]; Cannot resolve collation conflict for equal to ...

37. How to use discriminator on a list    forum.hibernate.org

Hi, I want to create an object that holds two lists; the lists are holding the same object type and they are being filtered according to an id. For example: I have one class called Person which is connect to one table. The members of the Person class are id,name and sex. Now I want to create a new object (Lets ...

38. How to use discriminator on a list    forum.hibernate.org

Hi, I want to create an object that holds two lists; the lists are holding the same object type and they are being filtered according to an id. For example: I have one class called Person which is connect to one table. The members of the Person class are id,name and sex. Now I want to create a new object (Lets ...

39. How to use discriminator on a list    forum.hibernate.org

[quote] Hi, I want to create an object that holds two lists; the lists are holding the same object type and they are being filtered according to an id. For example: I have one class called Person which is connect to one table. The members of the Person class are id,name and sex. Now I want to create a new object ...

40. How to use discriminator on a list    forum.hibernate.org

Hi, I want to create an object that holds two lists; the lists are holding the same object type and they are being filtered according to an id. For example: I have one class called Person which is connect to one table. The members of the Person class are id,name and sex. Now I want to create a new object (Lets ...

41. How save child list for new object without update?    forum.hibernate.org

Hello All, I create bidirectional associations, simular to paragraph "6.3.3. Bidirectional associations with indexed collections" from "Hibernate Reference Documentation", (and http://www.hibernate.org/116.html#A12 ) As collection I use list. I add to parent object one child object. When save new parent object, child object inserted, and after that updated. Question: How I can remove update for child after saving new parent object, or ...

42. Parameterized query and empty list parameter    forum.hibernate.org

select entity.key from Entity entity ...

43. returning list of objects as a Map    forum.hibernate.org

Hi, I have this entity: @Entity @Table(name = "country") public class Country { private String iso; private String name; @Id @Column(length=2) // getter/setters } Now I'd like the list of this table to return as a Map: return (Map) session.createQuery("select iso, name from Country").list(); this does not work, any way to do this? Thanks. A.C.

44. Formulate query for WHERE IN LIST    forum.hibernate.org

45. Mapping java.util.List    forum.hibernate.org

Hello All, I am relatively new to Hibernate and hence this question. I have a java class that contains elements of the type java.util.List. public class Application extends DataObject { private List investments = null; public List getInvestments() { return investments; } public void setInvestments(List investments) { this.investments = investments; } } I am creating the Hibernate mapping file. How do ...

46. list index without column, but only the resultOrder    forum.hibernate.org

My datastructure itself doesn't need a resultOrder, so a Set is suitable. But for showing new added items in a jTree I would need something like a List, because with a Set the whole tree gets mixed up after inserting new objects. And it is more intuitive to see new added items at the begining or at the end of a ...

47. list sorted by list-index ?    forum.hibernate.org

48. Saving a list of objects    forum.hibernate.org

It is normal to get a sequence of inserts to add multiple rows to a table. SQL doesn't have a multiple-row-insert construct. The only shortcut to multiple inserts is a database "load" command, which ofen requires the whole database (or the set of related tables) to be put in a special standalone state. It's only meant for an initial load.

49. Delete an item from a List    forum.hibernate.org

final Transaction tx = session.beginTransaction(); final WidgetContainer theContainer = (WidgetContainer)session.get(WidgetContainer.class, containerId); assertNotNull(theContainer); final Widget widget2 = theContainer.getWidgets().get(1); final List widgetList = theContainer.getWidgets(); // remove the ...

50. Indexed lists with no desirable null values    forum.hibernate.org

... //there is a one-to-many relationship between A and B ...

51. Exlcuding an item from a list in mappings    forum.hibernate.org

52. HQL: How to check if an object contains all the ids in list    forum.hibernate.org

Hibernate version:3.2 Hi, I am trying to write a named query where the query should return list of objects which contain all the ids in the passed parameterList. I am new to SQL and HQL, so i could not find a right way to do this. Please help, here is the situation: Object A and B have many to many relationship. ...

53. Newbie: Wierd behavior in one-many List    forum.hibernate.org

Iam new to hibernate and having a strange problem with bidirectional one-to-many relationship. Iam using a List and the size of the list is huge, all the elements in the list are null except for list[size-1] - this index has the actual row that I want. Hibernate version is 3 and Oracle 9i is the DB Here is my mapping: Parent ...

54. Map with list as value    forum.hibernate.org

55. query with a list as example?    forum.hibernate.org

Hibernate 2.1 / Oracle10g I have a simple mapping that contains a list: Code: PathEventSetBase ...

56. filtering with a list of ids    forum.hibernate.org

57. List of a class from a library    forum.hibernate.org

58. list-index versus natural-id - fight!    forum.hibernate.org

59. Adding to large Lists quickly?    forum.hibernate.org

I have a List of persisted entities which will grow very large (perhaps 10000 elements) over time. Most of the time I will be accessing this List simply to add another entity using List.add(Object). When doing this Hibernate loads the entire List (even with lazy fetching), although strictly speaking you could persist the added entries just by knowing the size of ...

60. List/Map indexes w/ Many-to-Many ... HELP! :)    forum.hibernate.org

All, I am using Hibernate and the Google Web Toolkit together using a package called Hibernate4GWT. I have it working, to an extent, and I like it VERY MUCH. :) My problem is that I am trying to populate a List field with a many-to-many association, but I am failing to understand from the documentation how to do this. According to ...

61. Using like clause with list of string objects    forum.hibernate.org

We have problem where we need to use like clause for array of strings e.g name select * from xyz where name like '%ABC%'; Now here values will come in form of String Arrays do we tried using String[] a_Name; has some values l_Query.setParameterList("Name",a_Name) we tried using select r1 from xyz r1 where r1.Name like :Name & select r1 from xyz ...

62. One to many mapping using List and index column    forum.hibernate.org

Hello, I need to have a one to many relation between the PARENTS - CHILDS tables; and need the parent the loaded childrens in an indexed collection, so I preserve the order by index. The problem I have: When I persist the parent, it seems fine, excepting the fact that on the CHILDS table I see an extra UPDATE that populates ...

63. getting list data; sorting and unexpected null    forum.hibernate.org

I have a number of mapping collection problems when trying to load data from two tables. The table structure is a simple top level table with a referenced list of locations in the second table. 1a. When I try to automatically load from the table using a list (see locationList below) it returns null as the first item in the list. ...

64. Constructing with list: select new X((select new Y(...)))    forum.hibernate.org

I'm trying to get historical balances on an account, and to do that I thought maybe I could ask hibernate to calculate those historical amounts and then construct an Account object with the historical balances but the rest of the account object intact - a kind of "group by" that puts the grouped row data into a list instead of aggregating ...

66. A remove from list problem    forum.hibernate.org

Hello I Have a Object with a List, the mapping: Code: @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY) @JoinColumn(name = "XXX") @IndexColumn(name = "ORDERNUMBER", base = 0) public List getElement() { e.g.: now, I have 2 Elements in the list and in the table of my ...

67. Using List in HQL WHERE clause    forum.hibernate.org

Same deal. expecting IDENT, found ':' near line 1, column 175 [select l from Location as l where l.latitude = :lat and l.longitude = :long and l.category.code in elements(:codes)]; nested exception is org.hibernate.hql.ast.QuerySyntaxException: expecting IDENT, found ':' near line 1, column 175 [select l from Location as l where l.latitude = :lat and l.longitude = :long and l.category.code in elements(:codes)] org.springframework.orm.hibernate3.HibernateQueryException: ...

68. one-to-many indexed List not working    forum.hibernate.org

Newbie Joined: Tue Feb 19, 2008 11:42 am Posts: 2 Hibernate version:3.2.1 Name and version of the database you are using:Oracle 10G Mapping documents: Code: ...

69. Listing many to many database relationship    forum.hibernate.org

Hi! I have a many to many relation into my database between the tables Category and Content. Category -> CategoryContent <- Content In the table CategoryContent I just jave have the id's from both Category and Content table. My question is: How can I get the list of all Contents if I know the Category id? public Set contentList (int categoryId). ...

70. Listing many to many database relationship    forum.hibernate.org

Hi! I have a many to many relation into my database between the tables Category and Content. Category -> CategoryContent <- Content In the table CategoryContent I just jave have the id's from both Category and Content table. My question is: How can I get the list of all Contents if I know the Category id? public Set contentList (int categoryId). ...

71. How to compare Map in a List?    forum.hibernate.org

@Entity @Table(name="mytable") public class Element{ @JoinTable( name="map_table" ) @CollectionOfElements(fetch=FetchType.EAGER) @Cascade(value = CascadeType.DELETE_ORPHAN) @Enumerated(value=EnumType.ORDINAL) @MapKey( columns = { @Column( name="myenum" ) } ) @Column( name="myvalue") Map someMap; @OneToOne ...

72. how to map a map that contains lists as values    forum.hibernate.org

73. How to print created tables list in logs    forum.hibernate.org

Hi, I crated around 27 tables and these are working fine. I want to print created table names in logs. How can i do this. I tried with calling execute(true,true,false,true) method of SchemaExport Class. But queries to database is printed in logs. I want to print only info to user like "Table created XXX " after creation of every table by ...

74. NPE when calling query.list    forum.hibernate.org

I just verified that this only happends when using the second-level cache. Sequence to reproduce: 1. Run query "from Customer" 2. Add an entry to Customer#products collection 3. Run query "from Customer" => nullpointerexception in query.list() This happends everytime, but only with second-level cache (OSCache). It should be noted that there is extensive use of "property-ref" relations, even in collections. Could ...

75. How to create a map which contain each element as a list    forum.hibernate.org

I need to create a list of map. i.e a map which contain each element as a list. My problem is listed below. I have a ListMaster each ListMaster is subdivide into sub-list and sub-list is classified as different type. My table structure is LIST_MASTER Code: LIST_ID(P) LIST_NAME L1 ...

76. Query a list attribute with hql    forum.hibernate.org

Hello. I am pretty new to Hibernate and have some problems with a HQL query. I have persisted some objects, which have a structure like this: class Document: long id List tags Now I want to query all tags of all documents. It isn't important if the result is a list of lists or all tags together in one list. An ...

77. List table fields    forum.hibernate.org

Hi all, I'm using Hibernate 3.1on DB2 express edition. I have the necessity to get the fields of a table. I thought that java-reflection could help me but because of Hibernate mapping (e.g foreign key are mapped with classes) I couldn't retrieve fields name from the table. If someone is able to help me I would appreciate it. Thanks in advance. ...

78. Mapping a List    forum.hibernate.org

I think something is wrong with my list of url in the class item. When persisting it locks after inserting into the url table.No exception or anything. If i remove the list from the mapping it works. Hibernate version: 3 Mapping documents: Item: ... ...

79. list-index sorting issue    forum.hibernate.org

80. change parent in bidirectional list association    forum.hibernate.org

Hi, I have a bidirectional parent child relation with an indexed collection. My mapping is as follows: Code: ...

81. Confused in one-to-many mapping with     forum.hibernate.org

Hi all, I have some trouble in mapping with a in a condition I have 2 tables: lm_group and lm_access_rule lm_group will have a List of lm_access_rule objects (ie. one-to-many) I have tried to config the tables in the hbm.xml for several options but still failed to save/add lm_access_rule objects. common errors I have are the following: 1) org.springframework.orm.hibernate3.HibernateSystemException: ...

82. How to retrieve the list-index element in a list collection?    forum.hibernate.org

I am using a LIST to map Images to Items. I am using imageid column as my list index element. However the imageid is null when I retrieve Items and their Images. How do should I change the mapping to fix that? item { itemid, itemname } image { itemid, imageid, imagetitle } Please help! Hibernate version: 3.2 Mapping documents: Code: ...

83. How to retrieve the list-index element in a list collection?    forum.hibernate.org

I am using a LIST to map Images to Items. I am using imageid column as my list index element. However the imageid is null when I retrieve Items and their Images. How do should I change the mapping to fix that? item { itemid, itemname } image { itemid, imageid, imagetitle } Please help! Hibernate version: 3.2 Mapping documents: Code: ...

84. Secon read over criteria.list() method with old data    forum.hibernate.org

Hibernate version:3.X If I read data over the method session.createCriteria(BusinessObject.class).list I got the right data. I update the data over a other session. If I read the data again over the first session I got the old data. Some other Hibernate user have the same problem. But all solutions which are described will not solve the problem. So I have debug ...

85. Quey.list cause memory leak (OutOfMemoryError)    forum.hibernate.org

Hi, I run a client program that load each iterate 300 hibernate objects using Query.list(). Unfortunatly, after a while, I got OutOfMemoryError. I ran it many times and it always fails after around 2400 iterations. I watched it through JProfiler and I saw that the used heap size growes significantly during this time and the GC couldn't release enough memory. I ...

86. UPdating A List With Set As IndexColumn    forum.hibernate.org

Hi all, I was just wonder if someone could tell me if I am doing this right. I've got a object defined like below: Code: @Entity @Table(name = "STORE") public class Store { @OneToMany(fetch = FetchType.LAZY) @JoinColumn(name = "STORE_ID", nullable = false, updatable = false) @org.hibernate.annotations.ForeignKey(name = "FK_FIELD_STORE_ID") @org.hibernate.annotations.IndexColumn(name = "FIELD_POSITION", nullable = ...

87. criteria.list() causes session to be dirtied    forum.hibernate.org

Hibernate version: 3.2.6.ga I have a Criteria query with the following code: ... Logger.info(this, " dirty session? " + this.getSession().isDirty()); List objs = criteria.list(); Logger.info(this, " dirty session? " + this.getSession().isDirty()); ... The output for this piece of code is: false true So criteria.list() is causing my object to be dirtied and when the session is committed the object's version is ...

88. afterOperation call in SessionImpl.list() method    forum.hibernate.org

Can some one explain the purpose of afterOpration() call in the finally block of SessionImpl.list() method. This inturn calls StatefulPersistenceContext and sets the lockMode to NONE for all the entities from that Query. I am using ehcache, is this check still required even for the resultset returned from ehcache. Looks like this is something that got introduced in 3.x as this ...

89. Save object that contains a list of objects to be also saved    forum.hibernate.org

Hi all, I am not sure whether this issue is normal or not. The thing is have an object, let's say: Company that has a list of objects, let's say a list of Employee. Each Employee object has an attribute that is a reference to the Company. It would be something like: Company { Set employees; int code =-1; } where ...

91. Memory Consumption of list() vs. List with ScrollableResult    forum.hibernate.org

Author Message Allesmallachen Post subject: Memory Consumption of list() vs. List with ScrollableResult Posted: Fri May 30, 2008 5:43 am Newbie Joined: Sun Dec 30, 2007 1:08 pm Posts: 12 Hi, I've written a small test to measure the memory consumption of my Hibernate code. It seem that getting a List of objects with the list() method of a ...

92. List question    forum.hibernate.org

Hello, I am looking for suggestions on what is the best way to implement a hibernate collection. I have a column called" "SeqNBR" which indicates the location of the element in the collection. An element in the collection is allowed to move from its position. My application needs that flexibility. If I use the traditional ArrayList to implement this I could ...

93. Problem with hibernate session.createQuery().list()    forum.hibernate.org

I have an application running on tomcat 5.5. It uses struts, tiles, hibernate and MySql 5.0 as backend. PROBLEM: Fresh Data is inserted into a table in MySql through hibernate APIs. Immediately after the insertion, when the table is queried, fresh data never shows up, until arroximately 10 seconds or so. Details: ===== 1. Data is inserted as mentined below. Session ...

94. Fully-qualified list of objects from Criteria    forum.hibernate.org

I'm using Hibernate 3.2.2 and trying to retrieve a fully-qualified list of objects from the criteria.list(). Objects are always returning unqualified. This is required for my application in order to avoid another layer of transformation (hence performance). I wonder if there is any setting i miss in the class mapping file (hbm), or the hibernate configurations. I'm also working with nHibernate ...

96. Problem with Criteria.list()    forum.hibernate.org

Hi, I am trying to fetch all entities from the database, filtered by a given entity A which is in a many-to-one relationship with another entity B. The problem is in the select statement generated by Hibernate. In the WHERE clause, only the fields from entity A appear, not the ones from the joined entity B. So if I change the ...

97. Quey.list cause memory leak (OutOfMemoryError)    forum.hibernate.org

Hi, My problem doesn't solved. I run a client program that load each iterate 300 hibernate objects using Query.list(). Unfortunatly, after a while, I got OutOfMemoryError. I ran it many times and it always fails after around 2400 iterations. I watched it through JProfiler and I saw that the used heap size growes significantly during this time and the GC couldn't ...

98. Can not return the list page    forum.hibernate.org

the saveCustomer in Dao impl is: public boolean saveCustomer(TblCustomerInfo customerInfo) { getHibernateTemplate().save(customerInfo); return true; } and the applicationContext.xml related the transaction setting is: PROPAGATION_REQUIRED PROPAGATION_REQUIRED But when i called the save method,the ...

99. delet list of keys    forum.hibernate.org

Hi, you can use this; I am not sure if you key is a composite key. Try this String hqlDelete = "delete Item i where i.id = :ids"; int deletedEntities = session.createQuery( hqlDelete ).setParameterList("ids", keys).executeUpdate(); where keys is a list of your keys. What is the type of your composite key? Hope this help