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)) {
|
if (element.properties.containsKey(uuidColumn)) {
|
||||||
uuid = element.properties.get(uuidColumn).contents.toString();
|
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) {
|
protected String getUUIDKey(PIPOContext ctx, Element element) {
|
||||||
|
@ -497,7 +497,7 @@ public abstract class AbstractElementHandler implements ElementHandler {
|
||||||
String uuidColumn = PO.getUUIDColumnName(tableName);
|
String uuidColumn = PO.getUUIDColumnName(tableName);
|
||||||
if (element.properties.containsKey(uuidColumn)) {
|
if (element.properties.containsKey(uuidColumn)) {
|
||||||
String uuid = element.properties.get(uuidColumn).contents.toString();
|
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 uuid.trim();
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
|
|
|
@ -82,7 +82,7 @@ public class POFinder {
|
||||||
String idColumn = tableName + "_ID";
|
String idColumn = tableName + "_ID";
|
||||||
if (element.properties.containsKey(uuidColumn)) {
|
if (element.properties.containsKey(uuidColumn)) {
|
||||||
String uuid = element.properties.get(uuidColumn).contents.toString();
|
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();
|
uuid = uuid.trim();
|
||||||
String targetUUID = Env.getAD_Client_ID(ctx.ctx) > 0 ? getTargetUUID(ctx.ctx, tableName, uuid, ctx.trx.getTrxName()) : uuid;
|
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));
|
Query query = new Query(ctx.ctx, tableName, uuidColumn+"=?", getTrxName(ctx));
|
||||||
|
|
Loading…
Reference in New Issue