OPENJPA-562. Checking in on behalf of Sandeep Shrivastava after running 'mvn test'

git-svn-id: https://svn.apache.org/repos/asf/openjpa/branches/1.1.x@646108 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Patrick Linskey 2008-04-08 22:32:35 +00:00
parent 7cece296b3
commit 8d923c33a3
1 changed files with 5 additions and 3 deletions

View File

@ -1124,9 +1124,11 @@ public class FieldMetaData
//set "isUsedInOrderBy" to the field
ClassMetaData elemCls = getElement()
.getDeclaredTypeMetaData();
FieldMetaData fmd = elemCls.getDeclaredField(decs[i]);
if (fmd != null)
fmd.setUsedInOrderBy(true);
if (elemCls != null) {
FieldMetaData fmd = elemCls.getDeclaredField(decs[i]);
if (fmd != null)
fmd.setUsedInOrderBy(true);
}
}
_orders = orders;
}