Hi Michael, I haven't found a way to do this through cascades and ended up overriding the Delete method to throw an exception if relationships are found.
Regards Nick -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of MWightman Sent: 08 August 2010 04:41 AM To: Castle Project Users Subject: Self refrence I have a table Items Items can be part of an assembly or can be an assembly or both. Table Item Id Item NO Description Table BOM Id Master Item Child Item unit. constraint an item may not be deleted if it is part of an assembly. my current setup does not enforce the constraint and lets me delete an item that is a component. [primary key] Id [property] Item [property] Description [Has many] BOMS Table BOM [primary key] Id [belongs to] Master Item [belongs to] Child Item [property] unit. Looking for ideas on how to set this up. Thanks -- You received this message because you are subscribed to the Google Groups "Castle Project Users" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/castle-project-users?hl=en. -- You received this message because you are subscribed to the Google Groups "Castle Project Users" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/castle-project-users?hl=en.
