I've a 1:n relation defined using the persistence api. One customer has n delivery adresses. In the history object this appears as customer object who has a list of delivery addresses. Those delivery addresses themself also have a customer attached and that customer a list of delivery addresses and so on and so forth. While this is semantically correct im wondering if I did something wrong or is this correct?

asked 17.04.2014 at 08:43

Nikel%20Weis's gravatar image

Nikel Weis
321262933
accept rate: 57%


I agree that this may look funny, but it is correct. (It's a bidirectional Relationship in Hibernate) To have a code level look at it you can catch a glimpse at the generated dataClasses in the src_dataClasses/ folder.

Also have a look at this answer on StackOverflow.

link

answered 17.04.2014 at 16:16

Peter%20St%C3%B6ckli's gravatar image

Peter Stöckli ♦
3712410
accept rate: 69%

Thanks for the link. :)

(17.04.2014 at 16:17) Nikel Weis Nikel%20Weis's gravatar image
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "Title")
  • image?![alt text](/path/img.jpg "Title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×28

Asked: 17.04.2014 at 08:43

Seen: 825 times

Last updated: 17.04.2014 at 16:17