1 article MongoDB

Spring Data MongoDB and JSR Validation using Lazy DBRef

The Problem Recently using MongoDB and Spring Data I encountered an interesting issue. Saving an Entity  which was loaded by @DBRef(lazy = true) wasn’t possible together with the activated ValidatingMongoEventListener. Each time the following error occurred:

The Issue Well looking into the details it is quite clear — as an dynamic proxy is passed to the validation which fields…