Yes, implementing checks in the ejbRemoves would be simpler but also error-prone. I think that "foreign key" approach to the data integrity is much more valuable when dealing with enterprise data, when implicit data modification might cause severe consequences.
Besides this, as far as i can see it is impossible to check in the ejbRemove references to the objects being deleted unless we make all relationships bidirectional. Consider unidirectional many-to-one relationship from B to A, i.e. B has a getter for A, but A has no getters for collection of related Bs. In this case when A is being deleted there is no way to check for related Bs in ejbRemove. Or i'm missing something? thanx. View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3869666#3869666 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3869666 ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user