Announcement Announcement Module
Collapse
No announcement yet.
Srping MongoDB Testing Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Srping MongoDB Testing

    Even though MongoDB does not support transactions. It would be nice to have a mechanism (perhaps an annotation) to undo your writes to the database at testing time.

  • #2
    You could try to implement something like that yourself by building a tests-registered-only event listener (extending AbstractMongoEventListener) that collects in memory the new entities saved to the db using onSave() event handler and removes all of them from the db when the context shuts down.

    Comment

    Working...
    X