Skip to content

Missing rollback when erroring on nested Entity POST #82

@SpeckiJ

Description

@SpeckiJ

When posting invalid nested Entities, e.g.

{
  "name": "thingy-thing",
  "description": "Whatever",
  "properties": {
    "uri": "https://some.url"
  },
  "Locations": [
    {
      "name": "Position",
      "description": "Thing location",
      "encodingType": "application/vnd.geo+json",
      "location": {
        "type": "Point",
        "coordinates": [
          23.094,
          42.361
        ]
      }
    }
  ],
  "Datastreams": [
    {
      "name": "Thing-stream",
      "description": "Stream description",
      "observationType": "http://www.opengis.net/def/observationType/OGC-OM/2.0/OM_CategoryObservation",
      "unitOfMeasurement": {
        "name": null,
        "symbol": null,
        "definition": null
      },
      "ObservedProperty": {
        "name": "Taxon",
        "description": "The canonical name of the observed species",
        "definition": "http://some.url"
      },
      "Sensor": {
        "name": "Citizen Scientist",
        "description": "Person sharing individual observations to the public for scientific use",
        "encodingType": "text/html",
        "metadata": "https://some.url"
      }
    }
  ]
}

The STA errors out, but still persists some of the Entities (e.g. ObservedProperty) as they are already flushed to the database.

Apparently the @Rollback Annotation is not transient and a new @Rollback scope is openend when those sub-entities are persisted.

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingv2affects v2 (no-olingo version) of the STA

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions