-
Notifications
You must be signed in to change notification settings - Fork 67
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Collection functions not working on astronomy objects #664
Comments
@lensKamdem does the |
@lukejagodzinski I did not add any collection property, but in the documentation it is said that find, findOne, update etc. methods work on astronomy classes. |
Everything is described in docs. import { Class } from 'meteor/jagi:astronomy';
import { Mongo } from 'meteor/mongo';
const Users = new Mongo.Collection('users');
const User = Class.create({
name: 'User',
collection: Users // YOU HAVE TO PROVIDE COLLECTION HERE
}); |
@lukejagodzinski i did it. When a set a property with the set() and then save it, it is normally inserted into the Mongodb collection, that is find. |
Then create reproduction repository because there is probably error in your code. You can also take a look at the example app to see how to use Astronomy https://github.com/jagi/meteor-astronomy-examples |
I will try it |
I am using astronomy v2.5.6, when use a collection function like find or update on an astronomy class instance eg. User.find(), i get the error:
TypeError: User.find() is not a function
Any clue guys? Even v2.5.3 i got the same error
The text was updated successfully, but these errors were encountered: