Skip to content
This repository was archived by the owner on Jul 14, 2024. It is now read-only.
This repository was archived by the owner on Jul 14, 2024. It is now read-only.

Alternate "set" behaviour & mode for List field & in import tool #113

Open
@mdutoo

Description

@mdutoo

Useful using the Import tool, so that list doesn't grow when importing twice (and when there is not a set number of items, in which case each of them could be specifically targeted using dotted paths like translations: odisp:name.0.v). However, not that useful outside import, since this doesn't happen.

Checking unicity of primitive fields is easy. For Resource types (links or embedded sub-Resources), obviously id is their URI (@id). By the way, in the case of embedded sub-Resources, obviously it would work even better with server-side auto id building (#89). Additionally, i18n should be supported as a specific case where id is the language.

Would not work for field types without defined id, i.e. maps. But the solution would be replacing maps by embedded sub-Resources - which is a good general goal (the alternative being ).

This is best done on server-side, by adding a boolean "isSet" option to DCList, and using it in ResourceEntityMapperService to parse it in a Java LinkedHashSet (preserving order) rather than a mere list. In the Import tool, a new corresponding "isSet" column must be parsed from model csv and sent along.

(it could also be done only on client side, but server-side code will be simpler, better tested and obviously more efficient)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions