Not in all cases. For example, I have an invoice with invoice items. Later on, I edit the invoice and remove some items (but not the invoice itself). To remove them, I would set item.Invoice=null and they should be removed from the database if DeleteOnNull is set. What I get instead is an exception telling me that the foreign key cannot be null....
On Feb 1, 2:57 am, "Andrus" <[email protected]> wrote: > PostgreSql deletes in this case child rows automatically, no need for > anything. > > Andrus Moor > O Eetasoft > Akadeemia 21-G302 > Tallinn 12618www.eetasoft.ee > tel. 6654214, 6654215 > > ----- Original Message ----- > From: "Matt" <[email protected]> > To: "DbLinq" <[email protected]> > Sent: Monday, February 01, 2010 4:18 AM > Subject: [dblinq] Does DbLinq support DeleteOnNull? > > >I tried various ways to make DbLinq delete child entities from the > > database automatically, but DeleteOnNull = true seems to have no > > effect. Is it supported? (PS.: I'm using PostgreSQL and all my foreign > > keys relationships are non-nullable and have ON DELETE CASCADE). > > > -- > > You received this message because you are subscribed to the Google Groups > > "DbLinq" 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/dblinq?hl=en. -- You received this message because you are subscribed to the Google Groups "DbLinq" 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/dblinq?hl=en.
