Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    peXed
    @peXed
    hello! What is the easiest way to delete a specific object, out of an nested array field? I tried everything, adding them with push, works great, but removing them doesn't work. It won't save the changes.
    peXed
    @peXed
    @peXed To clarify, I wan't to delete the object in the array at a certain index (if possible). It works now with pop, but how can I remove an object in the middle?
    Gregory Schwedock
    @shwaydogg
    @galkowskit you can just go ahead and request devdocs if you wanted: https://trello.com/c/PVnfdeaN/26-suggest-new-docs-here
    Anwain
    @Anwain
    Hey there, anyone know how to make astronomy work with reactive-table
    ?
    Sam Hulick
    @ffxsam
    @jagi could you clarify how the sort behavior works? the documentation is a little confusing. for example:
    var user = Users.findOne();
    user.insertAt(0);
    so we've found a user.. and we're inserting it.. into where exactly?
    seems like an argument is missing
    I would've expected: someCollectionOfItems.insertAt(user, 0)
    or user.insertAt(someCollectionOfItems, 0)
    oh wait. or does it just change the order property of the document in the collection..? so then I would fetch the items based on order using MyStuff.find({}, {sort: {order: -1}})
    jagi
    @jagi

    Yes documentation is not detailed enough. When you create a new document:

    var u = new User();

    You have to insert it into collection using:

    user.insertAt(0);

    You don't use the save() method.
    To get documents already sorted you have to use:

    User.find();

    Notice that it's the class constructor not collection.

    Sam Hulick
    @ffxsam
    ahh, interesting. ok. thanks!
    Sam Hulick
    @ffxsam
    one more Q. I noticed I get this additional _original object inside data I retrieve from mongo. I tried to exclude it via Things.find({}, {fields: {_original: 0}}).fetch() but it still comes through. is this costing me anything in terms of bandwidth? or is it something added on with astronomy that doesn't go through the DDP connection?
    I'm trying to limit as many fields as possible for network performance
    Frank Pimenta
    @frankapimenta
    I was going over the examples with flow router and somehow template.data.user.get() is not retrieving the data that comes with the form. any ideias?
    Sam Hulick
    @ffxsam
    @jagi Is there a way to do optimistic UI with Astronomy? To just do a save() on the client only.. and then later commit that on the server end?
    Gregory Schwedock
    @shwaydogg
    @ffxsam that's standard meteor unless i'm missing something. If you have the insecure package setup; use proper allow deny rules; or use a Meteor Method call that will just work
    Gregory Schwedock
    @shwaydogg
    @frankapimenta, may want to check your astronomy user class. If the fields don't match up exactly you won't pull the results from the DB. Check what is in the DB directly (one way to do so is set .find({},{transform:null})That's all I know to say with the info provided
    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?