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

Using @Field("foo") with @Dbref breaking behavior. [DATAMONGO-1058] #1979

spring-projects-issues opened this issue Sep 18, 2014 · 3 comments


Copy link

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

Allan Chiou opened DATAMONGO-1058 and commented

When transitioning from 1.4.3.RELEASE to 1.6.0.RELEASE, the model below no longer returns with map


class Model {
	ObjectId id;
* Currently only works without @Field annotation
	Map<String, Foo> mapOfFoos ; //assume Foo is a class


public interface ModelDao extends MongoRepository<Model, ObjectId> {

public interface FooDao extends MongoRepository<Foo, ObjectId> {

Snippet of a unit test

Model model = new Model();
Map<String, Foo> mapOfFoos = new HashMap<String, Foo>();
Foo foo = new Foo()
mapOfFoo("somestring", foo)
Model  retreivedModel = modelDao.findOne(model.getId());
//retreivedModel.getMapOfFoos() returns null
//EXPECTED (and previous behavior) retreivedModel.getMapOfFoos() not null

Affects: 1.6 GA (Evans)

Reference URL:

Referenced from: pull request #227

Backported to: 1.6.1 (Evans SR1), 1.5.5 (Dijkstra SR5)

1 votes, 3 watchers

Copy link

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

Christoph Strobl commented

Should be back ported to 1.6.x.
Can be back ported to 1.5.x. Minor glitches there but still can be done

Copy link

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

Thomas Darimont commented

Merged into master.

Backports to be discussed

Copy link

@spring-projects-issues spring-projects-issues commented Oct 1, 2014

Thomas Darimont commented

Back ported to 1.6.x and 1.5.x

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

Successfully merging a pull request may close this issue.

None yet
2 participants