Lost update problem if relationships are created and saved independently of their parent objects

Description

If a relationship is created and saved independently of its parent object, subsequently saving the parent can cause the relationship to be lost.

E.g.:

The above test, when incorporated in LookupTestCase fails at:

There is actually only 1relationship in the retrieved country instance.
After the call to:

the country instance has no relationships. It needs to be retrieved to see the change.
This is OK, but the subsequent call should fail:

It doesn't because saving the relationships does not force the parent lookup to increment the version.

By and large, relationships aren't created and saved outside of their parent objects, however it is an issue for

Environment

None

Status

Assignee

Tim Anderson

Reporter

Tim Anderson

Labels

None

Components

Affects versions

Priority

Major
Configure