https://issues.apache.org/jira/browse/EMPIREDB-79

On Thu, May 6, 2010 at 11:02 AM, Rainer Döbele <[email protected]> wrote:
> Hi Joe,
>
> you are right, 'on delete cascade' or 'on update cascade' is currently not 
> provided with the DDL generation of relations.
> DBTable.setDeleteCascade does an internal cascading and is not the same.
>
> For the moment I can only recommend to derive a class from the database 
> driver class you are using and override the method "createRelation(DBRelation 
> r, DBSQLScript script)". Copy the code from the base class and add the 
> cascade statements you require.
>
> I will put this on our TODO list in order to provide a more convenient 
> solution for all databases.
>
> Rainer
>
> Joe Thurbon wrote:
>> re: on delete/update cascade
>>
>> Is there some way to specify 'on delete cascade' or 'on update cascade'
>> on foreign key constraints within empire-db?
>>
>> I have found the method DBTable.setDeleteCascade(boolean), but that
>> seems to affect only the Java object, not actually modify the foreign
>> key constraint in the database. It also seems to affect all of the
>> foreign key constraints on the table, which is not what I want.
>>
>> It seems like the 'correct' place for it would be in the DBReference or
>> DBRelation class, but I had no joy looking there.
>>
>> Cheers,
>> Joe
>
>



-- 
http://www.somatik.be
Microsoft gives you windows, Linux gives you the whole house.

Reply via email to