google-code-export / morphia

Automatically exported from code.google.com/p/morphia
1 stars 0 forks source link

Mapper: mappedClassesByCollections is queried but not updated #322

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What version are you using? (Morphia/Driver/MongoDB)
Morphia: 1.00-SNAPSHOT/2.6.5/1.8.1

Please include a stack trace below:

Mapper.java; line 164-167:
mappedClassesByCollections is queried but not updated

Set<MappedClass> mcs = mappedClassesByCollection.get(mc.getCollectionName());
if (mcs == null)
    mcs = new HashSet();
mcs.add(mc);

is missing:

Set<MappedClass> mcs = mappedClassesByCollection.get(mc.getCollectionName());
if (mcs == null) {
    mcs = new HashSet();
    mappedClassesByCollection.put(mc.getCollectionName(), mcs);  // <- missing!
}
mcs.add(mc);

Original issue reported on code.google.com by cuuldur...@gmail.com on 13 Sep 2011 at 12:54

GoogleCodeExporter commented 9 years ago
This issue was closed by revision r1764.

Original comment by scotthernandez on 13 Sep 2011 at 3:39