Envers auditing OneToOne inserts null in Aud JoinTable in a not stablished relationship

Description

Envers is trying to insert data in the audit jointable when there's no relation stablished. I have a OneToOne bidirectional relation maped like this:

A.java

B.java

The generated DDL of the JoinTables are:

JoinTable DDL

Aud JoinTable DDL

When creating an A entity and persisting it, the SQL statements are:

Hibernate Output

As you can see Envers is trying to insert an entry on the aud jointable when no relation is stablished (null initialiced) in A instance and schema generated for Envers has a Not Null restriction

Environment

PostgreSQL 8.4

Assignee

Chris Cranford

Reporter

Hugo Espresati

Fix versions

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Components

Affects versions

Priority

Major
Configure