[jboss-user] [EJB 3.0] - Re: EJB 3 OneToMany with Composite Key
DeanoUK
do-not-reply at jboss.com
Wed Jul 4 09:40:17 EDT 2007
That first set of code should have:
| @OneToMany(mappedBy = "commsMessage", cascade = {CascadeType.PERSIST, CascadeType.REMOVE}, fetch=FetchType.LAZY)
| public Collection<CommsMessageRecipient> getCommsMessageRecipients()
| {
| return commsMessageRecipients;
| }
|
| public void setCommsMessageRecipients(Collection<CommsMessageRecipient> commsMessageRecipients)
| {
| this.commsMessageRecipients = commsMessageRecipients;
| }
|
Ignore the CommsAttachment object - thats meant to be having the same relationship but I took it out for this example.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4060475#4060475
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4060475
More information about the jboss-user
mailing list