Skip to content

Reason why ActiveModelBehavior only works with methods defined on ActiveModelTrait #171

Description

@Huliiiiii
  • Entity accepts A: ActiveModelTrait<Entity = Self>, but A is not necessarily Entity::ActiveModel.
  • DeleteOne<E> does not carry a generic parameter for ActiveModel, making it incompatible with behavior hooks.
  • Insert::exec does not return the model, so after_save cannot be triggered.

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

    help wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions