#How to add a simple virtual to mongoose schema

1 messages · Page 1 of 1 (latest)

hasty marlin
#

I was trying to create a virtual that calculates de age of the user based on date of birth, but I was not able to access the date of birth inside the normal virtual get function. Im currently feeling dumb so if anyone can help me with an example, you can just create a example that returns a full name based on first and last names read from the schema

bleak cairn
#

Can you show your code?