Where communities thrive

  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
Repo info
    Andreas West
    Hi guys, how do I remove a field from a collection in Astronomy? I'm currently using $unset: { temp: '' } but it seems that Astronomy is not allowing this operation to happen. I'm wondering what the equivalent is. Please that I don't want to set it to false or null, I want the field being deleted from my collection. Thanks in advance for your help!
    Andreas West
    Found this old thread: https://www.bountysource.com/issues/27982620-undefined-value-should-not-be-set-as-null-into-db where Lukas writes "And you can't unset a field for a single document because you want all data to be consistent" and further down he says " In Astronomy 2.0 it will be possible to unset a field but you will be doing it on your own risk :P"
    Luca Di Gaspero
    Hi all, I am trying to use class level validation, however the example in the documentation is not so helpful (being incorrect)
    validators: [
    firsName: [{
    type: 'minLength',
    param: 3
    I tried fixing it as
    validators: [{ type: "myCustomClassValidator" }] but i still get TypeError: ["Problem" class]["validators" property] Validators definition has to be an array of objects
    @liuq You need to state your field key, for example:
    validators: [
      xxxField: [{ type: 'yourCustomClassValidator'}],
    Luca Di Gaspero
    Right, so it's not possible to define a real class-level validator (i.e., looking at all fields), this is just a place where to put field-level validation.
    Emad Radwan
    Hi There,
    Sorry for a pure beginner question. Does Astronomy provide alternative for Mongoose?
    Andrew Ckor
    No astronomy is only for meteor
    Alex Price
    Is there a way to set e.trusted to false for testing purposes?
    Alex Price
    Looking through the lib code it doesn't look like it... I'll override with NODE_ENV for now
    Hello, does astronomy support the definition of relations between tables ? I see some github comments from 2015 but nothing more
    Or should I be using methods inside the objects ?
    Lukas Van Orshoven
    Seems like there's a package for that. I don't have any experience with it. https://jagi.github.io/meteor-astronomy/v1#relations
    @Lukasvo but that is v1
    do you guys use v1 or v2 in production apps ?
    Lukas Van Orshoven
    Oh, sorry 'bout that. I also read that package has been discontinued jagi/meteor-astronomy#624
    I use v2. I simply store the id of the related Class as a String and use helpers to access it
    Iain Hallam
    Is anyone using Astronomy with Grapher?
    Srimal Priyanga
    Couldn't find any rect example using astronomy, does is possible to use astronomy with react
    Ryan Watts
    Just finding out about Astronomy, Great Work !
    Is there an Autoform type companion to Astronomy.
    Such as Aldeed's Autoform is to Simpleschema ?
    I am sure this is something very obvious that I am missing.... how can I programmatically get the name of the Astronomy class (for example in a helper)?
    Lukas Van Orshoven
    Class.getName() ?
    Frank Pimenta
    TypeError: Cannot read property 'create' of undefined -----> but I am importing
    Luca Ciraolo
    is it possible to trigger a save if no fields have changed? I want the beforeSave event to trigger
    even if no changes have been made