org.hibernate.AnnotationException

Cannot mix @javax.persistence.MakKey and @org.hibernate.annotations.MapKey on the same collection: SingleClassTestCase$Parent.children

Solutions on the web147

  • via Hibernate JIRA by Heiko Briebrecher, 1 year ago
    Cannot mix @javax.persistence.MakKey and @org.hibernate.annotations.MapKey on the same collection: SingleClassTestCase$Parent.children
  • via Hibernate JIRA by Heiko Briebrecher, 1 year ago
    Cannot mix @javax.persistence.MakKey and @org.hibernate.annotations.MapKey on the same collection: SingleClassTestCase$Parent.children
  • AttributeConverter and explicit Type cannot be applied to same attribute [com.company.app.domain.Entity.startTime];remove @Type or specify @Convert(disableConversion = true)
  • Stack trace

    • org.hibernate.AnnotationException: Cannot mix @javax.persistence.MakKey and @org.hibernate.annotations.MapKey on the same collection: SingleClassTestCase$Parent.children at org.hibernate.cfg.annotations.CollectionBinder.bind(CollectionBinder.java:258) at org.hibernate.cfg.AnnotationBinder.processElementAnnotations(AnnotationBinder.java:1367) at org.hibernate.cfg.AnnotationBinder.bindClass(AnnotationBinder.java:650) at org.hibernate.cfg.AnnotationConfiguration.processArtifactsOfType(AnnotationConfiguration.java:326) at org.hibernate.cfg.AnnotationConfiguration.secondPassCompile(AnnotationConfiguration.java:238) at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1172)

    Write tip

    You have a different solution? A short tip here would help you and many other users who saw this issue last week.

    Users with the same issue

    Once, 1 month ago
    3 times, 5 months ago
    Unknown user
    Once, 8 months ago
    Unknown user
    2 times, 8 months ago
    2 times, 9 months ago
    43 more bugmates