Hello, "Roger Lovelock" <[email protected]> schrieb: > Thanks Ed - I'm using SQLite - I'll try self._connection! > ----- Original Message ----- > From: "Ed Leafe" <[email protected]> > To: "Dabo Users list" <[email protected]> > Sent: Monday, January 19, 2009 3:41 PM > Subject: Re: [dabo-users] Validation before Delete > > > > On Jan 18, 2009, at 10:34 PM, Roger Lovelock wrote: > > > >> Some advice on the 'dabo' way to do this! > >> > >> In my bizObj I have a beforeDelete method where I want to stop the > >> deletion if a reference to the record occurs in another table (ie > >> this table is membership types - I don't want to allow deletion of a > >> membership type if a member exists with this type on their record). > > > > > > Generally that's handled by referential integrity rules in the > > database. If you aren't using a RDBMS that supports this, then your > > approach is fine. As far as the connection goes, bizobjs have a > > 'protected' attribute named 'self._connection' that you can use. > >
Well, it's possible to put referential integrity rules into a SQLite database using triggers. But the trigger syntax of SQLite isn't very portable (or beautiful, I would add, speaking just for myself). Regards Sibylle -- Dr. Sibylle Koczian _______________________________________________ Post Messages to: [email protected] Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users Searchable Archives: http://leafe.com/archives/search/dabo-users This message: http://leafe.com/archives/byMID/[email protected]
