meteor-astronomy icon indicating copy to clipboard operation
meteor-astronomy copied to clipboard

With Sort-behaviour, how do I get inserted doc _id?

Open arggh opened this issue 8 years ago • 1 comments

If I save a document with Astronomy, the save-function returns the id of the document, which is helpful.

Is there a good reason why saving a document with insertAt-function returns a boolean? I couldn't see any mention of this in documentation.

arggh avatar Mar 17 '16 01:03 arggh

Hmm that was probably caused by the fact that it's not possible to insertAt documents that are already saved and have ID. So in such situations I'm returning false and otherwise true. But in fact this information is not necessary. It could also return undefined and if it succeeded then ID. I will fix it but I won't be able to do that in next two weeks. So you have to wait.

lukejagodzinski avatar Mar 17 '16 08:03 lukejagodzinski