[ https://issues.apache.org/jira/browse/CAY-2309?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16028269#comment-16028269 ]
ASF GitHub Bot commented on CAY-2309: ------------------------------------- GitHub user nismooooooo opened a pull request: https://github.com/apache/cayenne/pull/221 CAY-2309 ObjEntity > Relationship: 'Target' is not updated after changing the same value in DbEntity > Relationship You can merge this pull request into a Git repository by running: $ git pull https://github.com/nismooooooo/cayenne CAY-2309 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/cayenne/pull/221.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #221 ---- commit b7f1724b335cfa4e198d67ea307352aeab89440f Author: Anton Dreka <drek...@gmail.com> Date: 2017-05-29T12:06:27Z CAY-2309 ObjEntity > Relationship: 'Target' is not updated after changing the same value in DbEntity > Relationship ---- > ObjEntity > Relationship: 'Target' is not updated after changing the same > value in DbEntity > Relationship > ---------------------------------------------------------------------------------------------------------- > > Key: CAY-2309 > URL: https://issues.apache.org/jira/browse/CAY-2309 > Project: Cayenne > Issue Type: Bug > Components: Modeler > Affects Versions: 4.0.M6 > Environment: Win7 x64 > Reporter: Yury Harachka > Attachments: 1.png, 2.png > > > *Steps:* > 1. Open any valid project with created DbEntities, ObjEntities, Relationships > 2. Select DbEntity (DbEntity=Artist in my case) > 3. Change 'Target' in Relationships table to another value (from Painting to > Gallery in my case) > 4. Go to appropriate ObjEntity (ObjEntity=Artist in my case) and see 'Target' > in ObjRelationship table > -> Old value is displayed (Target=Painting in my case) > 5. Click on 'Sinc ObjEntity with DbEntity' button > -> Old value is still displayed (Target=Painting in my case) > *see1.png* > 6. Save project (ignore validation problems) and close Modeler > -> xml shows different target values for db-relationship and obj-relationship: > {code}<db-relationship name="a_p" source="Artist" target="Gallery" > toMany="true" /> > <obj-relationship name="a_p" source="Artist" target="Painting" > deleteRule="Deny" db-relationship-path="a_p" />{code} > 7. Open the project in Modeler again and check the value in 'Target' column > for appropriate ObjEntity (ObjEntity=Artist in my case) > -> Old value is still displayed (Target=Painting in my case) > 8. Now put the cursor into 'DbRelationship Path' cell and then into 'Target' > cell > -> 'Target' value is changed to new value (from Painting to Gallery in my > case) - It's strange behavior > -> Note that Save button did not become active > *see 2.png* > 9. Do any changes in project to make Save button active and save project > -> Now xml shows the same target values for db-relationship and > obj-relationship (target=Gallery in my case): > {code}<db-relationship name="a_p" source="Artist" target="Gallery" > toMany="true" /> > <obj-relationship name="a_p" source="Artist" target="Gallery" > deleteRule="Deny" db-relationship-path="a_p" />{code} > *Expected:* 'Target' value in ObjRelationship is changed immediately after > update 'Target' in DbRelationship (or after pressing on 'Sinc ObjEntity with > DbEntity' button) -- This message was sent by Atlassian JIRA (v6.3.15#6346)