Uploaded image for project: 'DSpace'
  1. DSpace
  2. DS-4025

Allow deserialization of linked objects URI for the creation of nested object

    XMLWordPrintable

    Details

    • Attachments:
      0
    • Comments:
      0
    • Documentation Status:
      Needed

      Description

      In several scenario we will need to reference a parent object during the creation of an entity.

      In some case we can create a detached entity and after attach this entity to the parent using a POST on the relation endpoint but this is inefficient and can lead to orphan objects sit around in the database.

      Moreover, in some scenario we cannot do the above without breaking a data model constraint such as the creation of a collection that must have a parent community.

      The spring data rest project suggest to do that referring the parent via its URI in the children JSON

      {
         childrenProp1: ...,
         childrenProp2: ...,
         parent: "/api/parent/<parent-ID>"
      } 

      to be able to do that we need a custom Jackson deserializer that will parse (and validate) the parent URI creating a Parent Rest Object with only the ID.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              bollini Andrea Bollini (4Science)
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: