I've just started using Javers on my Application but I have entities annoted with @Transient that I thought Javers would ignore than, but no :(, instead it's throwing me an exception:
JaversException ENTITY_INSTANCE_WITH_NULL_ID: Found Entity instance 'ProductData' with null Id-property 'id'
Do you guy know if there is a way to Ignore those transient fields?
The Documentation says that the @Transient annotation is a synonym for @DiffIgnore. But i dont know if that is related to only comparacion, or during the audit flow as well.
Here is my code:
@Entity
public class ProductExternal extends AbstractEntity implements ExternalEntity {
@Transient
private ProductData productData;
@NotNull
@Column(unique=true)
private Long externalId;
public ProductExternal() { }
//get set
}
--
@Entity
public class ProductData extends AbstractEntity {
private static final long serialVersionUID = 1L;
@Column
@NotNull
private String name;
public ProductData() { }
//get set
}
Parent class
@MappedSuperclass
public abstract class AbstractEntity implements Serializable {
public AbstractEntity() {}
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
protected Long id;
@Version
@Column(columnDefinition = "bigint default '0'")
protected Long version;
//get set
}