From 1ea9719139e112cb950d3d77ee5d5415e3e5ac91 Mon Sep 17 00:00:00 2001 From: Marty Pradere Date: Thu, 6 Aug 2026 15:13:35 -0600 Subject: [PATCH] Handle BIGINT exp ObjectId in SND attribute data ETL delete exp 25.005 widened exp.Object.ObjectId and exp.ObjectProperty.ObjectId to BIGINT, but AttributeDataTable.UpdateService.deleteRows still cast the delete key to Integer, so every _SND Attribute Data run failed with ClassCastException: class java.lang.Long cannot be cast to class java.lang.Integer. TransformTask builds each delete key from the target table's PK columns, which here are exp.ObjectProperty's ObjectId and PropertyId, so the first row aborted the step and left the deleted-rows backlog unapplied. EventDataTable's injected exp.Object.ObjectId column was declared JdbcType.INTEGER, the wrong width for the same reason. --- snd/src/org/labkey/snd/query/AttributeDataTable.java | 5 +++-- snd/src/org/labkey/snd/query/EventDataTable.java | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/snd/src/org/labkey/snd/query/AttributeDataTable.java b/snd/src/org/labkey/snd/query/AttributeDataTable.java index 3c907ed08..81d343671 100644 --- a/snd/src/org/labkey/snd/query/AttributeDataTable.java +++ b/snd/src/org/labkey/snd/query/AttributeDataTable.java @@ -434,8 +434,9 @@ public List> deleteRows(User user, Container container, List { for (Map row : oldRows) { - Integer objectId = (Integer) row.get("ObjectId"); - Integer propertyId = (Integer) row.get("PropertyId"); + // exp.ObjectProperty.ObjectId is BIGINT as of exp 25.005, so the value arrives as a Long + Number objectId = (Number) row.get("ObjectId"); + Number propertyId = (Number) row.get("PropertyId"); SqlExecutor executor = new SqlExecutor(_expSchema); SQLFragment deleteObjProp = new SQLFragment("delete from " + _expSchema.getName() + ".ObjectProperty\n"); diff --git a/snd/src/org/labkey/snd/query/EventDataTable.java b/snd/src/org/labkey/snd/query/EventDataTable.java index f7ddb2d1f..1c9bce9d6 100644 --- a/snd/src/org/labkey/snd/query/EventDataTable.java +++ b/snd/src/org/labkey/snd/query/EventDataTable.java @@ -68,7 +68,7 @@ public EventDataTable(SNDUserSchema schema, TableInfo table) @Override public void addColumns() { - BaseColumnInfo objectid = new BaseColumnInfo("ObjectId", this, JdbcType.INTEGER) + BaseColumnInfo objectid = new BaseColumnInfo("ObjectId", this, JdbcType.BIGINT) { @Override public SQLFragment getValueSql(String tableAliasName)