Where communities thrive

  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
Repo info
    Roman Kuba
    Hey, does anyone know if it's possible to work with default Mongo ObjectIds in Astronomy? It seems to just fail, but not sure if there is a configuration one could change.
    Anders Ramsay
    Hi - where in the astronomy docs can I find info about setting/saving to the db using Meteor methods? (ie the equivalent of Meteor.call...)
    Sam Hulick
    i have an issue while saving
    will get an error called
    Uncaught TypeError: Cannot read property '_clearModifiers' of nul
    i guess some issue in structure i have created but not able to figure it out :-(
    Pieter Venter
    I am having a issue with SimpleSchema and Collection2 and I am looking at alternatives (such as astronomy) to maybe fix the issue. I have a MongoDB that is populated mainly by sources outside of Meteor, but the UI does allow a user to add to the collection (using autoform package for that). The problem is that the external sources uses Mongo.ObjectId() and Meteor uses string for _id. How do I change Meteor to use ObjectId? Can SimpleSchema handle that? If not, can Astronomy do it and how do I go about getting that done?
    @cyrus-za check out this packagehttps://github.com/thiloplanz/v7files/wiki/Vermongo
    I'm not sure this will help you
    Pieter Venter
    thanks, checking
    @Manjukb I don't get it
    Vermongo seems to be a tool that creates a old copy of documents in a database? How is that going to solve my problem?
    Serkan Durusoy

    @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

    i have a nested class which is generated dynamically
    i want to give different validation param
    how can i do this
    This message was deleted
    This message was deleted
    var createContactAstroClass = function createContactAstroClass(name, defaultType) {
    return Astro.Class({
    name: name,
    fields: {
    type: {
    type: "string",
    default: defaultType || "personal"
    value: {
    type: "string",
    Luis Herranz

    If I use this:

    var app = new App();
      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:

      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?

    Hi everyone, trying to get my head around astronomy and replace my verbose UserProfile code. Pasted in the example User = Astro.Class({
    name: 'User',
    collection: Meteor.users, ......... and it is telling me Error: The "collection" property has to be an instance of the "Mongo.Collection" in the "User" Does anyone have any info on this, perhaps a work-around? Thanks
    Sorry, getting confused.... I think this is related to the accounts package not being installed in the astro example. As you were :-)
    Sam Hatoum
    See herE:
    @samhatoum Thanks for your reply, this is the repo that first informed me about astronomy. I have seen this example in a number of places now, all similar in form but while I can use astronomy for other collections I have so far been unsuccessful in replacing my sign up process to create a suitable Meteor user. I am using Meteor.createUser with options filled from a form to trigger Accounts.onCreateUser which is sending verification emails. When I add the nested UserProfile class it gets saved in mongo as EJSON classes. I know I'm doing something wrong, need to play more with astronomy because everyone is saying the same thing about how to do it, but it just isn't working for me. I will return to this repo and read more. Thanks.
    Hi there guys, this package is awesome!! Can someone explain Astro schemas validate field types by default or I need to manualy attach validators to each field? Thanks!
    Jernej Jerin
    I am looking at documentation for Custom Types
    and examples of array_field.js and object_field.js
    but still have hard time building a custom type set
    I want to have a support for Set object
    I tried to use the code from array_field, but with not much sucess. Acctually it did store something in the document for that field, but it looks broken :)
    also @jagi thank you very much for this super great package
    Jernej Jerin
    I have created a separate help topic on official Meteor forums if someone is willing to help https://forums.meteor.com/t/implementing-custom-type-in-astronomy/16266?u=jeryslo
    Tim Cooper
    Moving to Astronomy 2... Doing type checks I uncovered (not confirmed entirely) a difference between fields set with and without default.
    orderId: String validates as String
    orderId: { type: String, default: 'test' } validates only as 'string'
    Tim Cooper
    @jagi Have I uncovered a type conversion issue there?
    What about relations? Is it work in this version? Example from docs didn't work:(
    Darko Mijić
    Hi @jagi. I havent been here for a wihile. Can you drop me a quick note in what phase is Astronomy 2, is it currently usable and what do you have in mind for a release date. I will start using it in new client project that is starting tomorrow, so I need your pointers regarding should I try v2 for this project. Do You need help with work on a v2 branch of meteor-astronomy-examples?
    Sharry Stowell
    Hi guys, it it possible to have Validators.or on two fields:
    if email is present use that, if phone is present use that else fail the insert
    Tim Cooper
    Does anyone know how to access arguments passed into Astronomy 2 methods?
    It used to be on a “.data” object, has this changed @jagi ?
    how do i set to a Class a variable containing fields/values?
    'createMatch': function(gameSelected, gameDetails){
        var gameRules = new GameRule();
            var gameDetails = ({
              winning: $('#matchTeam').val(),
              achieved: $('#matchAchieved').val(),
              objective: $('#matchObjective').val()
    hmm that works now but didnt before... unsure what i changed...