Skip to content

Envers causes NULL not allowed for column "REV" when auditing simple entity #25068

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
pmihalcin opened this issue Feb 1, 2021 · 1 comment
Closed
Labels
for: external-project For an external project and not something we can fix for: stackoverflow A question that's better suited to stackoverflow.com status: invalid An issue that we don't feel is valid

Comments

@pmihalcin
Copy link

I have web application based on Boot 2.4.2 where I want to audit entity. When I run test which updates existing entity, I'm getting:

Caused by: org.h2.jdbc.JdbcSQLIntegrityConstraintViolationException: NULL not allowed for column "REV"; SQL statement:
insert into revinfo (rev, revtstmp) values (null, ?) [23502-200]

It seems like some misconfiguration of hibernate + hibernate envers.
Could you please double check it?

I prepared minimal sample here: https://github.com/pmihalcin/envers-revinfo

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Feb 1, 2021
@wilkinsona
Copy link
Member

Spring Boot doesn't do anything with Hibernate Envers or Spring Data Envers. We have an open pull request to add support for auto-configuring it. In the meantime you will have to set things up yourself. Looking at your sample, you don't appear to be using Spring Data Envers and I didn't notice any configuration code. If you'd like some guidance on setting things up, please ask on Stack Overflow or on Gitter in the spring-data channel. You may also want to add your up-vote to this issue to improve the reference documentation.

@wilkinsona wilkinsona added for: external-project For an external project and not something we can fix for: stackoverflow A question that's better suited to stackoverflow.com status: invalid An issue that we don't feel is valid and removed status: waiting-for-triage An issue we've not yet triaged labels Feb 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
for: external-project For an external project and not something we can fix for: stackoverflow A question that's better suited to stackoverflow.com status: invalid An issue that we don't feel is valid
Projects
None yet
Development

No branches or pull requests

3 participants