Skip to content

API delete endpoint is silently failing #287

@nickdos

Description

@nickdos

In previous versions, an entity could be deleted via the API using /ws/dataResource/{dataResourceUid} using a HTTP DELETE method.

When triggered, a 200 response returns with content deleted title-of-collectory-entry. However the entity is not deleted and can be viewed by its public URL after this.

The code responsible does not send flush: true which used to be optional but is now a mandatory command.

  • Add flush: true to the delete command and search for other cases where DB save/delete are also not sending the flush command.

In earlier Grails versions (pre-GORM 7), transactions were automatically flushed at the end of controller actions. In Grails 6.0.0 (which uses GORM 8.x), this auto-flush behavior was disabled by default for better performance and more explicit transaction control.

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