meteor-astronomy
meteor-astronomy copied to clipboard
Model layer for Meteor
Hey, I'm currently adding some data in my afterInit event. It currently looks like this: Posting.js ``` afterInit(e) { const doc = e.currentTarget; doc.userDoc = User.findOne({_id: doc.userId}); } ``` Because...
``` PublishGame(){ oldData = this.isPublished this.isPublished = !oldData if (this.isPublished){ this.publishedAt = new Date() } return this.save() } ``` I have that method in astronomy. It uses to update isPublished...
I might just be blind, but is there a way when defining an inherited class, to specify that a field on the parent _does not_ apply on the child? In...
Check please support for mongo transactions. Related to feature request #706 ```js import Post from './post' import User from './user' import { MongoInternals } from 'meteor/mongo'; let post = Post.find(postQuery);...
On the client side I do a `Books.findOne({}, {fields: {anOptionalField:1}})` The `anOptionalField` in this my case is another object created using `Class.create({...})` Then the I get the following error: ```...
To save monetary field, mongo 3.4 has supported [NumberDecimal](https://docs.mongodb.com/manual/tutorial/model-monetary-data/) type, and meteor has its package [mongo-decimal](https://github.com/meteor/meteor/tree/5dcd0b2eb9c8bf881ffbee98bc4cb7631772c4da/packages/non-core/mongo-decimal), which uses the npm package [decimal.js](https://github.com/MikeMcl/decimal.js/), and SimpleSchema supports it by allowing you use...
I have something like: ``` export const Entity = Class.create({ name: 'Entity', collection: Entities, typeField: 'type', fields: { uuid: { type: String, optional: true, }, published: { type: Boolean, default:...
I have faced with strange behaviour of 'save' method. I have a class Unit that is extended on server side ``` Unit.extend({ meteorMethods: { insert() { this.name = 'insert name';...
Adds compatibility with redis oplog by conditionally using the original collection methods when on the server, and adds the ability to pass various redis oplog options to queries. This fork...
Hello. Astronomy version: 2.5.2 I have client side and server side parts of my model. in client side (common model without platform restrictions visible on both client and server) I...