if (primaryKeyAttributeNames.count()>1) throw new RuntimeException("rawPrimaryKeyInTransaction does not support compound primary keys"); result=pk.objectForKey(primaryKeyAttributeNames.lastObject());
result = ERXArrayUtilities.valuesForKeyPaths(pk, primaryKeyAttributeNames); if(((NSArray)result).count() == 0) result = ((NSArray)result).lastObject();
    public Object rawPrimaryKeyInTransaction() {        Object result = rawPrimaryKey();        if (result == null) {            NSDictionary pk = primaryKeyDictionary(false);            if (log.isDebugEnabled()) log.debug("pk: " + pk);            NSArray primaryKeyAttributeNames=primaryKeyAttributeNames();            if (primaryKeyAttributeNames.count()>1)                throw new RuntimeException("rawPrimaryKeyInTransaction does not support compound primary keys");            result=pk.objectForKey(primaryKeyAttributeNames.lastObject());        }        return result;    }