Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #3054
| From | ses <stewart@ssims.co.uk> |
|---|---|
| Newsgroups | comp.lang.java.programmer |
| Subject | EJB entity with multiple parents (only one relationship persists?) |
| Date | 2011-04-13 14:51 -0700 |
| Organization | http://groups.google.com |
| Message-ID | <0fb6a143-c58b-45b5-b6a8-26dac6883107@17g2000prr.googlegroups.com> (permalink) |
I have an EJB entity relationship like the following Customer ---one-many---> Booking Location ---one-many---> Booking Firstly I persist the booking. The problem is when I try to add the same Booking entity to both Customer and Location, and then merge customer and location the only relationship which remains in the database is the one for which merge was called last. This indicates that an individual Booking can only be 'owned' by one entity, why is this the case and how can I circumvent it? Any suggestions would be gratefully appreciated. I'm using JPA with eager fetch type and orphan removal.
Back to comp.lang.java.programmer | Previous | Next — Next in thread | Find similar
EJB entity with multiple parents (only one relationship persists?) ses <stewart@ssims.co.uk> - 2011-04-13 14:51 -0700 Re: EJB entity with multiple parents (only one relationship persists?) Arved Sandstrom <asandstrom3minus1@eastlink.ca> - 2011-04-13 22:00 -0300
csiph-web