DelegateId: {
type: 'string',
default:''
},
Delegate: {
type: 'string',
default:'',
transient: true
},
relations: {
delegate: {
type: 'one',
class: 'Contact',
local: 'DelegateId',
foreign: '_id'
}
},
@cyrus-za you first create your collection passing in the idGeneration
option:
MyCollection = new Mongo.Collection('mycollection', {idGeneration: 'MONGO'});
and then use either simple-schema/collection2 or astronomy at will. Neither should complain.
But beware of the Meteor.users
collection which, by default always uses STRING
id's and you cannot change that meteor/meteor#1834
If I use this:
var app = new App();
Template.XXX.helpers({
app() { return app; }
});
and later on I change app with set()
... then validate()
and then save()
... things in the template are not-reactive:
This won't update {{app.url}} if coming from that helper, even if it's saved in Minimongo via save().
If I want it to be reactive, I have to change the helper to something like:
Template.XXX.helpers({
app() { return Apps.findOne(_id); }
});
with the _id
of the previously saved app object.
Do you have plans to make a new
Astro object reactive by itself without having to change it for a Minimongo query after saving?