Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    arggh
    @arggh
    @jagi regarding Enums, is there any explanation for this: "You can also define non number ENUMs, however it’s not recommended.", other than the fact that using Strings takes more space?
    Trying to use Astronomy's Enums in an app that utilizes HTML Select elements causes difficulties, when the Enum's integer values are cast into strings. Would be convenient to use just strings all the way. Also, the data in the Mongo collection would be more self-explanatory: compare [0, 1, 2] to ['YES', 'NO', 'MAYBE']. Any thoughts?
    tzapu
    @tzapu
    hi guys, thank you for a wonderful package :D
    i had one question for the more advanced users here, could i use transient fields or resolve to have, well, basically relations ? as in fetch a field from another collection into a field in the current collection?
    would that be impossible? bad? crap performance? etc?
    thanks
    Bryant Biggs
    @bryantbiggs
    hello everyone - if I have a form split up in sections where after each section clicks "Next" or something, how can I define a schema that will allow a gradual build-up of the document? If I define the schema and the first form only fills in 4 of N inputs, the validation fails because its missing the other inputs
    arggh
    @arggh
    @bryantbiggs 1) Keep the data stored elsewhere until the document is ready to be saved 2) Set the fields as optional, so they are not validated if they don't exist
    Chandrasekar
    @iamcsk

    HI
    I just started to use astronomy when I am trying to save my folder collection am getting some error which is below

    original
    :
    [Exception: TypeError: Cannot read property '_id' of undefined at

    Am i missing anything in configuration ? Thank you in advance

    Bryant Biggs
    @bryantbiggs
    @arggh thank you for the response but I was able to resolve the issue by saving the document as the base class type for the first form submission, then on the 2nd form submission I updated the class type from the base to the child class and stored the remaining information. This kept all of the validation and required fields intact in their respective classes
    Alexis A. Banaag Jr.
    @aabanaag

    hi, have some questions with Class.findOne(). Can I add query inside the findOne() method?

    Class.create({ name: ‘Settings’, fields: { userId: String, name: String } });

    now I want to do is Class.findOne({userId: ‘hello’}); or Class.findOne({ name: ‘Hi’ }); is it possible?

    Andrew Hartwig
    @Andrew1431
    Yes, but you also need a { collection: new Mongo.Collection('settings') } key in there.
    PolGuixe
    @PolGuixe
    which version of regex does it support?
    I am trying to find a suitable regex expression for URLs
    Romuald DANSOU
    @inromualdo
    Hi
    What about transaction with astronomy?
    Romuald DANSOU
    @inromualdo
    What about publish-composite? I am new with astronomy.
    Adalberto Soares
    @soaresa
    You can use publishComposite with astronomy but you must use collections in it and not the classes
    midisale
    @midisale
    I can't even get the examples running...
    on Class.create({...}) I get (STDERR) TypeError: Super expression must either be
    null or a function, not object
    any suggestions?
    using Meteor 1.4.2.3
    blob
    blob
    midisale
    @midisale
    blob
    midisale
    @midisale
    Figured it out. I was mistakenly putting "new" before Class.create
    Romuald DANSOU
    @inromualdo
    Thank you. Can i use babrahams:transactions with astronomy? If not how can i do transactions?
    Zak Lampert
    @zaklampert
    Is it possible to publish _removed documents explicitly?
    Lucas Peres
    @mysyfy
    how can i define my own cast method for each field ?
    need to parse date coming from input
    akumei
    @akumei
    Hi Have a super random question... do you know if Astronomy's save field modifier accepts anything besides an array?
    I currently am testing with it and we noticed that it says array of fields but can it just accept one single string that's not in an array? Thanks! :)
    Punita Ojha
    @punitaojha
    This message was deleted
    Srimal Priyanga
    @SrimalPriyanga
    documentation not clear especially "Fetching documents" section :worried:
    davidsavoie1
    @davidsavoie1
    In the Transient fields section, the age field is calculated and initialized in the afterInit event. In that case, will age change as time goes on, or is it calculated only once and then it's set? Why should we use Transient fields instead of Helpers in this case?
    pit999
    @pit999
    Is there an example for integration with Ionic and typescript?
    pit999
    @pit999
    How can I use MongoObservable (import { MongoObservable } from 'meteor-rxjs';)
    Alex Price
    @remotealex
    Is there a nice way to prevent the updating of a field entirely? I'm extending the Meteor.users collection and want to safeguard against updating emails and passwords though the Astro class
    Alex Price
    @remotealex
    Ah! there is an immutable flag <3
    J3m5
    @J3m5
    Hi! I don't understand how to use Validators. I would like to use it to validate a method in the server side extended method, but I don't know where to put the validate method. In the class? Server-side? Client side?
    J3m5
    @J3m5
    And does the validate method replace the save method? I'm a bit confused, the doc doesn't seem clear to me.
    Andreas
    @andreyunugro
    Hi @J3m5, here the documentation link to create custom validators: https://jagi.github.io/meteor-astronomy/#creating-validators
    I recently defined it in the same file js as schema definition
    So it is server side, you can define it in the same file as schema definition, and after you defined it, you can use it in the fields definition
    AFAIK, Validate method add validation when you call .save();
    J3m5
    @J3m5
    Thank you for your answer. I have succeeded to use it. For now, I don't use custom validators. I use the validate method in the server side class and i do the save() in the else of the "if(ValidationError.is(err)) {}". It works pretty well like that. It gives me this:
     this.validate({
                    fields: ['name']
                }, (err) => {
    
                    if (ValidationError.is(err)) {
                        throw new Meteor.Error();
                    } else {
                        return this.save();
    }
    Andrew Ckor
    @andrewckor
    Hello guys!
    I'm using Astronomy for a long time, it used to work perfectly. But when I updated to meteor 1.6 I keep getting errors on save();
    Exception while invoking method '/Astronomy/execute' TypeError: Class is not a constructor
    I20171103-20:10:21.932(2)?     at DDPCommon.MethodInvocation.astronomyExecute (packages/jagi:astronomy/lib/modules/methods/meteor_methods/astronomyExecute.js:22:11)
    I20171103-20:10:21.933(2)?     at maybeAuditArgumentChecks (packages/ddp-server/livedata_server.js:1768:12)
    I20171103-20:10:21.933(2)?     at DDP._CurrentMethodInvocation.withValue (packages/ddp-server/livedata_server.js:719:19)
    I20171103-20:10:21.933(2)?     at Meteor.EnvironmentVariable.EVp.withValue (packages/meteor.js:1134:15)
    I20171103-20:10:21.934(2)?     at DDPServer._CurrentWriteFence.withValue (packages/ddp-server/livedata_server.js:717:46)
    I20171103-20:10:21.934(2)?     at Meteor.EnvironmentVariable.EVp.withValue (packages/meteor.js:1134:15)
    I20171103-20:10:21.934(2)?     at Promise (packages/ddp-server/livedata_server.js:715:46)
    I20171103-20:10:21.934(2)?     at new Promise (<anonymous>)
    I20171103-20:10:21.934(2)?     at Session.method (packages/ddp-server/livedata_server.js:689:23)
    I20171103-20:10:21.934(2)?     at packages/ddp-server/livedata_server.js:559:43
    I see more people getting this in older issues, but not anymore, and I don't know if it's my problem or meteor.