Tore Halset commented on CAY-966:
---------------------------------
All the ToModel tokens operate on DbEntity and DbAttribute, not yet ObjEntity and ObjAttribute.
In svn r613170 a few hours ago, I commited a patch to DropColumnToModel that also removes ObjAttributes mapped to the column. DropColumnToModel should also be able to drop ObjRelationship if a fk column is removed.
svn r613170 also contain a fix for ordering of add/remove db relationships that might be related to this issue as well. Ordering will be handled in CAY-947
All other ToModel tokens should be updated to update the Obj*-part of the model. I will work on this, but contributions including junit tests are welcome as always :)
> ObjRelationsship's are not removed processing DropColumnToModel
> ---------------------------------------------------------------
>
> Key: CAY-966
> URL: https://issues.apache.org/cayenne/browse/CAY-966
> Project: Cayenne
> Issue Type: Bug
> Components: Cayenne Core Library
> Affects Versions: 3.0
> Environment: all
> Reporter: Øyvind Harboe
> Assignee: Tore Halset
> Attachments: DbEntity.java
>
>
> I'll attatch a modified DbEntity.java that fixes the problem here.... Basically the code below won't work right because the ObjRelationship's aren't removed.
> MergerContext mergerContext = new ExecutingMergerContext(
> payBackDataMap, dataNode);
> for (MergerToken token : tokens)
> {
> if (token.getDirection() == MergeDirection.TO_DB)
> {
> token = token.createReverse(dataNode.getAdapter()
> .mergerFactory());
> }
> token.execute(mergerContext);
> }
-- 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 : Fri Jan 18 2008 - 16:26:02 EST