[hibernate-issues] [Hibernate-JIRA] Created: (HHH-6544) Auditing not working for @ManyToMany and @OneToMany with Association table

chetan verma (JIRA) noreply at atlassian.com
Thu Aug 4 00:50:04 EDT 2011


Auditing not working for @ManyToMany and @OneToMany with Association table
--------------------------------------------------------------------------

                 Key: HHH-6544
                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-6544
             Project: Hibernate Core
          Issue Type: Bug
          Components: envers
    Affects Versions: 3.6.6
         Environment: MySql 5.5
            Reporter: chetan verma


Below are my entities, table for auditing are created for user,destinies and user.securityGroups relationships, but there is no audit logs for the same with release Hibernate 3.6.6.
But these things are working fine with 3.6.0.

@Entity
@Audited
public class User {

	@Id
	@GeneratedValue
	private int id;
	
	@Column(nullable=false)
	private String name;
		
	@OneToMany(cascade=CascadeType.ALL, orphanRemoval=true)
	private Set<Destiny> destinies;
		
	@ManyToMany
	@JoinTable(joinColumns = @JoinColumn(name = "User_id"), inverseJoinColumns = @JoinColumn(name =   "securityGroups_id"), uniqueConstraints = @UniqueConstraint(columnNames = {
			"User_id", "securityGroups_id" }))	
	private Set<SecurityGroup> securityGroups;
}

@Entity
@Audited
public class Destiny {

	@Id
	@GeneratedValue
	private int id;
	
	@Column(nullable=false)
	private String name;	
}

@Entity
@Audited
public class SecurityGroup {

	@Id
	@GeneratedValue
	private int id;
	
	@Column(nullable=false)
	private String name;
}



--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the hibernate-issues mailing list