Timestamp override - nested keys
See original GitHub issuePerhaps it would be nice to have nested values so one could later also set created.by
, etc…
const ItemSchema = new Schema({
name: { type: String }
}, { timestamps: { createdAt: 'created.at', updatedAt: 'updated.at' } })
Issue Analytics
- State:
- Created 7 years ago
- Comments:8
Top Results From Across the Web
java - Timestamp based sorting for a nested Map - Stack Overflow
I need to sort this whole structure chronologically (or reverse chronologically) for display, newest objects created at the top, going backwards. I was...
Read more >MessageHeaders (Spring Framework 6.0.3 API)
Construct a MessageHeaders with the given headers. An ID and TIMESTAMP headers will also be added, overriding any existing values.
Read more >Rule Types and Configuration Options - ElastAlert
When set, only those fields, along with '@timestamp', query_key , compare_key , and top_count_keys are included, if present. (Optional, list of strings, ...
Read more >Language Guide (proto3) | Protocol Buffers - Google Developers
... Default Values; Enumerations; Using Other Message Types; Nested Types; Updating A Message Type ... map : this is a paired key/value field...
Read more >Tutorial: Querying nested data with Amazon Redshift Spectrum
Amazon Redshift Spectrum supports querying nested data in Parquet, ORC, JSON, ... phones array<varchar(20)>, orders array<struct<shipdate:timestamp, ...
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 Free
Top 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
This appears to have been fixed, I added a test case covering it in 405bfb3. Works in mongoose >= 4.10.0, looks like this was fixed with #5051 in 4.9.1
If you need it, you can just add a dep on lodash.set https://www.npmjs.com/package/lodash.set