Giter Club home page Giter Club logo

Comments (5)

RempelOliveira avatar RempelOliveira commented on June 19, 2024 1

Hi @roman-right, thanks for answering my question.

In my opinion, if the Insert/Replace event can access the data sent in the request and can change them before creating the record in the database, the Update event should also. This implementation is very partial if it was only designed to allow doing any something else not related to the operation itself. In fact, events of this type in other ODMs usually allow us to do exactly what I described.

The documentation itself suggests that these events are used to change data before saving or updating it.

https://beanie-odm.dev/tutorial/event-based-actions/

from beanie.

gegnew avatar gegnew commented on June 19, 2024 1

🤯 I just also ran into this issue. I'm fairly sure this worked on a previous version; did something change?

from beanie.

RempelOliveira avatar RempelOliveira commented on June 19, 2024

I just realized that this event can't save changes as well.

from beanie.

roman-right avatar roman-right commented on June 19, 2024

Hi @RempelOliveira ,
This event can be used for some other things, like calling api before update and something like this. It can not change the update query itself and doesn't know the state of the object after query be applied

from beanie.

github-actions avatar github-actions commented on June 19, 2024

This issue is stale because it has been open 30 days with no activity.

from beanie.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.