Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Frank Pimenta
    @frankapimenta
    @shwaydogg yes. The form has less fields than the object it is creating. timestamps are some of them. How do I use this when the fields in the form are of small number than all the fields of the object the form is supposed to create?
    Frank Pimenta
    @frankapimenta
    @shwaydogg I will explain the issue again because it is subject to many interpretations.
    I have a userForm template. This template do not have fields for all fields in the user object. But the User Astro class has all the fields of the user mongo db object with the exception of the field _id.
    When I fill the form to create a new user, the template.data.user object (reactive var) does not bring the information I input". The input fields come empty. On edition it brings the old values, not the changes.
    Frank Pimenta
    @frankapimenta
    I have my reactive var within autorun which subscribes the collection User as well.
    Gregory Schwedock
    @shwaydogg
    @frankapimenta probably best to make an example with your issue, show some of your code/ a repo or , make a stackoverflow question with such info. Otherwise we'll end up talking in circles describing it. (post the Stackoverflow link here if you do)
    Frank Pimenta
    @frankapimenta
    @shwaydogg I'm sorry. Your are right. Thank you for the understanding and interest. I will try to make a good example of it. But Today is just not a good day to me :(. Tomorrow.
    Luis Herranz
    @luisherranz
    I'd love a default Validators.url() validator :)
    loving astronomy so far btw
    Luis Herranz
    @luisherranz
    @jagi I have made a PR: jagi/meteor-astronomy-validators#37
    BTW, how are you testing the code? Are you?
    Frank Pimenta
    @frankapimenta
    I think it now it is better explained
    thank you
    crussi
    @crussi
    Hi Jagi, First off, you're work is AMAZING! You're so talented and I've been really enjoying working with Astronomy. Everything is going well and I'm in awe of your work. I'm having difficulty creating a relations. I've followed the documentation to the letter. I've read and re-read the documentation and even the source code. For some reason, my relations is always Null. I tried a very simple relation. Here is a small snippet:
       DelegateId: {
            type: 'string',
            default:''
        },
        Delegate: {
            type: 'string',
            default:'',
            transient: true
        },
        relations: {
            delegate: {
                type: 'one',
                class: 'Contact',
                local: 'DelegateId',
                foreign: '_id'
            }
        },
    My class Task has a DelegateId that relates to a Contact table's _id field. It can't get any easier. Any ideas what I might be doing wrong?
    Roman Kuba
    @codebryo
    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
    @andersr
    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
    @ffxsam
    Manjukb
    @Manjukb
    hello
    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
    @cyrus-za
    hi
    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?
    Manjukb
    @Manjukb
    @cyrus-za check out this packagehttps://github.com/thiloplanz/v7files/wiki/Vermongo
    I'm not sure this will help you
    Pieter Venter
    @cyrus-za
    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
    @serkandurusoy

    @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

    Manjukb
    @Manjukb
    hi
    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
    {code}
    var createContactAstroClass = function createContactAstroClass(name, defaultType) {
    return Astro.Class({
    name: name,
    fields: {
    type: {
    type: "string",
    default: defaultType || "personal"
    },
    value: {
    type: "string",
    }
    }
    });
    };
    Luis Herranz
    @luisherranz

    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?

    Dave
    @macasas
    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
    @samhatoum
    See herE:
    @macasas
    Dave
    @macasas
    @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.
    negamaxi
    @negamaxi
    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
    @jeryini
    hi!
    I am looking at documentation for Custom Types
    and examples of array_field.js and object_field.js