tryAddDeferred

tryAddDeferred(value: MemberType): Boolean, receiverByReference, updating;

The tryAddDeferred method of the Collection class attempts to add the value specified by the value parameter to the collection if it is not already present. For persistent dictionaries, the attempt is queued and executed when the database transaction commits. For transient dictionaries, the attempt is executed immediately.

This method returns true if a dictionary is persistent or the dictionary is transient and the value was added; otherwise it returns false.

This method supports only collection types that can contain objects (that is, it is not supported for primitive arrays) and for all collection instance lifetimes.

2020.0.01 and higher