Uploaded image for project: 'Tools (JBoss Tools)'
  1. Tools (JBoss Tools)
  2. JBIDE-9365

JPA: @ManyToMany annotation is not supported with Hibernate platform

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Blocker Blocker
    • 3.3.0.M3
    • 3.3.0.M2
    • hibernate
    • None

      Test Case:
      1. Create JPA project with Hibernate Platform
      2. Create 2 Entities with @ManyToMany mapping
      3. Open Jpa Details view:
      Failed: It should not be empty
      4. create additional fieldin Entity without annotations
      5. In Jpa Details view click on "here" link.
      6. select ManyToMapping
      7. Observe exception:

      Caused by: java.lang.IllegalArgumentException: invalid mapping key: manyToMany
      at org.eclipse.jpt.jpa.core.internal.context.java.AbstractJavaPersistentAttribute.getSpecifiedMappingDefinition(AbstractJavaPersistentAttribute.java:325)
      at org.eclipse.jpt.jpa.core.internal.context.java.AbstractJavaPersistentAttribute.setMappingKey_(AbstractJavaPersistentAttribute.java:216)
      at org.eclipse.jpt.jpa.core.internal.context.java.AbstractJavaPersistentAttribute.setMappingKey(AbstractJavaPersistentAttribute.java:195)
      at org.eclipse.jpt.jpa.core.internal.context.java.AbstractJavaPersistentAttribute.setMappingKey(AbstractJavaPersistentAttribute.java:1)
      at org.eclipse.jpt.jpa.ui.internal.details.PersistentAttributeMapAsComposite$1.morphMapping(PersistentAttributeMapAsComposite.java:82)

            dgeraskov Dmitry Geraskov (Inactive)
            dgeraskov Dmitry Geraskov (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: