Closed arggh closed 7 years ago
afterFind
Feel free to file a PR. I will merge it.
{
firstName: /* firstNameValue */,
lastName: /* lastNameValue */
}
raw()
to get raw document.Feel free to propose some changes. However, please put each change in different PR, so it will be to review and merge only if I need some of them. Thanks for noticing these errors.
I made a pull request with the fixes for now: https://github.com/jagi/meteor-astronomy/pull/490
OK thanks! I will review it today and merge
I was just skimming through the new Astronomy docs before upgrading to v2.0 and found some inconsistencies. I would have made a pull request about the changes if I'd found the proper repository to do so with: it seems that meteor-astronomy-docs is not used anymore?
Any way, here goes:
1. About Find-events
=> I believe the part in bold should be afterFind
2. Example repos
They point to the V1 sample app. There seems to be a V2 branch, but it does not contain examples with the different routers.
3. Many classes in the same collection
=>
4. Secured property
=> Didn't we just do the opposite?
Same section, later on:
So first we turn off security for inserts, then we'll see what happens if we try to insert with secured inserts turned on. This is somewhat confusing?
Improvement ideas
1. Clarification on the small section about saving in the beginning of docs
Then later, in the section titled: Storing documents - Server only call
I found some answers in the end of the document, in the Security-section, but this issue could be elaborated earlier and more profoundly, since it's a major design decision.
In a nutshell, Does Astronomy somehow magically make this allow-deny & save from client -approach viable again, even after MDG officially declared it as bad practice?
2. Mapping
How is this different from a transient field? Am I not returning some value based on another field and some random logic, just like with transient fields? Does it actually copy the mapped field
phoneNumber
to the new fieldphone
in the database? I'm puzzled.3. Getting values
In this part
user.get(['firstName', 'lastName']);
what is the actual return value of getting multiple fields?4. Getting raw values
Can I no longer call
document.raw()
to get the raw object, like I could in V1? Is it only available for nested fields in V2?5. Accessing document
So, just to clarify the example scenario with
User
andAddress
: in theUser
'sbeforeSave
-handler, aree.target
ande.currentTarget
the same document?DISCLAIMER: Sorry if I just misunderstood something, I'm just trying to improve the docs so others won't need to scratch their heads as much as I did :)
Thanks for the awesome package, I've been using Astronomy V1 for about six months and it's been a real gem.