You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs(site): Document the nine new audits and their exclusions
Adds each new audit's row to audits.adoc's per-family tables
(DuplicateForeignKey/PrimaryKeyType/UniqueIndexNotNull in catalog;
EagerCollectionFetch/MissingVersionAttribute/UnmappedDatabaseObject in
JPA, renaming the "JPA audit" heading to plural; OffsetPagination/
RepeatedStatement/UnusedIndex in runtime, splitting the "token-scan"
heading to plural and fixing usage.adoc's stale plan-based/token-scan
audit lists) and each new DatabaseAuditExcludes builder method to
exclusions.adoc's per-family reference tables, noting that
PrimaryKeyTypeAuditAssertion and UnmappedDatabaseObjectAuditAssertion -
unlike PrimaryKeyPresenceAuditAssertion - do not auto-exclude the
Liquibase bookkeeping tables.
| None. The audit walks Hibernate's entity mappings against the live schema and reports every mismatch (missing table, missing column, incompatible column type) in one run. Run under the default `ddl-auto=none`; do not set `ddl-auto=validate`, whose fail-fast startup check aborts the context on the first mismatch.
75
+
76
+
| `UnmappedDatabaseObjectAudit`
77
+
| `UnmappedDatabaseObjectAuditAssertion`
78
+
| Relations — a table or `table.column` name, optionally schema-qualified (`Set<String>`). The reverse of `SchemaEntityValidationAudit`: proves the schema holds only what is mapped. Exclude migration-tool bookkeeping tables (e.g. `databasechangelog`, `databasechangeloglock`).
79
+
80
+
| `MissingVersionAttributeAudit`
81
+
| `MissingVersionAttributeAuditAssertion`
82
+
| Entities — fully-qualified name, simple name, or physical table name (`Set<String>`)
83
+
84
+
| `EagerCollectionFetchAudit`
85
+
| `EagerCollectionFetchAuditAssertion`
86
+
| Collection roles, e.g. `com.acme.Order.items` (`Set<String>`)
63
87
|===
64
88
65
89
=== JPA audit example
@@ -104,19 +128,34 @@ datasource JDBC URL. See link:usage.html#postgresql-jdbc-requirement[Usage — P
| Exact FK constraint name. Excluding one constraint of a duplicate pair drops that relationship's group below two members, suppressing the finding entirely.
| A `table` or `table.column` name — optionally schema-qualified as `schema.table` / `schema.table.column` — matched case-insensitively. Suppresses a known, acceptable entity/schema mismatch.
111
+
112
+
| `unmappedDatabaseObjectRelations(Set<String>)`
113
+
| `UnmappedDatabaseObjectAuditAssertion`
114
+
| A `table` or `table.column` name — optionally schema-qualified — matched case-insensitively. Suppresses a known, acceptable unmapped relation (e.g. a migration-tool bookkeeping table).
115
+
116
+
| `missingVersionEntities(Set<String>)`
117
+
| `MissingVersionAttributeAuditAssertion`
118
+
| An entity's fully-qualified name, simple name, or physical table name — matched case-insensitively.
119
+
120
+
| `eagerCollectionRoles(Set<String>)`
121
+
| `EagerCollectionFetchAuditAssertion`
122
+
| Exact Hibernate collection role (e.g. `com.acme.Order.items`), matched case-insensitively.
| Case-insensitive match against the normalized statement text.
145
+
146
+
| `offsetPaginationSqlFragments(List<String>)`
147
+
| `OffsetPaginationAuditAssertion`
148
+
| Case-insensitive substring match against the normalized statement text.
149
+
150
+
| `repeatedStatementThreshold(int)`
151
+
| `RepeatedStatementAuditAssertion`
152
+
| The minimum capture count (inclusive, at least 2) for a `SELECT` shape to be reported; defaults to a generous 50 as a regression tripwire rather than a precise N+1 count.
153
+
154
+
| `repeatedStatementSqlFragments(List<String>)`
155
+
| `RepeatedStatementAuditAssertion`
156
+
| Case-insensitive substring match against the normalized statement text.
104
157
|===
105
158
106
159
== Passing exclusions to individual assertion beans
0 commit comments