On Nov 15, 2007, at 2:53 PM, Uwe Grauer wrote:

> 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()).

        So let me be sure that I understand this: your database is  
configured with the equivalent of REFINTEG_RESTRICT, but you want it  
to cascade its deletes, so you have your bizobj configured with  
REFINTEG_CASCADE. You want a way to somehow easily get the bizobj to  
overrule the database's constraints by coding a reverse cascading  
delete in the bizobj. Is that correct?

        May I ask why you can't configure your database to use the  
referential integrity constraints that would match the behavior you  
want? From the ibphoenix site:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
The definition for a FOREIGN KEY has been extended. The new  
definition can be used wherever the previous (InterBase 4.0) FOREIGN  
KEY definition was used, i.e., in a CREATE TABLE and ALTER TABLE  
statement.

The new syntax for defining a FOREIGN KEY

FOREIGN KEY (column [, col ...])
REFERENCES (base-table [, col ...])
[ON DELETE {NO ACTION | CASCADE | SET DEFAULT | SET NULL}]
[ON UPDATE {NO ACTION | CASCADE | SET DEFAULT | SET NULL}]
provides a mechanism to define the action to be taken on the data in  
the associated table when updating or deleting the primary key. The  
actions defined include cascading the change to associated foreign  
table(s).

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

        So if you were to configure your table's FK to use ON DELETE  
CASCADE, there would be no issue, as the database logic and the  
bizobj logic will match.


-- Ed Leafe
-- http://leafe.com
-- http://dabodev.com




_______________________________________________
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]

Reply via email to