1. Why @OneToMany does not work with inheritance in Hibernate stackoverflow.com
|
2. JPA @OneToMany Sets and unique contstaints stackoverflow.comI have the following scenario: I have a system full of users. There is a desire to run contests for users who log into the site over a week or so. ... |
3. jpa inheritance and a OneToMany Relation stackoverflow.comI have written the following code:
|
4. hibernate OneToMany List ordering persisting but reversing? stackoverflow.comso I have a persistent entity that has a @OneToMany list of another entity and I need the list order to be able to be edited by the user, which works ... |
5. JPA Entity Mapped as OneToOne as well as OneToMany stackoverflow.comConsider the following JPA entity. My application instance class must always have a OneToOne reference to 4 special instances of Envelope but it also has a set of 0-infinite user ... |
6. Hibernate Example OneToMany with compositeKey stackoverflow.comCan you give me an example of a Hibernate mapping for the following situation:
|
7. When to use inverse=false on NHibernate / Hibernate OneToMany relationships? stackoverflow.comI have been trying to get to grips with Hibernate's inverse attribute, and it seems to be just one of those things that is conceptually difficult. The gist that I get ... |
8. Hibernate @OneToMany with mappedBy (parent-child) relationship and cache problem stackoverflow.comI have this problem for a long time now, I have searched the web and SO in and out and didn't find a solution yet. I hope you can help me ... |
9. How to have a @OneToMany relationship with its own entity? stackoverflow.comI have items that can contain further items, therefore I need a @OneToMany relationship with the same Entity. I have configured my field like this:
However, Java always ... |
10. Hibernate @OneToMany - mapping to multiple join tables stackoverflow.comConsider the following domain model:
In my design, I was attempting to create two join tables to manage the associations; issue_comments, and entry_comments. I assumed @OneToMany on ... |
11. Hibernate @OneToMany without a separate join table stackoverflow.comConsider the following database schema:
|
12. Determining ManyToMany vs OneToMany using ClassMetadata stackoverflow.comI am using ClassMetadata to determine the structure of a hibernate POJO. I need to determine if a collection is OneToMany or ManyToMany. Where is this information? Can I get ... |
13. Java JPA OneToMany - "Many" relationship not refreshing stackoverflow.comI'm running into a strange problem using the Toplink implementation of JPA. I'm writing a stand-alone application to manage loans. I define a LOAN class that has a OneToMany (bi-directional) relationship ... |
14. How does Hibernate find the generic type of a collection in a @OneToMany mapping? stackoverflow.comGiven a simple entity relationship:
How does Hibernate find out that the generic type of multiples is Multiple? This information is impossible to ... |
15. @OneToMany association joining on the wrong field stackoverflow.comI have 2 tables, devices which contains a list of devices and dev_tags, which contains a list of asset tags for these devices. The tables join on dev_serial_num, which is ... |
16. making a jpa oneToMany relationship effective? stackoverflow.comI have written a very basic and naive oneToMany relationship between a ChatComponent and its Chat Messages like this:
This basically works, i.e., doing something like:
|
17. JPA and EJB - OneToMany problem stackoverflow.comI try to build simple Java EE application that uses JPA + EJB3 and Stripes. It's a little address book. I'm using 2 JPA entities, Person and Email. Every person can have ... |
18. JPA OneToMany not deleting child stackoverflow.comi have a problem with a simple @OneToMany mapping between a parent and a child entity. All works well, only that child records are not deleted when i remove them from ... |
19. @OneToMany without inverse relationship and without a join table? stackoverflow.comThis is a similar problem to "Hibernate @OneToMany without a separate join table", in that I need a @OneToMany relationship without a join table. However, I would also like ... |
20. hibernate criteria OneToMany, ManyToOne and List stackoverflow.comI have three entities ClassA, ClassB and ClassC.
|
21. Hibernate: Why @OneToMany with List |
22. Hibernate performance issue with OneToMany / nullable relationship stackoverflow.comWe use
We have a scenario with a lot of data (100K inserts) ... |
23. JPA concatenating table names for parent/child @OneToMany stackoverflow.comWe are trying to use a basic @OneToMany relationship:
|
24. Hibernate mapping, on a unmapped class stackoverflow.comI' ve got 2 tables... Challenge and ChallengeYear, ChallengeYear is only to create a list of years in challenge. I only want to make Challenge an entity, containing a list of List ... |
25. The type of field isn't supported by declared persistence strategy "OneToMany" stackoverflow.comWe are new to JPA and trying to setup a very simple one to many relationship where a pojo called Message can have a list of integer group id's defined by ... |
26. In a bidirectional JPA OneToMany/ManyToOne association, what is meant by "the inverse side of the association"? stackoverflow.comIn these examples on TopLink JPA Annotation Reference: Example 1-59 @OneToMany - Customer Class With Generics
|
27. @OneToMany and composite primary keys? stackoverflow.comI'm using Hibernate with annotations (in spring), and I have an object which has an ordered, many-to-one relationship which a child object which has a composite primary key, one component of ... |
28. How to specify the cardinality of a @OneToMany in EclipseLink/JPA stackoverflow.comI'm trying to impose a @Oneto7 association. I'd have imagined an attribute that specifies the target many value, but have found none. If there is no such attribute, how else, in ... |
29. JPA @OneToMany and composite PK stackoverflow.comGood Morning, I am working on project using JPA. I need to use a @OneToMany mapping on a class that has three primary keys. You can find the errors and the classes ... |
30. why when I delete a parent on a one to many relationship on grails the beforeInsert event is called on the child? stackoverflow.comI have a one to many relationship and when I try to delete a parent that haves more than one child the berforeInsert event gets called on the frst child. I ... |
31. Java JPA @OneToMany needed to reciprocate @ManyToOne? stackoverflow.com
Given that I have created two tables using the SQL statements above, and I want to create ... |
32. Lost with hibernate - OneToMany resulting in the one being pulled back many times stackoverflow.comI have this DB design:
|
33. CascadeType problem in One to Many Relation stackoverflow.comI have two classes which have a Unidirectional One to Many relation with each other.
|
34. JPA polymorphic oneToMany stackoverflow.comI couldn't figure out how to cleanly do a tag cloud with JPA where each db entity can have many tags. E.g Post can have 0 or more Tags User can have 0 or ... |
35. Update OneToMany list after entity save in Hibernate stackoverflow.comi have relationship:
Now look this:
Now ... |
36. JPA/Hibernate conditionally onetomany relationship? stackoverflow.comI am using Hibernate Tools to generate the DAO and classes straight from database. There are two tables (table A and B) in the database, and there is a one to ... |
37. Hibernate 3.5.x: NoSuchMethodError: javax.persistence.OneToMany.orphanRemoval stackoverflow.comI'm trying to upgrade to Hibernate 3.5.3-FINAL. When running my unit tests, I now receive the following exception:
My classpath contains the following JAR's:
From the hibernate dist:
Other jars:
|
38. Fetch multiple onetoMany relationships Hibernate JPA stackoverflow.comI am using Hibernate JPA 1.0. I have the following type of model and I consider manyToOne and oneToOne relationships "eagerly" fetched and oneToMany "lazily" fetched. I want to fetch Entity A and ... |
39. JPA OneToMany problems after update stackoverflow.comI have 2 Classes, Parent and Child, with a
The Parent class has also other fields like the name.
I'm in a ... |
40. Hibernate : OneToMany mapping not based on PK? stackoverflow.comI have 2 entities/tables.
One is a proper entity, let's call it |
41. @OneToMany does not insert foriegn key in Hibernate+JPA stackoverflow.comI am facing some strange issue, I have a user table(use class) and a country table(country class). An user may have N number of countries. Hence, I have added a List ... |
42. JPA (hibernate) onetomany relation stackoverflow.com
|
43. Java JPA, Swing and Beans Binding: Changes to a OneToMany collection in entity not immediately reflected in GUI stackoverflow.comI am trying to learn JPA with Hibernate and binding it to a GUI built in Netbeans with Beans Binding. It is a application listing dogs. Each dog can have one ... |
44. Duplicate entry using unidirectional mapping using JoinTable stackoverflow.comI created a JPA unidirectional join table following the JPA documentation very closely (http://www.jpox.org/docs/1_2/jpa_orm/one_to_many_list.html). I could insert an applicant, A, with joblist (JobOne, JobTwo) without any problems. However, when I tried to ... |
45. Hibernate, Persistence and @OneToMany and @ManyToOne annotations problems stackoverflow.comI have some problem with @OneToMany and @ManyToOne annotations. I have two class Suite and SuiteVersion. A SuiteVersion is dependent of a suite. So i have implemented this in my code: Class Suite ... |
46. Lost with JPA @OneToMany and composite PK stackoverflow.comI'm pretty lost with mapping the following structure with JPA annotations.
|
47. Grails AddTo in for loop stackoverflow.comI am facing a problem due to that i'm newbie to grails i'm doing a website for reading stories and my goal now is to do save the content of the ... |
48. What is the best optimized way to select many entities with subentities in JPA? stackoverflow.comLet's say we have:
and
|
49. JPA: Merge @OneToMany Duplicate entry error stackoverflow.comI'm alwways getting the following error:
|
50. OneToMany Annotated Collection Not Persisting via Hibernate stackoverflow.comI currently am trying to persist a collection using @OneToMany(cascade=CascadeType.ALL) for a simple list of objects. The table for Parent_Child gets created in MySQL but the keys for each object are ... |
51. JPA+Hibernate(J2SE) @OneToMany - Millions of records slows adding a new object down stackoverflow.com
|
52. How would you declare the OneToMany member variable stackoverflow.comWhich of the following declaration would be the right one to choose for allocating the right amount of memory. Option 1 has an initial collection capacity of 0 and Option 2 ... |
53. Persisting OneToMany relationship only persists first object in set? stackoverflow.comBeen messing around with Hibernate and PostgreSQL trying to get it to work as expected. But for some reason when I try to persist an object with a @OneToMany relationship with more ... |
54. JPA: question on impedance mismatch in OneToMany relations stackoverflow.comI have a question about JPA-2.0 (provider is Hibernate) relationships and their corresponding management in Java. Let's assume i have a Department and an Employee entity:
|
55. Hibernate onetomany mapping stackoverflow.comI try to map a relation for the first time. I have found a lot of ways to go. There are two classes: - Project (Parent) - Application (Child) So one project can ... |
56. Hibernate retrieving list from onetomany stackoverflow.comI managed (as you can see in older posts from me) to insert a onetomany relation through hibernate. My two entity classes look like following: Project.java:
|
57. Hibernate: How do I write the HQL for getting records of an entity without records for its identifying relation stackoverflow.comI have Hibernate Objects defined as
|
58. Hibernate One to many stackoverflow.comAs per hibernate documentation: To map a bidirectional one to many, with the one-to-many side as the owning side, you have to remove the mappedBy element and set the many ... |
59. Hibernate: joining with one of the keys of a multi-keyed table stackoverflow.comI've got a table Category and a table TranslatableText. The category is like this
|
60. jpa removing child from collection stackoverflow.comI'm using JPA over Hibernate in my web-app. Here are two entities (only getters are shown): class Child { private Parent parent; @ManyToOne(optional=false) @JoinColumn(name="parent_id", referencedColumnName="parent_id", nullable=false, updatable=false) public ... |
61. Hibernate: Update onetomany list stackoverflow.comI have got a onetomany relation in Hibernate:
Now, I ... |
62. Hibernate - OneToMany - Several Columns stackoverflow.comI have those 2 tables Teacher and Contact, a teacher can have x Contacts SO here we are looking at a @OneToMany association. Tables Structure: User [userid, username, email,...] Contact [contactid, contactname, ref, reftype,...] I want ... |
63. Hibernate ConstraintViolationException when cascading delete on @OneToMany stackoverflow.comThis may seem like a very simple question, but I have been struggling with it for a while. I have two entities Client and User where Client is a parent of ... |
64. JPQL to query entity connected to another by @OneToMany stackoverflow.comHas:
|
65. How to persist a @OneToMany update with hibernate? stackoverflow.comin my application I've got users which have files. The UserVO has the following mapping:
Then I ... |
66. How can I do paging with @OneToMany collections stackoverflow.comSuppose I have a Post entity and a Comment entity and a one to many relationship:
|
67. one shot delete with hibernate on onetomany association stackoverflow.comOn a onetomany associations I am attempting to delete all the many associations and see that multiple delete statements are being executed.
|
68. Constraint violation in Hibernate unidirectional OneToMany mapping with JoinTable and OrderColumn when removing elements stackoverflow.comI have a problem when removing elements from a list mapped as described above. Here is the mapping: @Entity @Table( name = "foo") class Foo { private List bars; ... |
69. JPA: Entity X has a OneToMany relationship to itself. How? stackoverflow.comI have one Entity call |
70. Deletion order for contained @OneToMany members stackoverflow.com
I have @OnDelete annotation on all the @OneToMany members. What would be the order of deletion of these objects when the ... |
71. Hibernate mapping association OneToMany with constraint restriction stackoverflow.comI have the following code:
|
72. Issue With @OneToMany and Abstraction in JPA stackoverflow.comI have an issue with one-to-many relationship. I have an abstract class Artifact.java. This is not mapped to a table. There are other concrete classes extending from this, and they are ... |
73. Remove duplication in OneToMany/ManyToOne bidirectional relationship using a JoinTable (with an OrderColumn) stackoverflow.comI have a OneToMany/ManyToOne bidirectional relationship using a join table. The children are in a List and are ordered. Here's the setup: Parent:
|
74. hibernate: list of child ids retrieval for parent stackoverflow.comTechnology: Hibernate 3.0 Suppose i have Entity class Company
|
75. one to many mapping to a property of superclass stackoverflow.comI have a superclass "Questions" and its subclass "MultipleChoiceQuestions" superclass ha a field "activity" I want to create a Set and use OneToMany annotation using "mappedBy = "activity" eg..... @OneToMany(fetch = FetchType.EAGER, cascade = CascadeType.ALL, ... |
76. JPA OneToMany, ManyToOne bidirectional stackoverflow.comI'm trying to get rid of the following error: The attribute [lcritical] in entity class [class pl.pwc.docs.pl704.PL704_Error] has a mappedBy value of [pl704_error] which does not ... |
77. JPA @OneToMany join on part of a multipart key stackoverflow.comA Profile table has a one to many association with a Privilege table. The privilege table has a multipart key, of a profile_id and a privilege_id. I want to join from ... |
78. java.lang.NoSuchMethodError: javax.persistence.OneToMany.orphanRemoval()Z stackoverflow.comI am getting this error:
These are the jars in my classpath:
|
79. OpenJPA: "cant-set-value" exception persisting entity with onetomany field stackoverflow.comSo I have two tables:
and a join table CRAWL_SEED mapping the two with fields:
A client crawl can ... |
80. javax.persistence one to many - how does it work? stackoverflow.comSay that I have 2 Entites of User and Message. User has a field called "messages" that has a list of messages and is annotated with "@manyToOne" and Message has a ... |
81. How to maintain a Map |
82. Hibernate criteria with projection not performing query for @OneToMany mapping stackoverflow.comI have a domain object, Expense, that has a field called initialFields. It's annotated as so:
Now I'm trying ... |
83. When is @OneToMany list populated in Play framework? stackoverflow.comThe Play framework's Yet Another Blog Engine example has a Post class with children Comments:
When data is populated by the ... |
84. How to map @OneToMany to a java.util.Map with custom keys? stackoverflow.com
And I'd like to have this:
|
85. Envers @OneToMany audit on CREATE(0) but not on DELETE(2) stackoverflow.comI've looked a quite a few similar issues like: http://community.jboss.org/message/580407#580407 but haven't found a solution yet. An Activity has many Occurences, when an occurence is created the activity_occurence_AUD table is ... |
86. @MappedSuperclass and @OneToMany stackoverflow.comUML Diagram I need association OneToMany from Country to superclass Place (@MappedSuperclass). It could be bidirectional. I wolud need something like @OneToAny...
|
87. Hibernate OneToMany and ManyToOne confusion! Null List! stackoverflow.comI have two tables... For example - Company and Employee (let's keep this real simple)
Employee.company_id is a foreign key.
My entity model looks like this...
Employee
|
88. JPA query, oneToMany or manyToOne, should both work? stackoverflow.comI am porting some code from an old OpenJPA implementation to a more recent one, specifically to OpenJPA 2.1.0-SNAPSHOTversion id: openjpa-2.1.0-SNAPSHOT-r422266:990238My previously working query failed in this new environment ... |
89. inverse=true in JPA annotations stackoverflow.comIn my application I use JPA 2.0 with hibernate as the persistence provider. I have a OneToMany relationship between two entities (using a @JoinColumn and not @JoinTable). I wanted to know ... |
90. EclipseLink/JPA @OneToMany Backpointer Cardinality Error stackoverflow.comI am trying to generate a unidirectional one-to-many mapping between two JPA entities. In my |
91. OneToMany Update not working in child class stackoverflow.comI have OnetoMany relationship between Person and Role class. A Person can have multiple roles. When I create a new person, roles (existing records) should get updated with the person ids. ... |
92. Hibernate problem - "Use of @OneToMany or @ManyToMany targeting an unmapped class" stackoverflow.comI'm finding my feet with Hibernate Annotations and I've hit a problem I hope some one can help with. I have 2 entities, Section and ScopeTopic. Section has a List class member, ... |
93. HIbernate - "A Foreign Key referring |
94. Bidirectional OneToMany/ManyToOne mapping in OpenJPA JPQL problem stackoverflow.comI have two classes with a bidrectional relationship:
|
95. JPA replace 1:M set for an entity stackoverflow.comI have the following entities:
|
96. Hibernate ManyToOne and OneToMany i one Entity stackoverflow.comI have 3 tables University(id,name), Group(id,name,university_id), Student(id,name,number,group_id). One university have many groups and one group have many students. My POJOs look like this:
|
97. JPA 2.0 Hibernate @OneToMany + @MapKeyJoinColumn stackoverflow.comOneToMany + MapKeyJoinColumn doesn't work for me, please suggest what I'm doing wrong. I'm using JPA 2.0 + Hibernate 3.6.1 And want to map following tables: To ... |
98. Does JPA support a @OneToMany mapping between entities without a foreign key constraint in the database? stackoverflow.comThis is for a legacy database. The two database tables in this relationship don't have a foreign key constraint even though the child table column holds the PK of the ... |
99. JPA OneToMany, always empty stackoverflow.comi have a bidirectional, one to many, and many to one relationship. say, a Company has many Persons, and a Persons has one company, so, in company,
|
100. Create ORMapping using OneToMany relations for 3 tables stackoverflow.comI have 3 tables: Project, User and Role. Now I would like to have a table Project2User2Role with the embedded key id_project, id_user,. I tried it using @OneToMany relations in all three ... |