Enabling the audit log took three deploys, and every failure was silent.
(a) Entity names must match the metamodel exactly, and a mismatch is indistinguishable
from "not logged on purpose." I registered app_Document; the metamodel name is
Document (no prefix — the same name used in JPQL). Nothing threw. LoggedEntity rows were
created, the screen showed them, and no entity was ever logged. There is no validation
because "unknown entity name" and "this entity is deliberately not logged" look identical.
(b) EntityLog caches its configuration at startup. Configuring logging
programmatically (in ApplicationStartedEvent) writes rows the module has already read
past. The log stays empty until the NEXT restart. Fix: entityLog.invalidateCache() after
writing the configuration.
Neither is discoverable by any gate: the application starts, the screens open, the tests
pass. The only check that finds it is: perform an action, then query
AUDIT_ENTITY_LOG and assert a row appeared. That belongs in jmix-verify-bootrun as the
verification step for any feature whose output is a side effect rather than a screen.
Found while building a real Jmix 2.8 application (document registry, Vaadin UI, PostgreSQL, deployed behind nginx).
Enabling the audit log took three deploys, and every failure was silent.
(a) Entity names must match the metamodel exactly, and a mismatch is indistinguishable
from "not logged on purpose." I registered
app_Document; the metamodel name isDocument(no prefix — the same name used in JPQL). Nothing threw.LoggedEntityrows werecreated, the screen showed them, and no entity was ever logged. There is no validation
because "unknown entity name" and "this entity is deliberately not logged" look identical.
(b)
EntityLogcaches its configuration at startup. Configuring loggingprogrammatically (in
ApplicationStartedEvent) writes rows the module has already readpast. The log stays empty until the NEXT restart. Fix:
entityLog.invalidateCache()afterwriting the configuration.
Neither is discoverable by any gate: the application starts, the screens open, the tests
pass. The only check that finds it is: perform an action, then query
AUDIT_ENTITY_LOGand assert a row appeared. That belongs injmix-verify-bootrunas theverification step for any feature whose output is a side effect rather than a screen.
Found while building a real Jmix 2.8 application (document registry, Vaadin UI, PostgreSQL, deployed behind nginx).