Bugs item #878879, was opened at 2004-01-17 17:41 Message generated for change (Comment added) made by loubyansky You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=376685&aid=878879&group_id=22866
Category: JBossCMP Group: v3.2 >Status: Closed >Resolution: Invalid Priority: 5 Submitted By: Shai Almog (vprise) Assigned to: Alexey Loubyansky (loubyansky) Summary: Removing an Entity pointed to by CMR destroys the database Initial Comment: When we have a 1-1 unidrectional CMR relationship and we remove the Entity at the receiving end, JBoss sets the relationship to NULL which is an invalid state thus rendering the database unusable since findByPrimaryKey on the original entity would fail. So if we have two entities A and B where A has a unidirectional relationship to B. When we try to remove B we should get a RemoveException (since the database would have a constraint issue) instead JBoss updates A to point at NULL and removes B which completely works around the relational integrity. Since this is a 1-1 relationship when we will to a find() operation on A we will get an exception and the database is an invalid state. This is all discussed in this thread: http://www.jboss.org/ index.html?module=bb&op=viewtopic&t=43055 Which also has a workaround for this problem that DOESN'T WORK! This workaround only works for 1-1 relationships but it causes 1-many relationships to stop working! I'm using JBoss 3.2.2 on Linux with PostgreSQL but the problem was also verified on 3.0.6 ---------------------------------------------------------------------- >Comment By: Alexey Loubyansky (loubyansky) Date: 2004-02-02 21:52 Message: Logged In: YES user_id=543482 > So if we have two entities A and B where A has a > unidirectional relationship to B. When we try to remove B > we should get a RemoveException Show me this in the spec, please. We could provide a JBoss-specific configuration option for this case. But it is definitely not a bug. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=376685&aid=878879&group_id=22866 ------------------------------------------------------- The SF.Net email is sponsored by EclipseCon 2004 Premiere Conference on Open Tools Development and Integration See the breadth of Eclipse activity. February 3-5 in Anaheim, CA. http://www.eclipsecon.org/osdn _______________________________________________ JBoss-Development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
