Skip to content

[Storables] Lists of primitive type cannot be updated #1611

@jre-1986

Description

@jre-1986

Relevant versions:
Xyna 10.3.0.0
Base 1.1.0

Expected behavior: Using the service xnwh.persistence.PersistenceServices.update to update a persisted storable, a member that is a list of primitive types (string, int) can be easily replaced and all entries updated.

Problem / actual behavior: The service replaces all existing values with the value of the first entry in the new list. Changes to the list length are not taken into account as well. See Workflow examples below.

Additional information: At the moment, the only workaround for this is saving the entire storable. However, this creates race conditions when multiple processes have to write into the same storable thus overwriting their changes.

Examples:

#1 A simple storable was saved in a database as follows:

Image

#2 Using update it is easily possible to replace the string variable "testdata"

Image

#3 Using the following update workflow, it is not possible to properly update the primitive String list "testprimitive"

Image

#4 Instead of a proper update, the list is saved as

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions