-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: Issues whith Hibernate envers
PostPosted: Sat Jul 02, 2016 8:32 pm 
Newbie

Joined: Thu Jun 30, 2016 9:30 am
Posts: 4
Hi guys!
I finaly make my code work with hibrnate, but there is always a sad new. Well, this is my code:

Code:
@Audited(withModifiedFlag=true)
@Entity
@SecondaryTable(name = "Person")
public class Person {
// @Audited(targetAuditMode = RelationTargetAuditMode.NOT_AUDITED)
@NotAudited
@ManyToMany(fetch = FetchType.EAGER)
@JoinTable(name = "Person", joinColumns = {
@JoinColumn(name = "parent_id", nullable = false, updatable = false) }, inverseJoinColumns = {
@JoinColumn(name = "child_id", nullable = false, updatable = false) })
protected Set<Person> p;
...
}


When I disable the reverse with @NotAudited, everything work perfectly, but when I try to enable it with @Audited and many parameters, I got an Oracle exception that I cannot insert a Null value in a column of reverse table (This value is not null). I don't understand how it works.
does anyone got the same problem before and know how to resolve it?
Thank you in advance.


Top
 Profile  
 
 Post subject: Re: Issues whith Hibernate envers
PostPosted: Mon Jul 04, 2016 9:22 am 
Newbie

Joined: Thu Jun 30, 2016 9:30 am
Posts: 4
It's okey, I finally resolved it, I deleted @SecondaryTable and it worked.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.