Questions tagged [bidirectional-relation]

98 questions
0
votes
0 answers

getting exception "org.hibernate.type.SerializationException: could not deserialize" after removing bidirectional mapping from entity in hibernate

I am getting below exception while I removing ManyToOne mapping from client model below are the entities I Application Entity looks like: @Entity @NamedQuery(name = "Application.findAll", query = "SELECT a FROM Application a") public class…
0
votes
1 answer

How to remove owing side from inversed MTO relation side without cascade option?, how to update the inversed side of relation?

How to remove owing side from inversed MTO relation side without cascade option? , how to update the inversed side of relation without cascade option? Error is that if i change address(OTM) of the room (MTO), room remains in the previous address,…
0
votes
3 answers

Save parent and child entities at same with a notnull foreignkey towards the parent (Spring JPA / Hibernate)

I've two entities in a MySQL DB and I want to realize a bi-directional mapping, with an automatic save of the new child when save a new parent. MACCHINA (parent) fields: id, marca PERSONA (child) fields: id, nome, macchina_id (foreign key NOT…
0
votes
1 answer

Aggregation + Multiplicity UML Clarification

I don't understand what the hollow diamond next to Class A together with the multiplicity next to Class B implies about the relationship between Class A and B. Could someone clarify this for me?
0
votes
1 answer

Characteristics of bidirectional relationships in UML?

Considerer this: As far as I know in case 1 a is related to b, and a is aware of b so a is able to send messages to b, but b is not aware of a so b is not able to send messages to a. In the other hand, in case 2 a is related to b, and both of them…
sir psycho sexy
  • 780
  • 7
  • 19
0
votes
1 answer

one to many bidirectional mapping complaining doesn't have a default value error

I have got two entity classes. @Entity public class Employee { @Id @Column(name = "employee_id") @GeneratedValue(strategy = GenerationType.IDENTITY) private Integer id; private String name; @OneToMany(cascade = CascadeType.ALL) @JoinTable(name =…
yas
  • 486
  • 1
  • 8
  • 23
0
votes
2 answers

jpa map owned by the "one" side

I have a tree like data structure with some sort of composite pattern. With an abstract class Element, there is a CompositeElement and a SingleElement. It looks like this: @Entity @DiscriminatorValue("Composite") public class CompositeElement…
EasterBunnyBugSmasher
  • 1,507
  • 2
  • 15
  • 34
0
votes
1 answer

Java object serialization and conversion to JSON

I have a Java object. It has numerous fields that have references to other different kinds of Java objects and sometimes, to itself. This object can be best described as a map (or graph) with bi-directional references (or cycles). I am not…
user4279406
0
votes
1 answer

grails bidirectional relationship in abstract classes

I am trying to define a Grails domain model with abstract classes. I need to define two abstract classes that have a one-to-one bidirectional relationship with each other and can't bring them to work. Explanation based on the Face-Nose example of…
0
votes
1 answer

Hibernate Mapping : delete children in one to many bidirectional mapping in hibernate

I have a parent object and its detail object. The mappings are mentioned in the below code - Parent Object Mapping
0
votes
1 answer

Sharepoint dropbox like Relationship

I am looking for a way to sync a folder to a sharepoint site and have the relationship be bidirectional so any updates made to folder appear on the site and any updates made on the site appear on the files in the folder. Any ideas
0
votes
1 answer

Bidirectional Data modeling issue in neo4j

I have two nodes, A and B, A talks to B and B talks to A, (A)-[:talksTo]-(B) A has a sentiment value towards B, and B has a sentiment value towards A. So there is the problem, I need A to B relationship to store a value that the B to A relationship…
user3719889
0
votes
1 answer

Bidirectional association with one to many side as owner and non nullable foreign key

I'm having a problem setting up a bidirectional association with the one-to-many side as the owner. I will describe my issue using an example from the Hibernate documentation slightly modified. @Entity public class Troop { @OneToMany(cascade =…
Mike Khan
  • 595
  • 1
  • 7
  • 18
0
votes
2 answers

Symfony2 Biderectional Relationship finBy query

I want to do a query in a bidirectional relationship using both class fields my classes are: class Branch { /** * @var integer * * @ORM\Column(name="id", type="integer") * @ORM\Id * @ORM\GeneratedValue(strategy="IDENTITY") */ private…
0
votes
1 answer

Bi-directional Map in Riak

I want to store a structure similar to bi-directional map in Riak. I have two buckets with inversed keys and values. I want to remove the record in the second bucket when it was removed from the first. As I understand, it can't be done with the…
Tolsi
  • 656
  • 9
  • 20