Skip to content

Within a delete resolvers, deleting > 1 item fails in the eventhook #152

Description

@rizzza

Describe the bug
Say for example, we are deleting an annotationNamespace and all of it's associated annotations within one call to the ent client.

r.client.Annotation.Delete().Where(annotation.AnnotationNamespaceID(id)).Exec(ctx)

The eventhook for the annotation delete will fail because it is expecting only a singular deletion.

We receive the following error

"object doesn't have an id "

To Reproduce
Code up a delete resolver to delete all based on some predicate

Expected behavior
For the delete eventhook to be able to handle > 1 deletions of an thing at a time, rather than having to iterate and DeleteOne(id) at a time within the resolver.

Screenshots
If applicable, add screenshots to help explain your problem.

Additional context
Add any other context about the problem here.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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