@DbRef is not saving child object automatically in spring data mongodb

dbref, mongodb, spring-data

Solution

Saving child objects is not built into Spring Data MongoDB so you have to do it manually or you can extend AbstractMongoEventListener as I described it in my article: Spring Data MongoDB cascade save on DBRef objects

Problem

I am currently using GA release of Spring Data MongoDB framework and @DbRef is not saving child object automatically in spring data mongodb. Can you tell me how can i make it work?

Original source