The problem is that I have an Employee object associated with every Document. 
When the Employee goes away, the link has to be severed. Being able to do that 
implicitly (with cascade=CascadeType.REMOVE) would be the ideal solution. Right 
now I have a hack involving a custom annotation, parameter injection and an 
UPDATE query that fires whenever an Employee is deleted.
Being able to have an association to Document directly would be a much cleaner 
solution. Document doesn't have its own table so it doesn't need a PK of its 
own. It'd be great if I could have getId() defined in Document, and override it 
in subclasses and set @GeneratedValue along with any specific generators there. 
I don't see any theoretical problems with that approach.

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4108249#4108249

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4108249
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to