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

Hibernate diagram fails on simplest mapping

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Blocker
    • 2.0.0.Beta4
    • 2.0.0.Beta3
    • None
    • None

    Description

      @Entity
      public class Person {
      @Id
      int id;

      public int getId()

      { return id; }

      String name;

      }

      or with hbm.xml:

      <?xml version="1.0"?>
      <!DOCTYPE hibernate-mapping PUBLIC
      "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
      "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
      <hibernate-mapping>

      <class name="Person">
      <id name="id">
      <generator class="assigned"></generator>
      </id>

      <property name="name"></property>
      </class>
      </hibernate-mapping>
      gives:
      ava.lang.ClassCastException: org.hibernate.mapping.Property
      at org.jboss.tools.hibernate.ui.veditor.editors.model.OrmDiagram.createConnections(OrmDiagram.java:321)
      at org.jboss.tools.hibernate.ui.veditor.editors.model.OrmDiagram.getOrCreatePersistentClass(OrmDiagram.java:189)
      at org.jboss.tools.hibernate.ui.veditor.editors.model.OrmDiagram.<init>(OrmDiagram.java:79)
      at org.jboss.tools.hibernate.ui.veditor.editors.VisualEditor.setInput(VisualEditor.java:106)

      p.s. we need to get the code in OrmDiagram cleaned up............everything is done via casts - incredibly unmaintainble and unsafe - need to be after beta1.

      Attachments

        Activity

          People

            mdryakhlenkov Mikle Dryakhlenkov (Inactive)
            manderse@redhat.com Max Andersen
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: