Problem
12 test classes in runtime/ fail with:
org.hibernate.PropertyValueException: not-null property references a null or transient value
for entity io.casehub.work.runtime.model.WorkItemTemplate.tenancyId
These tests create WorkItemTemplate entities via direct PanacheEntityBase.persist() without setting tenancyId. After #256 made tenancyId a non-null column, these bypass the store's put() stamping logic.
Failing tests
WorkItemInstancesResourceTest
LabelEndpointTest
WorkItemContextBuilderTest
MultiInstanceCreateTest
MultiInstanceCoordinatorTest
MultiInstanceClaimGuardTest
WorkItemGroupLifecycleEventTest
MultiInstanceInboxTest
WorkItemTemplateInstantiateTest
WorkItemTemplateServiceResolutionTest
RoutingCursorLastAccessedTest
RoutingCursorCleanupJobTest
Fix
Each test needs either:
- Set
tenancyId on the template before persist(), or
- Use the store's
put() method with a CurrentPrincipal that returns a tenancyId
This is the same static-Panache-bypass gotcha documented in GE-20260609-49bd08.
Context
Surfaced during work-end build verification for #256. Pre-existing — the code is identical pre/post squash (zero diff confirmed).
Refs #256
Problem
12 test classes in
runtime/fail with:These tests create
WorkItemTemplateentities via directPanacheEntityBase.persist()without settingtenancyId. After #256 madetenancyIda non-null column, these bypass the store'sput()stamping logic.Failing tests
WorkItemInstancesResourceTestLabelEndpointTestWorkItemContextBuilderTestMultiInstanceCreateTestMultiInstanceCoordinatorTestMultiInstanceClaimGuardTestWorkItemGroupLifecycleEventTestMultiInstanceInboxTestWorkItemTemplateInstantiateTestWorkItemTemplateServiceResolutionTestRoutingCursorLastAccessedTestRoutingCursorCleanupJobTestFix
Each test needs either:
tenancyIdon the template beforepersist(), orput()method with aCurrentPrincipalthat returns a tenancyIdThis is the same static-Panache-bypass gotcha documented in GE-20260609-49bd08.
Context
Surfaced during work-end build verification for #256. Pre-existing — the code is identical pre/post squash (zero diff confirmed).
Refs #256