Ed Leafe wrote: > On Nov 15, 2007, at 1:03 PM, Uwe Grauer wrote: > >> Ok, in the future i will try harder to convince you although english >> isn't my first language which makes it very tedious. > > Please start by explaining what the problem is. IOW, what the system > is doing, and what you need it to do. >
I have the following DDL in my db: CREATE TABLE JNP( IID Numeric(18,0) NOT NULL, NAME Varchar(100) NOT NULL, ... PRIMARY KEY (IID) ); CREATE TABLE PER( IID Numeric(18,0) NOT NULL, GEBNAME Varchar(100), ... JNP_IID Numeric(18,0) NOT NULL, PRIMARY KEY (IID) ); ALTER TABLE PER ADD FOREIGN KEY (JNP_IID) REFERENCES JNP (IID); When i call JnpBizobj.delete() Dabo deletes the parent record prior to deleting the childs when JnpBizobj.deleteChildLogic = REFINTEG_CASCADE which isn't allowed if your firebird database contains foreign key constraints (See dBizobj.delete()). It seems to be illogical to delete a parent if there are still child records pointing to a nonexistent records via a foreign key. That's why i think that the logic for this has to be: - Delete all child records of the parent - Delete parent Firebirds foreign key constraint just restricts the deletion of parent records when there are child records pointing to a parent. That's just for maintaining data integrity. Because of the way it is coded in Dabo i have to code it in such a way that i have to delete the childs prior to deleting the parent. If Dabo would do it the other way around there wouldn't be the need to explicitly code it and there would be no need to do explicit transaction handling. I hope that i explained it in a understandable way now. Uwe _______________________________________________ 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/dabo-users/[EMAIL PROTECTED]
