Skip to content

ListVAccessor.get() should return an unmodifiable DtList #124

@ojathelonius

Description

@ojathelonius

Is there a point in allowing the modification of DtLists returned by the Accessor from the database ?

See example :

// after load()

final DtList<CustomObject> elements = myObject.elements().get();
final DtList<CustomObject> otherElements = otherObject.elements().get();

elements.addAll(otherElements);

In the example above, otherElements will be stacked on top of elements every time the code runs, which is probably not the desired outcome since myObject.elements().get() is expected to be pristine data.

ListVAccessor.get() could return an unmodifiable DtList instead.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions