New issue 296 by suman...@gmail.com: Validation should not warn for
Key<T>/DBRefs
http://code.google.com/p/morphia/issues/detail?id=296
Morphia - 1.00-SNAPSHOT
Mongo - mongodb-linux-x86_64-1.6.4
mongo-java-driver - 2.6
Given:
@Entity
Class A {
@Id
ObjectId id
String name
@Reference
B b
}
@Entity
Class B {
@Id
ObjectId id
}
Running:
Iterable<A> as = ds.find(A.class, "name", "MorphiaRules").filter("b",
new Key<B>(B.class, id)).fetch()
Results in the following warning:
WARNING: The type(s) for the query/update may be inconsistent; using an
instance of type 'com.google.code.morphia.Key' for the field 'A.b' which is
declared as 'B'