Re: Delete on cascade question
Re: Delete on cascade question
- Subject: Re: Delete on cascade question
- From: Jacky Gagnon <email@hidden>
- Date: Mon, 27 Nov 2006 14:00:33 -0500
Hi Miguel,
You can add the ON DELETE CASCADE subclause of your Foreign key
clause into your database tables.
You just call delete with no action on A and the database will delete
on cascade the data.
Its important to invalidate these objects (because EOF don't know
about «on delete cascade» into db level)!
Good luck!
On 06-11-27, at 12:40, Miguel Arroz wrote:
Hi!
I have a complicated graph of objects I want to delete. Basically
almost all of them deletes the next ones on cascade. So, imagine A.
A has a lot of Bs. Each B has a lot of Cs. Each C has a lot of Ds,
and so on. On a moderate size example, I'm talking about 5000
objects or more.
Even if I choose the delete on cascade option in EOModeler, the
generated SQL will not have the DELETE CASCADE code, so I guess
it's all done by WO. And that means... it's terribly slow. So
here's my two questions:
1) Is there a way to make EOModeler generate the DELETE CASCADE SQL?
2) Adding it to the database definition (either EOModeler or
manually) will conflict with EO in any way?
Yours
Miguel Arroz
"GUERRA E' PAZ
LIBERDADE E' ESCRAVIDAO
IGNORANCIA E' FORCA" -- 1984
Miguel Arroz
http://www.ipragma.com
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40druide.com
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden