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

Using @jointable and @joincolumn works Hibernate 3.2.4 but not in JBoss Tools 3.3.0.Beta2

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Won't Do
    • Icon: Minor Minor
    • 3.3.0.CR1
    • 3.3.0.Beta2
    • hibernate
    • None
    • Compatibility/Configuration

      I'm trying to use the HQL editor (by using the Hibernate perspective).
      When I load the editor, I'm getting following error:

      org.hibernate.AnnotationException: Associations marked as mappedBy must not define database mappings like @JoinTable or @JoinColumn: ##my class##
      at org.hibernate.cfg.annotations.CollectionBinder.bind(CollectionBinder.java:476)
      at org.hibernate.cfg.AnnotationBinder.processElementAnnotations(AnnotationBinder.java:1906)
      at org.hibernate.cfg.AnnotationBinder.processIdPropertiesIfNotAlready(AnnotationBinder.java:769)
      at org.hibernate.cfg.AnnotationBinder.bindClass(AnnotationBinder.java:733)
      at org.hibernate.cfg.AnnotationConfiguration.processArtifactsOfType(AnnotationConfiguration.java:636)
      at org.hibernate.cfg.AnnotationConfiguration.secondPassCompile(AnnotationConfiguration.java:359)
      at org.hibernate.cfg.Configuration.buildMappings(Configuration.java:1206)
      at org.hibernate.eclipse.console.workbench.ConsoleConfigurationWorkbenchAdapter$1.execute(ConsoleConfigurationWorkbenchAdapter.java:45)
      at org.hibernate.console.execution.DefaultExecutionContext.execute(DefaultExecutionContext.java:63)
      at org.hibernate.console.ConsoleConfiguration.execute(ConsoleConfiguration.java:107)
      at org.hibernate.eclipse.console.workbench.ConsoleConfigurationWorkbenchAdapter.getChildren(ConsoleConfigurationWorkbenchAdapter.java:41)
      at org.hibernate.eclipse.console.workbench.BasicWorkbenchAdapter.getChildren(BasicWorkbenchAdapter.java:100)
      at org.hibernate.eclipse.console.workbench.BasicWorkbenchAdapter.fetchDeferredChildren(BasicWorkbenchAdapter.java:106)
      at org.eclipse.ui.progress.DeferredTreeContentManager$1.run(DeferredTreeContentManager.java:235)
      at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)

      My annotations on that class are looking like this:

      @OneToMany(mappedBy = "XYZ", cascade = CascadeType.ALL)
      @JoinColumn(name = "XYZ_id", nullable = false)

      So I guess this is not the correct syntax, but it works with Hibernate 3.2.4. But I'm unable to select Hibernate version: 3.2.x .
      Any fix on this one?

            dgeraskov Dmitry Geraskov (Inactive)
            jochus_jira Jochen H (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: