Andrey Razumovsky commented on CAY-436:
---------------------------------------
It's tricky with reverse engeneering: seems we can only detect delete rule in only one direction (i mean the DELETE_RULE column of returned getExportedKeys() query). So we will have to set default value to reverse relationship anyways.
Also it requries some DbLoader (or probably Db- and ObjRelationships) since we're creating DbRels and not ObjRels from database in DbLoader. So ithink that if we want to include delete rule to the "work field" of Cayenne, we should go futher, and make the rule part of DbRelationship, so that we could generate the schema properly too.
As of the defaults, actually I'd prefer DENY of one-to-many and NULLIFY vice versa :) So I'll probably add two more preferences in CM and set NO ACTION as default so that nothing would change for users without their activity
> In modeler, change default object relationship delete rule
> ----------------------------------------------------------
>
> Key: CAY-436
> URL: https://issues.apache.org/cayenne/browse/CAY-436
> Project: Cayenne
> Issue Type: Improvement
> Components: Cayenne Core Library, CayenneModeler GUI
> Environment: winxp, M7
> Reporter: weidox
> Assignee: Kevin Menard
> Fix For: UNDEFINED FUTURE
>
>
> Should be good to change default delete rules for object relationships, one to many - cascade, and vice versa - to nullify. I think it's the rules used mostly for these relationships.
> And the best thing would be to have configurable options for these, but that's more complex.
-- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
This archive was generated by hypermail 2.0.0 : Wed Jun 04 2008 - 12:22:15 EDT