question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Timestamp override - nested keys

See original GitHub issue

Perhaps 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:closed
  • Created 7 years ago
  • Comments:8

github_iconTop GitHub Comments

1reaction
vkarpov15commented, May 26, 2017

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

0reactions
vkarpov15commented, Oct 8, 2016

If you need it, you can just add a dep on lodash.set https://www.npmjs.com/package/lodash.set

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found