1

I'm having two collections: Devices and Registrations.

When I add device then I populate Devices with appropriate entry and create document in Registrations with ttl. After one hour entry expires in Registrations but I would like to additionally set status flag in Devices.

Is there an option to create kind of 'function' that would change such flag for a given device after reaching a ttl?

pixel
  • 24,905
  • 36
  • 149
  • 251

1 Answers1

1

You're probably looking for Change Streams and invalidate event.

There's also spring data mongodb support.

Jakub Bibro
  • 1,570
  • 13
  • 17