org.hibernate.MappingException: Type not supported for auditing:
org.hibernate.type.IdentifierBagType
-----------------------------------------------------------------------------------------------------
                 Key: HHH-3950
                 URL: 
http://opensource.atlassian.com/projects/hibernate/browse/HHH-3950
             Project: Hibernate Core
          Issue Type: Bug
          Components: envers
    Affects Versions: 3.3.0.GA
         Environment: JBoss Envers: jboss-envers-1.2.0.GA-hibernate-3.3 from
org.jboss.envers (not on 3.5 of hibernate core yet)
Hibernate Core: hibernate-core-3.3.0.SP1.jar
JBoss + Seam
            Reporter: David Coleman
         Attachments: TypeIdentifierBagTypeNotSupportedTrace.txt
Hi,
I currenty have a problem with auditing a many-many relation in the entity show below.
Initially I had the exact same problem as
´http://opensource.atlassian.com/projects/hibernate/browse/HHH-3843´' but on reading
the documentation and releazing that the list contains duplicate elements, I add (as
suggested) a @CollectionId annotation to get bag semantics.
Hoewever, the seam application fails to start-up due to the error being thrown from the
envers module: "type not supported for auditing:
org.hibernate.type.IdentifierBagType, on entity com.baratz.absys2.core.model.api.User,
property 'roles'." (stack trace attached)
<snippet>
@Entity
@Audited
@Table(name = "USER_ABSYS")
public class User {
    @UserRoles
    @ManyToMany
    @JoinTable(name = "USER_ROLE", 
                           joinColumns = @JoinColumn(name =
"UUNSEQ",unique=false) ,
                           inverseJoinColumns = @JoinColumn(name =
"ROLE_ID",unique=false))
     @TableGenerator(name = "UserRolesGen", table = "ABSYS_SEQUENCE",
pkColumnName = "ID_NAME", valueColumnName = "NEXT_VAL", pkColumnValue
= "USER_ROLE_ID_GEN", allocationSize=1)
     @CollectionId(
    		columns = @Column(name="USER_ROLE_IDX"),
    		type=@Type(type="long"),
    		generator="UserRolesGen"
    		)
    public List<Role> getRoles() {
        return roles;
    }
...
}
</snippet>
Regards,
Dave
-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see: 
http://www.atlassian.com/software/jira