diff --git a/CLAUDE.md b/CLAUDE.md
index 2ca6bd7..0d77ace 100644
--- a/CLAUDE.md
+++ b/CLAUDE.md
@@ -18,5 +18,6 @@ Notes for agents working here:
CONTRIBUTING.md are copy-pasted from qbit-user-role-permissions.
- Licensing metadata is contradictory (LICENSE/NOTICE = Apache-2.0; pom, file headers,
checkstyle template = AGPL-3.0; README footer says proprietary). Open PR #5 fixes the pom.
-- Depends on `qqq-bom-pom:0.40.0-SNAPSHOT` — snapshot resolution may break; see dossier
- "v4.0 impact" before bumping qqq versions.
+- Default builds take the qqq version only from `qbit-build-parent` (2.0.0 = qqq 4.0.0);
+ do not add an always-on `qqq-bom-pom` import (ADR-0007). To check the next qqq line, run
+ `mvn -B verify -Pqqq-snapshot` (4.1.0-SNAPSHOT; override with `-Dqqq.snapshot.version`).
diff --git a/pom.xml b/pom.xml
index ed81ebd..746175f 100644
--- a/pom.xml
+++ b/pom.xml
@@ -25,7 +25,7 @@
com.kingsrook
qbit-build-parent
- 1.5.1
+ 2.0.0
com.kingsrook.qbits
@@ -68,18 +68,6 @@
0.5.0-SNAPSHOT
-
-
-
- com.kingsrook.qqq
- qqq-bom-pom
- 0.40.0-SNAPSHOT
- pom
- import
-
-
-
-
com.kingsrook.qqq
@@ -110,11 +98,39 @@
-
-
- sonatype-snapshots
- https://central.sonatype.com/repository/maven-snapshots/
-
-
+
+
+
+
+
+ qqq-snapshot
+
+ 4.1.0-SNAPSHOT
+
+
+
+
+ com.kingsrook.qqq
+ qqq-bom-pom
+ ${qqq.snapshot.version}
+ pom
+ import
+
+
+
+
+
+ sonatype-snapshots
+ https://central.sonatype.com/repository/maven-snapshots/
+
+ false
+
+
+ true
+
+
+
+
+
diff --git a/src/main/java/com/kingsrook/qbits/customizabletableviews/tables/customizers/TableViewFieldCustomizer.java b/src/main/java/com/kingsrook/qbits/customizabletableviews/tables/customizers/TableViewFieldCustomizer.java
index 5e21127..abce184 100644
--- a/src/main/java/com/kingsrook/qbits/customizabletableviews/tables/customizers/TableViewFieldCustomizer.java
+++ b/src/main/java/com/kingsrook/qbits/customizabletableviews/tables/customizers/TableViewFieldCustomizer.java
@@ -36,6 +36,7 @@ import com.kingsrook.qqq.backend.core.model.data.QRecord;
import com.kingsrook.qqq.backend.core.model.metadata.fields.QFieldMetaData;
import com.kingsrook.qqq.backend.core.model.statusmessages.BadInputStatusMessage;
import com.kingsrook.qqq.backend.core.model.statusmessages.SystemErrorStatusMessage;
+import com.kingsrook.qqq.backend.core.utils.ValueUtils;
/*******************************************************************************
@@ -57,8 +58,8 @@ public class TableViewFieldCustomizer implements TableCustomizerInterface
try
{
Integer id = record.getValueInteger("id");
- String fieldName = RecordCustomizerUtilityInterface.getValueFromRecordOrOldRecord("fieldName", record, id, oldRecordMap);
- String accessLevelId = RecordCustomizerUtilityInterface.getValueFromRecordOrOldRecord("accessLevel", record, id, oldRecordMap);
+ String fieldName = ValueUtils.getValueAsString(RecordCustomizerUtilityInterface.getValueFromRecordElseFromOldRecord("fieldName", record, id, oldRecordMap));
+ String accessLevelId = ValueUtils.getValueAsString(RecordCustomizerUtilityInterface.getValueFromRecordElseFromOldRecord("accessLevel", record, id, oldRecordMap));
String[] parts = fieldName.split("\\.");
String tableName = parts[0];
diff --git a/src/test/java/com/kingsrook/qbits/customizabletableviews/BaseTest.java b/src/test/java/com/kingsrook/qbits/customizabletableviews/BaseTest.java
index 155b97c..d7b36c9 100644
--- a/src/test/java/com/kingsrook/qbits/customizabletableviews/BaseTest.java
+++ b/src/test/java/com/kingsrook/qbits/customizabletableviews/BaseTest.java
@@ -78,7 +78,7 @@ public class BaseTest
// basic definition of an instance //
/////////////////////////////////////
QInstance qInstance = new QInstance();
- qInstance.setAuthentication(new QAuthenticationMetaData().withType(QAuthenticationType.FULLY_ANONYMOUS));
+ qInstance.withInstanceDefaultAuthentication(new QAuthenticationMetaData().withType(QAuthenticationType.FULLY_ANONYMOUS));
qInstance.addBackend(new RDBMSBackendMetaData()
.withName(RDBMS_BACKEND_NAME)
.withVendor("h2")
diff --git a/src/test/java/com/kingsrook/qbits/customizabletableviews/tables/customizers/TableViewFieldCustomizerTest.java b/src/test/java/com/kingsrook/qbits/customizabletableviews/tables/customizers/TableViewFieldCustomizerTest.java
index bb0d21d..4e710a5 100644
--- a/src/test/java/com/kingsrook/qbits/customizabletableviews/tables/customizers/TableViewFieldCustomizerTest.java
+++ b/src/test/java/com/kingsrook/qbits/customizabletableviews/tables/customizers/TableViewFieldCustomizerTest.java
@@ -96,6 +96,32 @@ class TableViewFieldCustomizerTest extends BaseTest
+ /*******************************************************************************
+ ** a sparse update (e.g., only accessLevel set) must validate against the
+ ** fieldName from the old record.
+ *******************************************************************************/
+ @Test
+ void testSparseUpdateUsesOldRecordValues() throws QException
+ {
+ QContext.getQInstance().addTable(new QTableMetaData()
+ .withName("testTable3")
+ .withField(new QFieldMetaData("mandatory", QFieldType.STRING).withIsRequired(true))
+ .withField(new QFieldMetaData("optional", QFieldType.STRING)));
+
+ Optional> oldRecordList = Optional.of(List.of(
+ new TableViewField().withId(1).withFieldName("testTable3.mandatory").withAccessLevel(FieldAccessLevel.EDITABLE_REQUIRED).toQRecord(),
+ new TableViewField().withId(2).withFieldName("testTable3.optional").withAccessLevel(FieldAccessLevel.EDITABLE_OPTIONAL).toQRecord()));
+
+ QRecord mandatoryToReadOnly = new QRecord().withValue("id", 1).withValue("accessLevel", FieldAccessLevel.READ_ONLY.getId());
+ QRecord optionalToReadOnly = new QRecord().withValue("id", 2).withValue("accessLevel", FieldAccessLevel.READ_ONLY.getId());
+ new TableViewFieldCustomizer().preInsertOrUpdate(null, List.of(mandatoryToReadOnly, optionalToReadOnly), false, oldRecordList);
+
+ assertThat(mandatoryToReadOnly.getErrors()).hasSizeGreaterThan(0);
+ assertThat(optionalToReadOnly.getErrors()).isNullOrEmpty();
+ }
+
+
+
/***************************************************************************
*
***************************************************************************/