Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No AfterLoadEvent when loading DBRef [DATAMONGO-1044] #1966

Closed
spring-projects-issues opened this issue Sep 2, 2014 · 4 comments
Closed

No AfterLoadEvent when loading DBRef [DATAMONGO-1044] #1966

spring-projects-issues opened this issue Sep 2, 2014 · 4 comments
Assignees

Comments

@spring-projects-issues
Copy link

@spring-projects-issues spring-projects-issues commented Sep 2, 2014

Martin Sturm opened DATAMONGO-1044 and commented

I'd like to implement lazy schema migration using AbstractMongoEventListener that transforms old documents into new schema before mapping. It works as long as the documents are loaded directly. But when documents are loaded via DBRef then AbstractMongoEventListener#onAfterLoad.

The guy here (http://forum.spring.io/forum/spring-projects/data/130328-mongoeventlistener-onafterload-and-dbref ) describes the same problem with more detailed example


Affects: 1.5.1 (Dijkstra SR1)

Issue Links:

1 votes, 3 watchers

@spring-projects-issues
Copy link
Author

@spring-projects-issues spring-projects-issues commented Dec 14, 2016

Joanna Kocot commented

I think this is also the same problem as described here: http://stackoverflow.com/questions/36656297/spring-abstractmongoeventlistener-does-not-trigger.
Generally, the methods (at least onAfterLoad() and onAfterConvert()) overridden in extensions of AbstractMongoEventListener don't get invoked when dealing with DBRefs. Is there any chance this will be fixed (still present in 1.9.5.RELEASE)?

@spring-projects-issues
Copy link
Author

@spring-projects-issues spring-projects-issues commented Dec 14, 2016

Oliver Drotbohm commented

I can see the triggering of the events being implemented in MappingMongoConverter.bulkReadAndConvertDBRefs(…) added in the course of DATAMONGO-1194 which was resolved for Ingalls M1. Care to give this release a spin?

@spring-projects-issues
Copy link
Author

@spring-projects-issues spring-projects-issues commented Dec 14, 2016

Joanna Kocot commented

It seems to work fine with Ingalls M1

@spring-projects-issues
Copy link
Author

@spring-projects-issues spring-projects-issues commented Dec 16, 2016

Oliver Drotbohm commented

Resolving as fixed for Ingalls M1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants