Uploaded image for project: 'JBoss Enterprise Application Platform'
  1. JBoss Enterprise Application Platform
  2. JBEAP-5301

[GSS] (7.1.0) HHH-5393: Repeated Column in mapping when using MapKeyColumn

XMLWordPrintable

      @MapKey is not designed for using Embeddables in maps, so @MapKeyColumn should be used. However when using the following annotation you get a "Repeated Column in Mapping" error:

      @ElementCollection
      @CollectionTable(name = "TRANSACTIONS_EVENTS",
      joinColumns = @JoinColumn(name = "TRANSACTION_ID") )
      @MapKeyColumn(name = "type", insertable=false, updateable=false)
      @MapKeyEnumerated(EnumType.STRING)
      private Map<EventType, TransactionEvent> events = new HashMap<EventType, TransactionEvent>();

      Also see: https://hibernate.atlassian.net/browse/HHH-5393

              gbadner@redhat.com Gail Badner (Inactive)
              rhn-cservice-bbaranow Bartosz Baranowski
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: