You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cayenne.apache.org by "Yury Harachka (JIRA)" <ji...@apache.org> on 2017/05/18 12:11:04 UTC

[jira] [Created] (CAY-2309) ObjEntity > Relationship: 'Target' is not updated after changing the same value in DbEntity > Relationship

Yury Harachka created CAY-2309:
----------------------------------

             Summary: 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)