cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stefan S. (JIRA)" <j...@apache.org>
Subject [jira] [Created] (CAY-2567) Nested properties derived from related object are not refreshed when that object is changed
Date Tue, 16 Apr 2019 22:33:00 GMT
Stefan S. created CAY-2567:
------------------------------

             Summary: Nested properties derived from related object are not refreshed when
that object is changed
                 Key: CAY-2567
                 URL: https://issues.apache.org/jira/browse/CAY-2567
             Project: Cayenne
          Issue Type: Bug
          Components: Core Library
    Affects Versions: 4.1.B1
            Reporter: Stefan S.


*Situation:*

+Tables with foreign key dependencies:+

Addresses -> Cities -> Districts -> States -> Countries
(table Addresses has a foreign key to table Cities which has a foreign key to able Districts and
so on)

+DbRelationship Path (according to Modeler):+

Addresses: city
Cities: district
Districts: state
States: country

+Java entity for 'Address' has the following relationships:+

city: city (to one)
district: city.district (to one, RO)
state: city.district.state (to one, RO)
country: city.district.state.country (to one, RO)

The district, state, country attributes are intended for convenience. They shall be in sync
with the 'city'. This works fine when loading the object from DB.

*Issue:* 

When changing the 'city' of an 'Address' object by applying a different 'City' object, generated
getters for 'district', 'state', 'country' still provided the values matching the previous
city, not those of the newly applied city.

*Hints:*
* the Address Object was not committed when  the above was observed
* address.readNestedProperty("city.district.state.county") yields the correct country.

*Note:*
* Although this blocks our release, the issue was rate as 'major' only because of the work-around.
Nevertheless applying workarounds throughout the project (and removing them later on) causes
some headache and we therefore appreciate a sort-term solution.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message