I want to write an app that manages shifts within employments. Therefore I created a Schema for Employments, that has a field shifts: [Shift]where Shift is the Schema that contains a startDate: Date field.
Now I want to query the Database to return the Employments that have Shifts with the condition: startTimestamp <= startDate <= endTimestamp to display the result in a calendar.
Unfortunately, I cannot figure out how to do the query and I couldn't find some deeper explanations for mongoose queries. It would be nice, if someone could help me.
Thanks in advance!
Aucun commentaire:
Enregistrer un commentaire