Autovalue not run for fields in an array of embedded documents when specified with a positional ("$") operator
See original GitHub issueGiven a document with a field specified as an array of embedded documents, like so:
SubSchema = new SimpleSchema({
value: {
type: String,
autoValue: function() {
return "autovalue";
}
}
});
TestSchema = new SimpleSchema({
children: {
type: [SubSchema]
}
});
A modifier that updates a value within a single embedded document specified with a position operator (‘$’) will not trigger the autovalue. That is, the following doesn’t call the autovalue function:
var mod = {
$set: {"children.$.value": "should be overridden by autovalue"}
};
TestSchema.clean(mod, {isModifier: true});
Complete repro is at https://github.com/fongandrew/meteor-simple-schema-array-test
Issue Analytics
- State:
- Created 9 years ago
- Comments:32
Top Results From Across the Web
Autovalue not run for fields in an array of embedded ... - GitHub
Given a document with a field specified as an array of embedded documents ... with a position operator ('$') will not trigger the...
Read more >Hibernate ORM 6.0.0.CR1 User Guide - Red Hat on GitHub
Hibernate not only takes care of the mapping from Java classes to database ... value's ordinal position within the enum class, as indicated...
Read more >How to get specific values of an embedded document Array in ...
what I tried to is getting all sitename from every embedded documents in the array.I have tried using following syntax ...
Read more >Lingo4G, clustering engine reference
The list of label clusters produced by Lingo4G does not come with document (members of each cluster). This gives the specific application the...
Read more >AutoValue Changes
It is now an error if @Memoized is applied to a method not inside an @AutoValue class. Type annotations are now handled more...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Has somebody tested this. for me it’s still not working.
+1 seems like the pull request has passing tests. Any reason not to merge it? It will soon be one year since the pull request was made.