This is an automated email from the ASF dual-hosted git repository. borinquenkid pushed a commit to branch 9.0.x-h7-improvement-phase3 in repository https://gitbox.apache.org/repos/asf/grails-core.git
commit 22d431010ea77ee989580371fbff8cd3072e8a3c Author: Walter Duque de Estrada <[email protected]> AuthorDate: Fri Oct 9 18:55:11 2026 -0500 test(hibernate7): state the Envers audit columns and revision rows native binding gives, as measured The literals that 955a1dfe64 wrote into GeneratedModeEnversSpec when it dropped the classic half of the spec were not captured from a run: that commit's verification never executed the spec, and the full module run of the deletion step failed three of its features. The values were therefore measured at eb82a95c44, the step 2 tip, in a throwaway worktree, native default and classic binding both, and are identical to HEAD's: - envers_book_aud: [class, genre, id, pages, rev, revtype, title, version] natively (classic had secret in addition, the @NotAudited field Envers read through the getter); class and genre are the discriminator and the subclass column of the single-table hierarchy EnversNovel extends EnversBook, which shares the audit table - the version written at the revisions of EnversVersioned and EnversCustomVersion: [[0, 0], [1, 1], [1, 2], [2, null]], null at the DEL revision because Envers stores no property data there unless store_data_at_delete is set, in both bindings - the columns of the other audit tables: [id, name, rev, revtype, version], [id, name, rev, revtype] and [id, lock_no, name, rev, revtype], the same in both bindings So the deletion of the classic binder changed no Envers behaviour; the spec now states the measured values. The dbmigration module passes (109 tests, 93 CLI tests). Co-Authored-By: Claude Fable 5.1 <[email protected]> --- .../databasemigration/generated/GeneratedModeEnversSpec.groovy | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/grails-data-hibernate7/dbmigration/src/test/groovy/org/grails/plugins/databasemigration/generated/GeneratedModeEnversSpec.groovy b/grails-data-hibernate7/dbmigration/src/test/groovy/org/grails/plugins/databasemigration/generated/GeneratedModeEnversSpec.groovy index bebbc6c6ab..5c3500ca3c 100644 --- a/grails-data-hibernate7/dbmigration/src/test/groovy/org/grails/plugins/databasemigration/generated/GeneratedModeEnversSpec.groovy +++ b/grails-data-hibernate7/dbmigration/src/test/groovy/org/grails/plugins/databasemigration/generated/GeneratedModeEnversSpec.groovy @@ -130,7 +130,7 @@ class GeneratedModeEnversSpec extends Specification { ['hibernate.additionalProperties': ['org.hibernate.envers.do_not_audit_optimistic_locking_field': 'false']])) then: 'the annotation is on the field Envers reads (the classic binding of Grails 8 audited the property, since Envers read the getter), and the version is audited as it was then' - generated['envers_book_aud'] == ['id', 'pages', 'rev', 'revtype', 'title', 'version'] + generated['envers_book_aud'] == ['class', 'genre', 'id', 'pages', 'rev', 'revtype', 'title', 'version'] and: 'Envers\' own setting, which a user can still set, gives the same' generatedWithVersion['envers_book_aud'].contains('version') @@ -188,14 +188,14 @@ class GeneratedModeEnversSpec extends Specification { then: 'the audit table has the columns of the entity, the revision and the revision type' generated.columns*.getAt(0) == columns - and: 'the version written at each revision is the one of the row then' + and: 'the version written at each revision is the one of the row then, and null at the deletion (Envers stores no data at a DEL revision by default), as with classic binding' generated.rows == rows where: type | table | versionColumn | columns | rows - EnversVersioned | 'envers_versioned_aud' | 'version' | ['id', 'name', 'rev', 'revtype', 'version'] | [[0, 0], [1, 1], [1, 2], [2, 2]] + EnversVersioned | 'envers_versioned_aud' | 'version' | ['id', 'name', 'rev', 'revtype', 'version'] | [[0, 0], [1, 1], [1, 2], [2, null]] EnversUnversioned | 'envers_unversioned_aud' | null | ['id', 'name', 'rev', 'revtype'] | null - EnversCustomVersion | 'envers_custom_version_aud' | 'lock_no' | ['id', 'lock_no', 'name', 'rev', 'revtype'] | [[0, 0], [1, 1], [1, 2], [2, 2]] + EnversCustomVersion | 'envers_custom_version_aud' | 'lock_no' | ['id', 'lock_no', 'name', 'rev', 'revtype'] | [[0, 0], [1, 1], [1, 2], [2, null]] } private static Map shelfHistory() {
