1. JPA How add unique contraint on column for @OneToMany relation like on username stackoverflow.comI have a nice problem. I'll resume the context.
I have a Class :
|
2. TABLE_PER_CLASS Bidirectional @OneToMany Problem stackoverflow.comHibernate can do bidirectional polymorphism with This strategy supports one-to-many associations provided that they are bidirectional.I'm trying to get a simple example to ... |
3. Unable to persist new object graph using JPA (hibernate) with simple oneToMany - ManyToOne relationship stackoverflow.comI am attempting to persist/merge a brand new object graph through jpa but it seems like the order of persistance is incorrect as it tries to save sub objects who have ... |
4. JPA how to remove parent without delete children? stackoverflow.comI'm trying to remove a parent, but I keep getting a Foreign Key violation. If I put Cascade.ALL in the parent, it delete the children too. And it's now what ... |
5. How to use Hibernate Criteria for joining two tables with OneToMany relation stackoverflow.comI have two tables for which I can't implement mapping |
6. OneToMany, ManyToOne why value of parent in children is null? stackoverflow.comI read similar questions, but still have problem. Configuration info: Hibernate 3.5.1 Parent class Question:
|
7. @OneToMany pulling all related fields except foreign key stackoverflow.comI have a Demographics entity that contains a Collection of MedicalRecordsReceived entities:
|
8. JPA: uni-directional OneToMany question stackoverflow.comI have the following classes:
|
9. OpenJPA treats field with oneToMany Mapping as a Blob stackoverflow.comI'm having a serious issue with JPA's implementation of OneToMany relationships and I'm looking for a reasonable workaround. The issue is that JPA appears to get confused reading it's @OneToMany ... |
10. Hibernate : Use of @OneToMany or @ManyToMany targeting an unmapped class stackoverflow.comi can't find where is my error, where i'm not mapping my class, but to me everything shoud be fine.. but isn't. Can someone help me to find it ?
|
11. How to Fetch @OneToMany and @ManyToMany Entities stackoverflow.commy issue is very related to the following: |
12. How do you order a oneToMany join table in hibernate criteria stackoverflow.comSay I have a class Mother with a oneToMany mapping to Kittens
I am using the criteria Api to provide a list
|
13. When using setFetchMode in Hiberate criteria how do I set a restriction on the oneToMany table stackoverflow.comI'm struggling to create a Hibernate criteria query that uses setFetchMode(... SELECT) and places a restriction on the returned child records. If I use a creteAlias as recommended it produces an ... |
14. Set null value on delete with @OneToMany stackoverflow.comI have two classes, Person and Position. Person can be assigned to many Positions, and one Position can have only one Person (or no Person assigned). Everything works fine, but deletions of ... |
15. JPA2.0: Delete Entity in OneToMany RelationShip stackoverflow.comHow do I delete an entity in a OneToMany relationship.
|
16. @OnetoMany class call stackoverflow.comi need some help for my class...
|
17. Java - A JPQL Query to delete a oneToMany relationship stackoverflow.comIf I have this 3 entities : @Entity public class Student {} @Entity @Inheritance(strategy=InheritanceType.JOINED) ... |
18. Insert fails for @OneToMany Hibernate mapping with inheritance stackoverflow.comI'm using Java and Hibernate 3.6.4.Final. |
19. JPA (hibernate) OneToMany relationship and null stackoverflow.comI have a relation OneToMany between a class Resident and ResidentInfo ResidentInfo is not supposed to exists without Resident, but ResidentInfo is not required Here are my classes:
|
20. JPA (hibernate) Mapping OneToMany incorrect? stackoverflow.comHi I'm new to JPA and I think I have an issue with my mapping annotations I'm using hibernate 3.6.1 final with JPA 2 Here are my class :
|
21. annotation mapping bidirectional OneToMany/ManyToOne not fetching? stackoverflow.comI'm clearly struggling to understand this so help greatly appreciated... I have the following mapping:
|
22. Save a model with a relation OneToMany stackoverflow.comHi I have models like this :
|
23. JPA : best practices with unidirectional OneToMany stackoverflow.comI have several little questions about best practices with JPA (via hibernate). My first question is about the complexity of one domain model. I've got a model Account which represents an... account ;) An ... |
24. JPA: Table Relationship Issue stackoverflow.comI've two tables: reservation and machine. So, I have two classes: Reservation
|
25. Hibernate Mapping Conflicts stackoverflow.comI am having a parent table and child table in Oracle Schema. Also created a Hibernate Classes for this tables. for e.g. parent table Called A which has primary key p_key ... |
26. Unneeded column added trying to set up OneToMany relationship stackoverflow.comI'm trying to set up a OneToMany relationship between an author and his posts with author as the foreign key and username as primary key, using JEE 6 and toplink+eclipselink as ... |
27. hibernate OneToMany criteria returns duplicates stackoverflow.comI have an association mapped by the following:
|
28. OpenJPA: Update statements not generated for a @OneToMany mapping (with persistent entity) stackoverflow.comOpenJPA 1.2.2 Spring 3 HSQLDB 2.0 JUnit Testing with SpringJUnit4ClassRunner & Spring @Transactional on Testclass --
|
29. Have to persist both sides of @OneToMany self-join stackoverflow.comI have a bi-directional @OneToMany self-join on a JPA 2.0 entity and I find that I have to persist both sides of the relationship for the changes to be reflected in ... |
30. left outer join in microsoft sql server stackoverflow.comPlease explain the behaviour. I am following struts2 and hibernate5.0 and i am not using any annotations. I have two tables table A and table B Table A has columns id , model, ... |
31. Eclipselink, possible to do @OneToMany relationship to class on an @EmbeddedId property as foreing key? stackoverflow.comI want to do a Jaas login module using JPA to store my AuthUser and AuthUserRole. I'll focus on the JPA side on this question. Here is what I would do in ... |
32. workaround/get rid of multiple writable mappings in OneToMany and ManyToOne relationship? stackoverflow.comi've been trying to solve a problem but got stuck now. |
33. @OneToMany List<> vs Set<> difference stackoverflow.comIs there any difference if I use
or if I use
both work OK, i know difference between list and a set, however I don't know if this makes ... |
34. Constract JPA query for a OneToMany relation stackoverflow.comI've those 2 entities
|
35. Hibernate OneToMany Relation Error stackoverflow.comI'm newbie on Hibernate. I failed when I try to make one to many relationship between two classes. It gave an error:
|
36. Hibernate updates @Version property of entity when adding items to @OneToMany collection - is this normal? stackoverflow.comI have two Foo and Bar entities which have a 1:n relationship:
|
37. (Open-)JPA 1.0: OneToMany-related list is null, when fetching in lazy mode stackoverflow.comI have a problem with JPA 1.0 (OpenJPA) Following situation
|
38. Hibernate OneToMany without a foreign key stackoverflow.comIs there any way to tell JPA to not create a Foreign Key on a OneToMany relationship when creating tables? Here is some sample code of what I'm trying to do: I ... |
39. Update an entity (OneToMany relationship) stackoverflow.comi got 2 entities, Student and Phone, and a relationship one-to-many between them.
|
40. How to perform the OneToMany Hibernate mapping when reverse reference is just an id attribute, not full reference stackoverflow.comLet me be more specific, it was hard to describe this in the title. I have a class called Bucket, which has a map to a series of Labels. The Bucket class ... |
41. JPA: @SqlResultSetMapping OneToMany problem stackoverflow.comI am trying to do some NatveQueries, but I am stuck with @SqlResultSetMapping configuration. I have those classes:
|
42. How to add children by specifying only children's id in an OneToMany relationship? stackoverflow.comFor example, I have Person and Pet.
|
43. overriding lazy fetch in OneToMany association stackoverflow.comI've been facing the LazyInitializationException and had three solutions by googling it:
|
44. JPA @OneToMany Mapping Problem stackoverflow.comI am trying to do do JPA/Hibernate mappings to map two tables, but am getting this error. any help would be greatly appreciated!! Restaurants.java
|
45. @OrderColumn, @OneToMany & null index column for collection stackoverflow.comI am trying to create parent child tables where the order is preserved. The example 7.8 from Hibernate documentation shows how to do this:
|
46. How to access a OnetoMany join table in JPQL? stackoverflow.comI want to write a lttl complicated query in JPQL where i access a OneToMany Join table. I get QuerySyntaxException: Pan_PanRes is not mapped. QUERY - ... |
47. Hibernate @OneToMany(mappedBy="...") relation not being cached stackoverflow.comI have a following class called Article (simplified):
|
48. annotation to filter results of a @OneToMany association stackoverflow.comI have parent/child relationship between two tables, and the corresponding mapping in my Java classes. The tables roughly look like that:
and ... |
49. Version of all children is incremented in OneToMany when merging parent entity stackoverflow.comI have a OneToMany relationship defined like this:
|
50. org.hibernate.AnnotationException: Collection has neither generic type or OneToMany.targetEntity() stackoverflow.comI used Hibernate Tools to generate my Hibernate POJO mapping. Unfortunately the code generated by Hibernate tools seems not to work, I get the exception org.hibernate.AnnotationException: Collection has neither generic type or ... |
51. JPA - OneToMany, ManyToOne, OneToOne problem stackoverflow.comGiven the following two entities :
|
52. Hibernate OneToMany generated foreign key stackoverflow.comI have the following table structure:
Then, I have the following objects:
|
53. JPA EclipseLink @OneToMany returns empty set stackoverflow.comI am using an embedded id:
And I have the following tables:
|
54. How to select the size of a @OneToMany(mappedBy))collection using HQL stackoverflow.comFirst some context and explanation: I have written the following HQL query:
LogicalGroup is an entity with scalar ... |
55. Hibernate -- Using @SecondaryTable, @OneToMany stackoverflow.com(Simplified Example below) I'm trying to map one POJO class with 2 DB tables and also creating a OneToMany association. Here is how the class looks like..
|
56. OneToMany HIbernate Projections problem stackoverflow.comI'm trying to create a Hibernate projection for database stored File and its versions like this:
|
57. JPA OneToMany multiple column join enum stackoverflow.comI am using JPA for my project. I am stuck with getting to retrieve entities in a OneToMany relation. Here is the scenario. My Entities are EntityX -Id -name -etc EntityY -Id -name -etc EntityZ -Id -name -etc EntityD -Id -EntityRefType (Enum of X/Y/Z) -EntityRefId (Can be X.id Or ... |
58. JPA/Hibernate, @OneToMany and constraints (Oracle) stackoverflow.comI have the following scenario:
|
59. JPA OneToMany Cacade.ALL creating two entries for the parent stackoverflow.comWe are using JPA-Hibernate in our project We have a entity, say a A which has a list of entity Bs. Within A, there is a OneToMany on list of Bs Within B, there ... |
60. OneToMany Mapping with with Joined Inheritence Annotations: stackoverflow.comI have the following domain classes:
|
61. Play JPA Hibernate special self-referencing bidirectional ManyToOne/OneToMany relationship join question stackoverflow.comI'm new to the Play Framework, Java and Hibernate JPA so appreciate any help (come over from PHP). My goal is to have a tree of categories. It's essentially an infinite parent/child ... |
62. How to merge a @OneToMany relationship effectively? stackoverflow.comFor example I have the following two entity classes with a one-to-many relationship:
|
63. Hibernate: mapping @OneToMany / @ManyToOne problems (not using entity primary keys) stackoverflow.comI am new to Hibernate / Spring, trying to map legacy database while creating a little web utility, which should ease some work for the colleagues. As I had mapped the ... |
64. Getting list of null values when retrieveing list of child entities in hibernate using bidirectional @OneToMany stackoverflow.comI have problem when accessing list of child entities in my @OneToMany association in hibernate. I am able to load the parent object using successfully
But when i try to access ... |
65. Hibernate: map last row of a @OneToMany relation stackoverflow.comI have a relation between element and its names. All historical names as well as the current one are located in table "element_name" that has field "created". The row last created ... |
66. JPA composite key @OneToMany stackoverflow.comAloha! I already have the following db schema, which I'd like to recreate with Java and plain JPA annotations (using hibernate as provider, so hibernate specific annotations would work as a last ... |
67. JPA (hibernate) relation OneToMany with date stackoverflow.comI need to create hibernate relation one to many between Department and Person (one Department has many persons). The problem is that I want to maintain time validity. Without ORM (hibernate) it ... |
68. Hibernate relation OneToMany with non unique key stackoverflow.comI am not able to describe my problem, I try it again with example: I have two entities (tables): Department and Person. Both tables have a field CODE which is not unique. ... |
69. JPA: @JoinTable - Both columns are Primary Keys.. How do I stop that? stackoverflow.comThis is my annotation I use to generate my Join Table.
|
70. Hibernate mapping: OneToMany and OneToOne on child object property stackoverflow.comHere is parent class Enterprise. It has employers and one of them is president of enterprise.
|
71. Override @OneToMany targetEntity in subclass? stackoverflow.comConsider the following example:
|
72. JPA/Hibernate OneToMany & ManyToOne annotations stackoverflow.comI'm writing code that looks like Google Latitude (locate a user). I'm under tomcat 6.0.33, using jpa/hibernate, and easybeans 1.1 They work independently, but when I try to link them it fails:
|
73. orderBy and OneToMany-Relation -- criteria query with jpa 2.0 stackoverflow.com
I want the queryResult to be ordered by the Date ... |
74. JPA OneToMany with inherited entities using DiscriminatorOptions and orphanremoval stackoverflow.comI've a problem, that I can't solve for days now. I have read many docs, searched many forums, but found no solution. I've inherited class as the code shows below:
|
75. Mapping a unidirectional OneToMany association on a wrapper object using JPA stackoverflow.comI am converting Hibernate configuration over to using JPA. The current configuration has an AlertPref class (ALERT_PREF table) with a collection of Long types that are primary key values from ... |
76. one-to-many bidirection performance issue stackoverflow.comi have one doubt, that is when we create one-to-many as bidirectional. we will put one parent class reference in child class. see the code. Person.java
|
77. one-to-many detached Criteria parent table fetch based on child table stackoverflow.comi have one problem in one-to-many mapping using hibernate. i have 2 classes, Person and Address. Person is mapped by Address ( one-to-many) i want get all Person where Address = "xxxx";. how ... |
78. Hibernate and H2 "Referential integrity constraint violation" for OneToMany bidirectional mapping stackoverflow.comSo I have two simple beans -- FatKid and Hamburgers. Now, for reasons unbeknownst to me I need to be able to not only look up all of the hamburgers ... |
79. OneToMany and complex PK stackoverflow.comI have problem with one-to-many mapping.
|
80. TWO - records are getting saved In OneToMany Bidirectional Relation in Update Operation? stackoverflow.comI am new to JPA, using JPA 2.0. I am facing on problem with OneToMany Bidirectional Relation. When i am updating these, TWO - records are getting saved. My Entities are: 1) Claimant: having ... |
81. is it possible to map a Map |
82. @OneToMany mapping list size limit stackoverflow.comIs there any way to limit the list's size of the @OneToMany relationship in JPA? Here's my code sample:
I'm using EclipseLink 2.3 JPA implementation.
Thanks in advance.
... |
83. Hibernate inserts duplicates into a @OneToMany collection stackoverflow.comI have a question concerning Hibernate 3.6.7 and JPA 2.0. Consider following entities (some getters and setters are omitted for brevity):
|
84. Jpa OneToMany not persist child stackoverflow.comI've trouble on persistence of OneToMany field. These are two simplified classes I'm using to make test.
|
85. Bidirectional OneToMany assocation between sub and superclass not working (JPA with Hibernate 3.6.7) stackoverflow.comI have two classes, Employee and Manager. Manager extends Employee, as it is a type of employee. Employee has an instance of Manager, which represents the idea of an ... |
86. remove an entity in OneToMany relationship stackoverflow.comI have trouble understanding what minimal effort is needed on my part in removing an Entity from a OneToMany relationship. I find a lot of examples just adding Entities to these ... |
87. Order a Hibernate Criteria result by an Agreggation of a Property of OneToMany relationship stackoverflow.comI have the following classes mapped:
|
88. JPA ManyToOne/OneToMany annotation return NullPointer during select operation stackoverflow.comI'm try to use JPA to map two tables with N:N relation, the binding table has 3 columns (the 2 foreigns keys + a custom column), so I must to use ... |
89. Hibernate OneToMany. Getting empty list when loadin from DB stackoverflow.comI'm new to Hibernate so my question can be silly a bit, by i'm stucked and will be glad to get help. I have two entities: Book and Tag with following ... |
90. JPA Union on two @OneToMany Collections on the parent object stackoverflow.com
|
91. Hibernate OneToMany using annotations with legacy database stackoverflow.comI'm working with a legacy database that isn't normalized at all. They've been coding relationships directly in the program (written in Uniface). Now, they are migrating to Java. Sadly, I can't ... |
92. Efficiently determining the IDs of entities referenced via OneToMany relationship stackoverflow.comLet's say I have a Hibernate entity that declares a
|
93. "Illegal attempt to map a non collection as a @OneToMany, @ManyToMany or @CollectionOfElements" in hibernate when annotating a ConcurrentHashMap stackoverflow.comI've tried annotating a property accessor whose return value is a map as follows:
This is in accordance with the hibernate user guide (section 2.2.5.3.4.). However, I get:
|
94. Difference between using @OneToMany and @ManyToMany stackoverflow.comI am having some trouble understanding the difference between |
95. Hibernate oneToMany Abstract Class override ID stackoverflow.comI'm using JPA 1.0 so I am limited in what I can do but I still think it should be possible to do the following however I cant get it working...
|
96. JPA OneToMany relation not automatically populated? stackoverflow.comI have a simple OneToMany relation between Task and TaskError. Task maps the TaskErrors:
The TaskErrors should be deleted when the Task is ... |
97. JPA persist with OneToMany ManyToOne stackoverflow.comI am trying to persist entities with @OneToMany and @ManyToOne relationships.
problem is that it inserts NULL instead of customer_id in the ... |
98. update @OneToMany in Play framework stackoverflow.comI have a simple form that intend to update a list of items in a cart. The form works pretty well, I display an input text for each item in the cart. But ... |
99. Hibernate - HQL to fetch a collection from Unidirectional OneToMany relationship stackoverflow.comI have an Class with a unidirectional one to many relationship as follows:
|
100. OneToMany relationship is not working stackoverflow.comMy Tables: Product: id, name Offer: id, value, product_id Entities:
|