6 Replies Latest reply on Nov 8, 2010 3:00 PM by Michael Haefele

    User type in EmbeddedId

    Slawek Garwol Newbie

      I'm working with legacy DB and in one of tables I have composite id with two properties. One property is string and second (problematic one) is enum.


      I have my own UserType for this enum (which extends ImmutableType). This type is wrapped via CustomType by hibernate (which is not immutable), so I get an exception:


      Caused by: org.hibernate.MappingException: Type not supported: org.hibernate.type.CustomType
          at org.hibernate.envers.configuration.metadata.IdMetadataGenerator.addIdProperties(IdMetadataGenerator.java:71)
          at org.hibernate.envers.configuration.metadata.IdMetadataGenerator.addId(IdMetadataGenerator.java:107)
          at org.hibernate.envers.configuration.metadata.AuditMetadataGenerator.generateFirstPass(AuditMetadataGenerator.java:380)
          at org.hibernate.envers.configuration.EntitiesConfigurator.configure(EntitiesConfigurator.java:102)
          at org.hibernate.envers.configuration.AuditConfiguration.<init>(AuditConfiguration.java:86)


      Is it possible to provide support for Immutable User Types in Envers?