clazzWithIdField.identity.oidClassAutoCalculated = true;
clazzWithIdField.identity.objectidClass = objectidClass;
}
Manager manager = (Manager) jc.getPackage().getParent();
//The user has specified an object id ==> use it for the namedef
CompositeName cn = manager.getCompositeName(objectidClass);
boolean cnNotDefined = (cn == null);
if (cnNotDefined) {
if (debug) {
logger.log(BasicLevel.DEBUG, "\tCreate the composite name " + objectidClass);
}
cn = manager.createCompositeName(objectidClass);
createdMOs.add(cn);
}
NameRef nr = nd.createNameRef(cn);
for (int i = 0; i < idFields.size(); i++) {
SpeedoField pkField = (SpeedoField) idFields.get(i);
int size = PType.NOSIZE;
int scale = PType.NOSIZE;
if (pkField.columns != null && pkField.columns.length == 1) {
if (pkField.columns[0].length != -1) {
size = pkField.columns[0].length;
}
if (pkField.columns[0].scale!= -1) {
scale = pkField.columns[0].scale;
}
}
if (cnNotDefined) {
cn.createCompositeNameField(pkField.name,
mibh.getPrimitivePType(Type.getType(pkField.type)),
size, scale);
}
nr.addProjection(pkField.name, pkField.name);
}