[jboss-user] [EJB 3.0] - Re: Entity bean cascade design issue
alexg79
do-not-reply at jboss.com
Tue Nov 21 12:15:19 EST 2006
Hey, I just got an idea. Would this work?
| @Entity
| public class Order {
| private Employee employee;
| ...
| }
|
| @Entity
| public class Employee {
| ...
| private List<Order> orders;
| ...
| @PreRemove
| public void removeRefs() {
| for (Order o : orders)
| o.setEmployee(null);
| }
| }
|
If this works, it'll be an elegant enough solution.
At least it'd save me the trouble of creating my own interceptors for this.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3987639#3987639
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3987639
More information about the jboss-user
mailing list