IDEMPIERE-3175 Found 2pack problems when UUID is filled with external values
This commit is contained in:
parent
1ebbb7b14e
commit
3c4b899752
|
@ -489,7 +489,7 @@ public abstract class AbstractElementHandler implements ElementHandler {
|
|||
if (element.properties.containsKey(uuidColumn)) {
|
||||
uuid = element.properties.get(uuidColumn).contents.toString();
|
||||
}
|
||||
return (uuid != null && uuid.trim().length() == 36);
|
||||
return (uuid != null && uuid.trim().length() <= 36);
|
||||
}
|
||||
|
||||
protected String getUUIDKey(PIPOContext ctx, Element element) {
|
||||
|
@ -497,7 +497,7 @@ public abstract class AbstractElementHandler implements ElementHandler {
|
|||
String uuidColumn = PO.getUUIDColumnName(tableName);
|
||||
if (element.properties.containsKey(uuidColumn)) {
|
||||
String uuid = element.properties.get(uuidColumn).contents.toString();
|
||||
if (uuid != null && uuid.trim().length() == 36)
|
||||
if (uuid != null && uuid.trim().length() <= 36)
|
||||
return uuid.trim();
|
||||
}
|
||||
return null;
|
||||
|
|
|
@ -82,7 +82,7 @@ public class POFinder {
|
|||
String idColumn = tableName + "_ID";
|
||||
if (element.properties.containsKey(uuidColumn)) {
|
||||
String uuid = element.properties.get(uuidColumn).contents.toString();
|
||||
if (uuid != null && uuid.trim().length() == 36) {
|
||||
if (uuid != null && uuid.trim().length() <= 36) {
|
||||
uuid = uuid.trim();
|
||||
String targetUUID = Env.getAD_Client_ID(ctx.ctx) > 0 ? getTargetUUID(ctx.ctx, tableName, uuid, ctx.trx.getTrxName()) : uuid;
|
||||
Query query = new Query(ctx.ctx, tableName, uuidColumn+"=?", getTrxName(ctx));
|
||||
|
|
Loading…
Reference in New Issue