1) Fix a serialization problem in command inherits AsyncCreateCommand.

2) Deal with special IDs (i.e. -1) in UUID translation
This commit is contained in:
Kelven Yang 2011-11-07 17:59:58 -08:00
parent 0b6abd1717
commit 9489d6ffeb
2 changed files with 4 additions and 0 deletions

View File

@ -446,6 +446,7 @@ public class ApiServer implements HttpRequestHandler {
}
if (objectId != null) {
SerializationContext.current().setUuidTranslation(true);
return ((BaseAsyncCreateCmd) asyncCmd).getResponse(jobId, objectId, objectEntityTable);
}

View File

@ -75,6 +75,9 @@ public class IdentityDaoImpl extends GenericDaoBase<IdentityVO, Long> implements
if(rs.next()) {
return rs.getLong(1);
} else {
if(id != 0)
return id;
throw new InvalidParameterValueException("Object " + tableName + "(uuid: " + identityString + ") does not exist.");
}
} catch (SQLException e) {