|
View:
New views
3 Messages
—
Rating Filter:
Alert me
|
|
|
@ManyToMany and @PrivateOwnedWill this work if I use @PrivateOwned on a ManyToMany relationship, such that if a Phone is removed from the list in the Customer class will only the relationship table get deleted?
Example - In Customer class: @ManyToMany @JoinTable(name="CUST_PHONES") @PrivateOwned public Set getPhones() { return phones; } In PhoneNumber class: @ManyToMany(mappedBy="phones") public Set getCustomers() { return customers; } |
|
|
Re: @ManyToMany and @PrivateOwnedNo, unfortunately a @PrivateOwned is not supported on a @ManyToMany mapping
and you must still manage the removes from that mapping as you normally would. Cheers, Guy ----- Original Message ----- From: "khaskett" <khaskett@...> To: <eclipselink-users@...> Sent: Tuesday, July 21, 2009 12:11 PM Subject: [eclipselink-users] @ManyToMany and @PrivateOwned > > Will this work if I use @PrivateOwned on a ManyToMany relationship, such > that > if a Phone is removed from the list in the Customer class will only the > relationship table get deleted? > > Example - > In Customer class: > > @ManyToMany > @JoinTable(name="CUST_PHONES") > @PrivateOwned > public Set getPhones() { return phones; } > > In PhoneNumber class: > > @ManyToMany(mappedBy="phones") > public Set getCustomers() { return customers; } > > > > -- > View this message in context: > http://www.nabble.com/%40ManyToMany-and-%40PrivateOwned-tp24590764p24590764.html > Sent from the EclipseLink - Users mailing list archive at Nabble.com. > > _______________________________________________ > eclipselink-users mailing list > eclipselink-users@... > https://dev.eclipse.org/mailman/listinfo/eclipselink-users > _______________________________________________ eclipselink-users mailing list eclipselink-users@... https://dev.eclipse.org/mailman/listinfo/eclipselink-users |
|
|
Re: @ManyToMany and @PrivateOwnedAlternatively you may want to try using a @OneToMany using a @JoinTable and
@PrivateOwned. Cheers, Guy ----- Original Message ----- From: "Guy Pelletier" <guy.pelletier@...> To: "EclipseLink User Discussions" <eclipselink-users@...> Sent: Friday, July 24, 2009 10:01 AM Subject: Re: [eclipselink-users] @ManyToMany and @PrivateOwned > No, unfortunately a @PrivateOwned is not supported on a @ManyToMany > mapping and you must still manage the removes from that mapping as you > normally would. > > Cheers, > Guy > > ----- Original Message ----- > From: "khaskett" <khaskett@...> > To: <eclipselink-users@...> > Sent: Tuesday, July 21, 2009 12:11 PM > Subject: [eclipselink-users] @ManyToMany and @PrivateOwned > > >> >> Will this work if I use @PrivateOwned on a ManyToMany relationship, such >> that >> if a Phone is removed from the list in the Customer class will only the >> relationship table get deleted? >> >> Example - >> In Customer class: >> >> @ManyToMany >> @JoinTable(name="CUST_PHONES") >> @PrivateOwned >> public Set getPhones() { return phones; } >> >> In PhoneNumber class: >> >> @ManyToMany(mappedBy="phones") >> public Set getCustomers() { return customers; } >> >> >> >> -- >> View this message in context: >> http://www.nabble.com/%40ManyToMany-and-%40PrivateOwned-tp24590764p24590764.html >> Sent from the EclipseLink - Users mailing list archive at Nabble.com. >> >> _______________________________________________ >> eclipselink-users mailing list >> eclipselink-users@... >> https://dev.eclipse.org/mailman/listinfo/eclipselink-users >> > > _______________________________________________ > eclipselink-users mailing list > eclipselink-users@... > https://dev.eclipse.org/mailman/listinfo/eclipselink-users > _______________________________________________ eclipselink-users mailing list eclipselink-users@... https://dev.eclipse.org/mailman/listinfo/eclipselink-users |
| Free embeddable forum powered by Nabble | Forum Help |