DATADOC-97 - Fixed an NPE in the QueryMapper class.

This commit is contained in:
Jon Brisbin
2011-04-27 11:17:06 -05:00
committed by J. Brisbin
parent 224934a28c
commit 21f859e222

View File

@@ -46,7 +46,7 @@ public class QueryMapper<T> {
public DBObject getMappedObject() {
String idKey = null;
if (null != entity) {
if (null != entity && null != entity.getIdProperty()) {
idKey = entity.getIdProperty().getName();
} else if (query.containsField("id")) {
idKey = "id";