ObjectBefore doesn't contain relationship fields, but ObjectAfter does.
When looking for changes between before and after, relationship fields always show up making it look like their values are being changed all the time.
Description by example:
Given:
Managed object, relationship field roles, property prop
{
"prop": "foo",
"roles": "[list-of-actual-roles]"
}
When:
prop property value is changed
Then:
Audit log is created with the following values:
ObjectBefore:
ObjectAfter:
{
"prop": "bar",
"roles": "[list-of-actual-roles]"
}
This looks as if roles were added.
Expected behavior:
Audit log is created with ObjectBefore looking like this:
{
"prop": "foo",
"roles": "[list-of-actual-roles]"
}
ObjectAfter:
{
"prop": "bar",
"roles": "[list-of-actual-roles]"
}
ObjectBeforedoesn't contain relationship fields, butObjectAfterdoes.When looking for changes between
beforeandafter, relationship fields always show up making it look like their values are being changed all the time.Description by example:
Given:
Managed object, relationship field
roles, propertyprop{ "prop": "foo", "roles": "[list-of-actual-roles]" }When:
propproperty value is changedThen:
Audit log is created with the following values:
ObjectBefore:
{ "prop": "foo" }ObjectAfter:
{ "prop": "bar", "roles": "[list-of-actual-roles]" }This looks as if roles were added.
Expected behavior:
Audit log is created with
ObjectBeforelooking like this:{ "prop": "foo", "roles": "[list-of-actual-roles]" }ObjectAfter:
{ "prop": "bar", "roles": "[list-of-actual-roles]" }