Getting changes to entity arrays in the current bundle
In addition to entity array properties supporting
the isFieldChanged and
getOriginalValue methods,
you can test for changes to entity array contents in the current bundle.
You use methods to compare the array on the persisted entity instance
to the array on the cached version in the bundle.
The following methods are available only for properties directly defined on an entity in the data model configuration files as entity arrays. These methods do not work on other types of properties or methods. For example:
- These methods do not work with Gosu enhancement properties that return entity arrays.
- These methods do not work with other virtual properties such as those implemented in internal Java code.
Use the Data Dictionary to check whether a property is a database-backed property or a virtual property.
Entity methods for getting changes to array properties
The following table lists the methods on an entity instance that you can use to get entity array changes.
Entity method |
Argument |
Return type |
Returns |
|---|---|---|---|
|
Array property name |
Entity array |
A list of array elements that were added. If there are none, returns an empty array. |
|
Array property name |
Entity array |
A list of array elements that were changed. If there are none, returns an empty array. |
|
Array property name |
Entity array |
A list of array elements that are marked for deletion if the bundle commits. If there are none, returns an empty array. |
|
Array property name |
|
|
|
Array property name |
|
|
