// Load constructor parameters in appropriate order
loadLocalValue(code, localIndexes[parmIndex], fmds[parmIndex].getObjectIdFieldTypeCode());
if (fmds[parmIndex].getObjectIdFieldTypeCode() == JavaTypes.OBJECT &&
!fmds[parmIndex].getDeclaredType().isEnum()) {
code.checkcast().setType(ObjectId.class);
code.invokevirtual().setMethod(ObjectId.class, "getId",
Object.class, null);
}
// if the type of this field meta data is
// non-primitive and non-string, be sure to cast
// to the appropriate type.