Bag 1 « Map « JPA Q&A





1. Applying the Hibernate filter attribute to a Bag with a many-to-many relationship    stackoverflow.com

Consider the following Hibernate mapping file:

<hibernate-mapping ...>
<class name="ContentPackage" table="contentPackages">
    <id name="Id" column="id" type="int"><generator class="native" /></id>
    ...
    <bag name="Clips" table="contentAudVidLinks">
    ...

2. Fetching multiple bags efficiently    stackoverflow.com

I'm developing a multilingual application. For this reason many objects have in their name and description fields collections of something I call LocalizedStrings instead of plain strings. Every LocalizedString is basically ...

3. Hibernate cascade delete on a bag    stackoverflow.com

Having built most of my DAL using NHibernate, I've now discovered that the SQL Server's Cascade On Delete rules also need to be taken into account in my HBM files too. ...

4. Uniqueness within Bag in Hibernate    stackoverflow.com

I have a hibernate mapping where I am creating a join table using the <bag> tags. How do I ensure uniqueness of the combination of keys that go into the join ...

5. What is the use of bag tag in Hibernate?    stackoverflow.com

i need to know how to use the bag tag and what is the purpose?

6. Hibernate: Why does a change of bag lead to strange ADDs and DELETEs in the database?    stackoverflow.com

I have an n:m-association between the two classes User and Role, implemented as a bag with lazy="extra". The association is stored an an association table sind a user can have many ...

7. Hibernate bag with multiple elements    stackoverflow.com

I have a bag whose structure looks like this:

<bag name="foo" fetch="select" table="table_of_foos">
    <key column="foo_ids"/>
    <many-to-many class="Bar" column="bar_ids"/>
</bag>
My "table_of_foos" table has two columns: "foo_ids" and "bar_ids", ...

8. JPA with Hibernate 3 - ManyToMany-Stack overflow and Multiple bag errors    stackoverflow.com

I am facing issues while retrieving data for entities having bi-directional many-to-many relationship. If I use List for storing entities, I get unable to fetch multiple bags simultaneously error. If i ...

9. Hibernate, cannot simultaneously fetch multiple bags    stackoverflow.com

hibernate throw this excpetion during sessionfactory creations.

org.hibernate.loader.MultipleBagFetchException: cannot simultaneously fetch multiple bags
This is my test case:
@Entity
public Parent {

 @Id
 @GeneratedValue(strategy=GenerationType.IDENTITY)
 private Long id;

 @OneToMany(mappedBy="parent", fetch=FetchType.EAGER)
 // @IndexColumn(name="INDEX_COL") if i ...





10. Mapping bag and set using JPA annotations    stackoverflow.com

I am trying to migrate hibernate XML files to JPA annotations. I need to map and collections in JPA. Currently, i am using one-to-many, many-to-one collections annotations, but i cant ...

11. Duplicate Rows From HQL Query When Returning Bag Property    stackoverflow.com

in my query I am using multiple tables, some of which cannot be set up as normal nhibernate relationships, so I am forced to return rows made up of individual columns ...

12. What is difference between bag vs idbag in hibernate?    stackoverflow.com

I have two entites i.e.employee information and transfer information maintains upto till date.So In those sceniores which can i choose bag or idbag?

13. NHibernate - mapping a collection based on a different property to the identity    stackoverflow.com

Consider the following tables:

Client(Id bigint, Name varchar(50))
Employee(Id bigint, Name varchar(50), ClientId bigint)
that are mapped like this:
<class name="Client" table="`Client`">
  <id name="Id" column="`Id`" type="long">
    <generator class="native" />
  </id>
 ...

14. Hibernate fetch join -> cannot fetch multiple bags    stackoverflow.com

Problem is i have two bags in my entity which i would like to display in my jsf frontend (Spring in the back so no lazy loading). So i have to ...

15. Should I convert my Grails domain relations to use Hibernate Bags?    stackoverflow.com

In Grails 1.3.7 I've spent quite some time to convert my domain class relations according to Burt's suggestions in http://www.infoq.com/presentations/GORM-Performance Now, Grails 2 supports Hibernate's Bags and I am considering ...

16. Cannot fetch multiple bags: why @IndexColumn returns wrong results?    stackoverflow.com

Guys, please help me with the following problem. I have encountered the famous "cannot simultaneously fetch multiple bags" error because I have two Lists in my Parent Entity. Here is a scratch ...





17. JPA:I get cannot simultaneously fetch multiple bags when >=2 enteties FetchType.EAGER    coderanch.com

We're building a Java EE application which uses JPA through Hibernate. When trying to set fetch type to FetchType.EAGER on two @OneToMany relationships I get an exception saying: cannot simultaneously fetch multiple bags. There is an article explaining this problem in more detail. Saying that it's possible to solve it by using @IndexColumn. However that's not an option for us as ...

19. Hibernate inserting MANY duplicate records for a bag    forum.hibernate.org

Regular Joined: Mon Mar 10, 2008 6:40 pm Posts: 114 I have a serious problem which seems like a very serious bug in hibernate. Suddenly, after 9 months of perfect operation, my production tomcat/spring server started throwing exceptions of communication link failures to mysql. Typical stack trace is below. Seemed like there was an issue with the server itself (houses both ...

20. Possible to insert into a bag through code?    forum.hibernate.org

The only way I know how to insert into a bag is: entity.getBag().add(bagObject) but when I do this, hibernate loads all of my bag objects (which is not feasible). So is there a way to have the above not load anything, only insert? If not, how are we supposed to insert into a bag? Native sql code only?

21. matching columns of master and child table in bag collection    forum.hibernate.org

Hi I have a question about bag mapping. class Parent { private long id;//Primary key private long dept_id ; } class Parent { private long id;//Primary key private long dept_id ; private Parent parent; } the simplest forms of my classes. I have a bag collection in parent mapping like below; ...

22. key column value not used when adding elements to a bag?    forum.hibernate.org

I've run into some behaviour that seems odd, or maybe I've misunderstood the intentions of mapping bags in Hibernate. I've got an entity (EntityClass), that has an arbitrary number of values(ValueClass) associated to it, using a bag one-to-many-mapping that specifies a key column, that is part of the table for ValueClass, but is not on the entity, as the association is ...

23. Persistent Bag is empty    forum.hibernate.org

I am trying to pull data from two tables PRODUCT_TYPE and PRODUCT_TYPE_ATTR table with one-to-many relationship through Persistent Bag. I am able to query the items in the first table (PRODUCT_TYPE) but the bag for each item is always null. Here are the mapping files and the class. Can someone shed some light? Thanks Product Type Mapping ...

24. coach bags,coach outlet,coach handbags    forum.hibernate.org

Newbie Joined: Mon Mar 01, 2010 8:48 am Posts: 2 Ladies, I think it may be time we all admit that if we start buying accessories for accessories we really have a problem. I still remember my coach outlet lipstick cases she had; black leather, structured, with a little mirror when you opened up the case. I actually whined and whined ...

25. coach bags,coach outlet,coach handbags    forum.hibernate.org

Newbie Joined: Mon Mar 01, 2010 8:48 am Posts: 2 Ladies, I think it may be time we all admit that if we start buying accessories for accessories we really have a problem. I still remember my coach outlet lipstick cases she had; black leather, structured, with a little mirror when you opened up the case. I actually whined and whined ...

26. Excessive Hibernate Queries for Child 'Bag' Object    forum.hibernate.org

Our DB monitoring tools registered massive spikes in Hibernate queries outside normal application hours. (e.g., 180k-240k queries per hour) Strangely, the queries regard a child container; queries for the parent don't show up on radar. Any insight to help troubleshoot, explain, or resolve this behavior would be greatly appreciated. (Column/Package names changed to protect the innocent.) The rogue query: Code: ...

27. Cannot Save Big Entity with more than one one-to-many bags    forum.hibernate.org

I have Order Entity,it hasa one-to-many bag OrderServices and one-to-many bag OrderPaymentDocument,if a fill this collections and doing save its saving all ok,but OrderPayment Document hasa IdBag(many-to-many) to OrderServices if i fill this idbug and saving all together Nhibernate give me error, object references an unsaved transient instance - save the transient instance before flushing. Type: Kz.WebFusion.Entities.Business.Orders.Order, Entity: Kz.WebFusion.Entities.Business.Orders.Order,i thing this ...

28. HELP!!! Bag sorting problem.    forum.hibernate.org

public class students{ private List schedule; private List watches; //works well, can't remember the correct syntax, but ignore syntax and take in the concept of the question. so this is a double join using a bridge table...that's where the problem really lies but I want a solution. @JoinTable("student_schedule", @JoinColumn(name="std_std_id", referenced_Column="std_id"), inverseJoinColumn(name="sch_sch_id", referenced_column="sch_id"))} @OnetoMany(cascade=CascadeAll) public List getSchedule() { return schedule; ...

30. Using a particular Index in Oracle for a .set or .bag    forum.hibernate.org

I am very new to using hibernate, so forgive me if this is obvious. I have in some places been able to use the @hibernate.column name="column1" index="index1" on situations where I am one-to-one, or many-to-one. I am having trouble however making it auto-create the indexes for situations of one-to-many. Example below: This one works and creates the index as expected. /** ...

31. is it possible for a bag to return a class i define    forum.hibernate.org

Hi, in my other topic https://forum.hibernate.org/viewtopic.php?f=1&t=1009053 i tried to explain what i wanted and actually kinda solved it. but for some of my data i need to use collections which are actually a single data. i worked the way around by changing getters and setters like below but is it possible to make bag return a class i want instead of ...

32. Hibernate cache not working for bags?    forum.hibernate.org

Caching queries like "select cat.eyes from Cat cat where cat.id=?" where cat.eyes is a Bag does not work - cache returns a list with one element in it - null. Reasons: StandardQueryCache contains following code: Code: for ( int i = 0; i < result.size(); i++ ) { ...

33. Problem fetching Object with two one-to-many bags (xml)    forum.hibernate.org

Newbie Joined: Mon May 30, 2011 4:58 pm Posts: 3 Hello, Im relativly new to Hibernate, but have to define an quite "complex" data model with Collections. I allready tried alot, read many forum posts, googled alot, read books, but I allways have the same problem. I have an quite simple java-object like the one below: Code: package de.model; public class ...

34. one-shot delete is different for bag?    forum.hibernate.org

Hi, I am trying to do one-shot delete and found the following in section 12.4 of the document. "Suppose we add a single element to a collection of size twenty and then remove two elements. Hibernate will issue one INSERT statement and two DELETE statements (unless the collection is a bag). This is certainly desirable. ". Question is why the behavior ...

35. Searching a bag of keywords?    forum.hibernate.org

session.filter() see api docs. here is how I do something similar ... this.status.name is filtering on many-to-one attribute Object[] values = new Object[3]; values[0] = "published"; values[1] = new java.util.Date(); values[2] = new java.util.Date(); net.sf.hibernate.type.Type[] types = new net.sf.hibernate.type.Type[3]; types[0] = Hibernate.STRING; types[1] = Hibernate.DATE; types[2] = Hibernate.DATE; java.util.List playlists = (java.util.List)sess.filter(frame.getList(), "where this.status.name = ? and (this.showEdate is null or ...

36. Bag.equals() ?    forum.hibernate.org

OK Gavin, take a big icy coke and answer this post ;-) Bag.equals method isn't used that much (assuming the current one is buggy - at least have a strange behavior). Don't you think a programmer calling myCollection.equals(anotherOne) understand that he needs to load it and thus assumes that perf ussue ?

37. How to deal with Bags using bidirectional Parent Child?    forum.hibernate.org

I don't know if this is a bug or expected behaviour but I'm not sure what my approach should be to dealing with it. I've got a collection on my parent class mapped as bag that holds bidirectionally associated children. The weird thing is, when I create a new child, add it to the collection and call saveOrUpdate(parent) I end up ...

38. Set / bag difference    forum.hibernate.org

39. WHERE clause in set, bag, etc.    forum.hibernate.org

I checked the DTD but did not find any hints. What I'm looking for. We have all static texts of dropdown lists etc. stored in one single table in the database with one column being used to distinguish the different dropdown boxes. Currently the WHERE clause is part of our HQL statement. That works find but is a little bit inflexible. ...

40. Bags, lazy init, and paging collection...    forum.hibernate.org

41. bug for joined-subclass containing a lazy bag ?    forum.hibernate.org

hi all, i'm working with hibernate 2.1.2. The hbm files are : S_REC_RECEPTION .... ...

42. Using aggregate functions on collections (bag)    forum.hibernate.org

Hi I have defined the following query but it does not parse: select sum(lifeAssured.benefits.sumInsured) from LifeAssured lifeAssured where lifeAssured.client.clientNumber = '12345678'; LifeAssured.benefits is a bag of type Benefit, Benefit has a property sumInsured of type BigDecimal. I have tried various combinations of the select clause including select sum(elements(lifeAssured.benefits).sumInsured) and select sum(elements(lifeAssured.benefits.sumInsured)) but none of these parse -- can anyone help out ...

43. Sharing a table between a and a     forum.hibernate.org

I'm trying to help a some friedns out and they've got something I think is BAD but wanted to bounce it off the list to make sure. Basically, the have a java object mapped to a table "EmailSendEvent". It has many attributes but they are using two of them in a separate mapping of a persistent collection to back a ...

44. Units Tests and Bag Class (and equals() method)    forum.hibernate.org

Thanks, I don't agree or not with implementing equals() on the Bag class. I saw the older thread on this where you two talked about it. I just need to know what the recommended way is to unit test loading classes that have collections on them? Is using equals() the wrong way? If so, then how should I go about it? ...

45.  mapping always wants to be lazy?    forum.hibernate.org

Hi, Using hibernate 2.1.3, I have a relationship mapped as a . However, I prefer a so I changed the mapping, changed the code to instantiate a net.sf.hibernate.collection.Bag, and re-deployed the application. Now I'm getting LazyInitializationExceptions... From the mapping: Code:

46. Suggestion: Bag support for Apache Commons Bags    forum.hibernate.org

Not sure what you mean by "have an actual bag implementation to use with bag mappings". There is one; its net.sf.hibernate.collection.Bag Hibernate deals with interfaces (i.e., java.lang.List, java.lang.Set, java.lang.Map) when dealing with collections; not implementations. As far as usage external to Hibernate and then have Hibernate know what to do with it that should be fine as long as it is ...

47. one-to-many in a bag => always null    forum.hibernate.org

* Hibernate Version 2.1.4 * Postgresql 7.4 * Mapping documents: - Code:

48. set and bag -> getReturnedClass()    forum.hibernate.org

Hi, It looks like calling PropertyType.getReturnedClass() always returns a java.util.Collection in the case of property even though the generated Java objects implements the property as a List. According to the documentation can be implementated as either, I'm not sure how the code generator decides? Anyways, is there a way getReturnedClass() can give me List instead of Collection? It's probably ...

49. NullPointerException in Bag after update    forum.hibernate.org

...

50. No persister for: net.sf.hibernate.collection.Bag    forum.hibernate.org

Hi Im getting a persistor error as below: I have read other erros similar to this and they keep saying you must check the config file to mael sure your mapping file is included, how can this be with Bag? does it maybe have something to do with the one to many relationship of DEPFILESIN to DDETAILS? and then setting the ...

51. relation problem using bag    forum.hibernate.org

one more: when changing mapping to (with cascade=all): as you can see in the debug-trace, there is first an "update" and later a "delete" (which will never work work because of the previous update). ... DEBUG net.sf.hibernate.collection.AbstractCollectionPersister,477 - Deleting collection: [de.bmw.catia.model.data.VersRel.RwpXVersRelevants#8] DEBUG net.sf.hibernate.impl.BatcherImpl,200 - about to open: 0 open PreparedStatements, 0 open ResultSets DEBUG net.sf.hibernate.impl.BatcherImpl,226 - update ...

52. When should we use bag or set?    forum.hibernate.org

when the contract of a set as defined in the Java Collections javadoc API suits your usecase or when the contract of a bag as defined by Hibernate's documentation suits your use case. A cursory glance at both: BAG A bag is an unordered, unindexed collection which may contain the same element multiple times. The Java collections framework lacks a Bag ...

53. SQL to HQL query with bags and any    forum.hibernate.org

Page 1 of 1 [ 1 post ] Previous topic | Next topic Author Message brian_wainwright Post subject: SQL to HQL query with bags and any Posted: Thu Jan 06, 2005 4:58 pm Beginner Joined: Mon Dec 29, 2003 12:49 pm Posts: 41 Location: Boston, MA Hello all, I'm trying to ...

54. Bag syntax for where attribute: How to restrict a collection    forum.hibernate.org

Read the rules before posting! http://www.hibernate.org/ForumMailingli ... AskForHelp Hibernate version: 2.1.7 Mapping documents:

55. How to define bag for additional fields    forum.hibernate.org

56. Problems with Persistent Bag    forum.hibernate.org

Hallo together, my problem is the follwing: i have saved my objects (all of the same class) in a database with hibernate annotations. When I fetch the objects from the database i have the following problem: I have to check, if one of the attributes (type collection) is null or not. If I make the following check: attribute == null it ...

57. duplicate elements inside mapped bags when using criteria    forum.hibernate.org

I'm seeing a weird problem with duplicate elements showing up in bags when using the Criteria API. Basically, in the example below there Project objects, which have a many-to-one relationship to Program, which itself has a many-to-many relationship to Attribute (represented as a bag). When we get a collection of projects using the Criteria API, hibernate pulls in the Program and ...

58. Changed a Bag to a Set    forum.hibernate.org

Author Message srossouw Post subject: Changed a Bag to a Set Posted: Mon May 23, 2005 10:14 am Beginner Joined: Mon Mar 07, 2005 12:02 pm Posts: 39 Thanks for your interest. Could anyone tell me why I am getting this exception? All I did was change a list to a set. Code: (cfg.Environment ...

59. bag using a combined key (and it's not the primary key)    forum.hibernate.org

Hi I have a mapping problem, that I need some help with. Here is a very simple version of my problem. My database looks like this: Code: -------------- --------------- | foo | | ...

60. Duplicate entity in bag when using identifier Id strategy    forum.hibernate.org

Using hibernate 3.0.5: I have a problem using "identifier" id with a lazy associations mapped as a bag. The bidirectionnal association is mapped as usual : children side is a "bag" inverse lazy one-to-many association. parent side is a many-to-one association. > Entity parent = session.load(2); > Entity child = new Entity(); > child.setParent(parent); > parent.getChildren.add(chlid); > session.save(child); > int childrenCount ...

61. Bag intersection within where clause in selects    forum.hibernate.org

Sorry, I pressed Enter to early. I am new around here and not very experienced with hibernate. I have a question regarding a selection with a BAG in condition. I have the following example code: public class Person{ private List schedules = new ArrayList(); ... ... I build a criteria dinamicaly and at a certain point I need to build a ...

62. Hibernate 3 migration: duplicate entities in child Bags.    forum.hibernate.org

After migrating to H3, several queries seem to be demonstrating odd behavior we didn't expect. We had some Criteria queries that we'd previously have to distinct via a HashSet, which was expected. However, now it seems we need to do the same for the child Bags of same said entities. Whereas in H2.X we did not have to do this. We ...

63. Ordering and duplication in Bags and Sets    forum.hibernate.org

64. Custom bag collection    forum.hibernate.org

Hello. I need to extend a bag collection in order to override the add and remove methods, however I don't understand how to do this. I found references on the collection-type attribute, over complicated references to implements a number of hibernate interfaces, but nothing seems to work, or at least nowhere I have found a clear explanation of what to do ...

66. Why doesn't the child in the bag persist?    forum.hibernate.org

Why doesn't the child persist? I create a parent object and create a Child object. Then I add the child to an ArrayList of the Parent. I save the Parent and it saves. the Child does not get created in the db. If I save the Child, it saves and it is correctly linked to it Parent. What I expected was ...

67. foreign key not populated when using a     forum.hibernate.org

Page 1 of 1 [ 6 posts ] Previous topic | Next topic Author Message mmoores Post subject: foreign key not populated when using a Posted: Sun Apr 30, 2006 1:37 pm Newbie Joined: Tue Jan 11, 2005 6:02 pm Posts: 13 Location: Seattle I have a one-to-many (A Consumer ...

68. hibernate bag, order-by    forum.hibernate.org

Hello. I have a class called System which contains a collection of Modules. I use a bag, like this: @hibernate.bag table="system_module" cascade="save-update" lazy="true" order-by="description" @hibernate.collection-many-to-many class="Module" column="id_module" I would like to order the collection by the description fileld of Module but the above line is giving an error: Unknown column 'modules0_.description' in 'order clause' I guess because there is no description ...

69. Using a bag with set semantics    forum.hibernate.org

"Hibernate in action" page 231 describes how to map a one-to-many association with a bag having set semantics. I have 3 classes: Facility, Contact and EU. A facility has 0 or more EU's and zero or more Contacts. Since my GUI is written in JSF,I would like to use java.util.List's as opposed to java.util.Set's. The problem is that when I try ...

70. Using a bag with set semantics    forum.hibernate.org

"Hibernate in action" page 231 describes how to map a one-to-many association with a bag having set semantics. I have 3 classes: Facility, Contact and EU. A facility has 0 or more EU's and zero or more Contacts. Since my GUI is written in JSF,I would like to use java.util.List's as opposed to java.util.Set's. The problem is that when I try ...

71. HQL Query over Bag Generating 57 SQL Selects?    forum.hibernate.org

HQL: select itn from ItineraryDTO itn, itn.binderList bnd where bnd.binderId = ? Mapping Doc element: This HQL may be generating a large number of SQL statements. Is this poorly formed HQL (no join) or is the Bag structure causing the problem? I'll move this from DTO to VO but I need to understand if and why Hibernate ...

72. Simple many-to-many using bag question    forum.hibernate.org

Beginner Joined: Tue Apr 25, 2006 10:46 am Posts: 28 Using hibernate 3.0 for the problem below Hi, I have managed to create a many-to-many association between 2 simple classes (Item and Category) using bag with success as below: Code:

73. Persisting something like org.apache.commons.collections.Bag    forum.hibernate.org

Hi, I want to persist a Commons Collections Bag which is basically a wrapper around a Map where each Object is stored with it's number of copies. I've got several entities which make use of such bags and it would be inconvenient if I had to create a bag entity for each of these entities which itself maps to a Map ...

74. Bag , Join and subclasses hierarchy problem    forum.hibernate.org

Author Message PoiPoi Post subject: Bag , Join and subclasses hierarchy problem Posted: Wed Jul 26, 2006 11:07 am Newbie Joined: Wed Jul 26, 2006 3:13 am Posts: 2 Hi, I just took two days looking for a solution to solve this problem. I explain first the context : I have a mapping on InfoOpFinanciere (quite simple one) with ...

75. Using the check attribute on a bag    forum.hibernate.org

I'm trying to have a lazy list populate with only objects that are active. Basically a Terminal object has a list of persons and the Person object has a isActive member. When I load the list of persons I do not want to specify in every HQL query to load only the active ones. After a look at the hibernate documentation ...

76. What is the Use of Set/Bag Tags in Hibernate    forum.hibernate.org

78. Bag/Set behavior with hierarchy table    forum.hibernate.org

Hibernate version: Hibernate 3.2 Mapping documents: Code: ...

79. cannot simultaneously fetch multiple bags ERROR?    forum.hibernate.org

80. Problem retrieving collection into bag    forum.hibernate.org

Newbie Joined: Wed Apr 18, 2007 12:41 pm Posts: 2 I can't seem to figure out why my configuration is behaving this way and I will do my best in explaining the problem. I have an account table that has a composite id of customer_id,rt_num,acct_num, I also have a transaction table. In the Account object I have a list of transactions, ...

81. Mapping bags when both tables have primary id columns of ID    forum.hibernate.org

Hibernate version: 3.2 Mapping documents: Code:

84. cannot simultaneously fetch multiple bags    forum.hibernate.org

hi all just downloaded hibernate 3.2.4.sp1 core, and annotations 3.3.0 ga i'm not sure which versions they're upgrading from, both definitely version 3+ (from april 2006) i'm now getting this error (multiple bags) on one of the applications i'm working on, and i really don't understand the problem i've looked at another post with the same error, but i don't think ...

85. one-to-many mapping--delte from collection with bag    forum.hibernate.org

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

86. @OneToOne cannot fetch multiple bags    forum.hibernate.org

Code: public class A implements Serializable{ protected int aId; protected List bs = new ArrayList(); protected C c; public User(){ // Do nothing; } @Id @GeneratedValue @Column(name="pk_a_id") ...

87. regression EM 3.3.1 and 3.2.1: duplicate object in per. bag.    forum.hibernate.org

Hibernate Community View topic - regression EM 3.3.1 and 3.2.1: duplicate object in per. bag. Login Register FAQ Search View unanswered posts | View active topics Board index Hibernate & Java Persistence Hibernate Users All times are UTC - 5 hours [ DST ] regression EM 3.3.1 and 3.2.1: duplicate object ...

88. Bag with key-property ref    forum.hibernate.org

89. Hibernate one to many , collection, bag    forum.hibernate.org

try { session = hibernateFactory.openSession(); tx = session.beginTransaction(); ? ...

90. Mapping a subclass containing bags using discriminator colum    forum.hibernate.org

Hello all, I'm currently experiencing problems mapping a bag inside a subclass which uses a discriminator. This is my mapping: Code: ...

91. Newbie: Unable to use multiple bags on same table    forum.hibernate.org

Hi, I'm trying to create two bags on the same table of joined-subclasses as follows: Code: ... ...

92. Bags, with an index from a row?    forum.hibernate.org

Hello all, I hope that this question doesn't get asked too often (I've put a to the point question at the end of the post). Unfortunately I couldn't find much on google, but maybe I don't know the technical name for exactly what I'm trying to do. (So if someone could even tell me that, I could google more!) Hibernate version: ...

93. cannot simultaneously fetch multiple bags    forum.hibernate.org

I am deploying a Seam-JPA application powered by Hibernate. I have a Widget entity that has a unidirectional 1:M with a PricingEvent entity for pricing history purposes. Things look like this: Code: @OneToMany(fetch=FetchType.LAZY, cascade=CascadeType.PERSIST) @JoinColumn(name = "WIDGET_ID", nullable = false) public List getPricingHistory() { return pricingHistory; } Now when I set the fetch type to ...

94. bag property fetched through sql-query is null.    forum.hibernate.org

My class Status is defined as Code: public class Status implements Serializable { /** * Represents the entity id. */ private Long Id; /** * Represents the list of the next possible statuses. ...

95. Mapping a unidirectional one-to-many relationship using bag    forum.hibernate.org

Hi all, I'm new to Hibernate and am currently having problems with writing a correct Hibernate mapping file for a class. The problem is that I have a unidirectional one-to-many relationship which is using a join table, in my class (called Cv). It has a java.util.list of Skillinstances (another of my classes). The join table I'm using is called cv_skillinstance. I've ...

96. Using the Where clause in a one-to-many bag collection    forum.hibernate.org

I am stumped on how to use the 'Where' clause in a one-to-many bag collection when the select is NOT based in the parent's id column, but rather on another column of the parent. I have two tables involved: Job (the parent) and JobInfoBTRes (the child collection elements). The SQL statement should have the meaning of: Select * from JobInfoBTRes where ...

97. bag with sql-delete    forum.hibernate.org

98. bag mapping problem, how to specify update = false???/    forum.hibernate.org

Hibernate version: 3 Code:

99. how to use a "link" table for getting a bag    forum.hibernate.org

Hello, here's my problem : I have those sql table (i short them cause there are a lot of non useful informations) USER : "id_user","profile_id" PROFILE : ""profile_id","name" (something like (1,Admin), (2, SImpleUser), etc...) FUNCTIONALITY_RIGHT : "functionalitiyroght_id" ,"profile_id", "functionality_id" FUNCTIONALITY : "functionality_id", "name" functionality_right link a profile with a functionality : a profile will have many functionalities. I have a java ...

100. Understanding : cannot simultaneously fetch multiple bags    forum.hibernate.org

I was reading up on this exception: Code: org.hibernate.HibernateException: cannot simultaneously fetch multiple bags And I now understand why this is: http://www.jroller.com/eyallupu/entry/hibernate_exception_simultaneously_fetch_multiple However, if you take Eyal Lupu his example, you'll see that indeed the join duplicated the "child2-1" entry (while parent-1 only has one child2-1 relation). Now, the instance loaded in memory will have two times the same reference (so ...