Comments (4)
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.
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.
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.
OK, thank you!
from meteor-collection-hooks.
Related Issues (20)
- Multi-document updates uses "dirty" modifier from previous calls to the collection hook HOT 5
- How to deal with replication lag? HOT 9
- fetchPrevious option cannot prevent fetching of the previous documents HOT 1
- More explanation of 0.9.0 breaking changes please HOT 5
- How i can extend ALL collections? HOT 6
- After fetch hook? HOT 3
- An after.update hook's modifier doesn't get a before.update's updated modifier
- Add GitHub actions for CI HOT 2
- Using direct still causes fetchPrevious behaviour on update method
- hook "remove" does not remove hook or removes wrong hook HOT 1
- bulk update didnt trigger after update hooks HOT 3
- attach hooks to raw collections HOT 3
- Meteor 2.6: after.insert callback does not contain correct document _id HOT 2
- problem after insert doc._id object HOT 4
- Support to Meteor 2.8 and Mongo async methods HOT 5
- After update hook does not use direct find HOT 2
- Async hooks run in parallel to the collection operation HOT 3
- Meteor 3.0 migration considerations HOT 1
- Ability to add call-level parameters to hooks HOT 1
- Core dump at Meteor 3.0 alpha 15: node: ../src/coroutine.cc:134: void* find_thread_id_key(void*): Assertion `thread_id_key != 0x7777' failed. HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from meteor-collection-hooks.