if (s_logger.isDebugEnabled())
{
s_logger.debug("addInsert(uow=\"" + uow + "\", instance=\"" + instance + "\")");
}
FileMapping fileMapping = (FileMapping)instance.getPersistenceMapping();
OID oid = instance.getOID();
getWork(uow, FileWork.INSERT, instance);
if (oid == null)
{
//Generate OID using key generator specified in metadata configuration
Component component = fileMapping.getKeyGenerator();
oid = ((OIDGenerator)component.getInstance(uow.getInvocationContext())).generateOID(instance, this);
//OID must be a single value, converted to a string.
Object[] oidValues = oid.getValueArray();