Code Monkey home page Code Monkey logo

Comments (4)

mizzao avatar mizzao commented on May 17, 2024

There isn't the concept of save really in Meteor - you could just run the same hook on insert/update if you wanted to. What are you thinking of exactly when you refer to save?

from meteor-collection-hooks.

ndemoreau avatar ndemoreau commented on May 17, 2024

My idea, but I'm new to the world of object db's, is to use it to perform denormalization tasks or any task that should be performed at every object modification (includes insert and updates of course).

In Rails, there is a before/after save callback herefore and It's quite useful

A workaround is indeed to put these maintenance tasks in a function and to call the function from the insert and update callbacks. But it's a workaround. No big deal. Thanks again!

from meteor-collection-hooks.

mizzao avatar mizzao commented on May 17, 2024

How do you handle updates with a selector instead of an _id?

I think Meteor is planning to bind objects more tightly to their database representations rather than to just have free-floating Javascript objects in memory. This might be easier to implement when that comes to pass.

from meteor-collection-hooks.

ndemoreau avatar ndemoreau commented on May 17, 2024

OK, thank you!

from meteor-collection-hooks.

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.