2 Replies Latest reply on May 14, 2008 8:49 AM by maxandersen

    Java to hbm code generation problems

    megus

      Hi,

      This may be a fairly stupid question but since I don't seem to get my head around it I have to ask...

      I'm a long time Exadel user and just moved to Developer Studio so it may be a difference in functionality or lack of it in JBDS, but here goes.

      I have this simple class:

      package testing;
      
      public class Test {
      
       private Integer id;
       private String value;
      
       public Test() { }
      
       public Integer getId() {
       return id;
       }
       public void setId(Integer id) {
       this.id = id;
       }
       public String getValue() {
       return value;
       }
       public void setValue(String value) {
       this.value = value;
       }
      }
      


      I right click on it in the package explorer within the Hibernate View and select New XML Mapping File (hbm.xml) click through the dialog boxes expecting to end up with a Test.hbm.xml file containing a representation of my class with all the properties in it.

      Instead I get this:

      <?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 package="testing">
       <class name="Test">
       </class>
      </hibernate-mapping>
      


      I've tried with the Hibernate Code Generation Tool but simply can not get this in my mind essential feature to work.

      Am I completely missing something here or is my install corrupt in some way perhaps?

      I'm on a Mac, running Mac OS X 10.5.2 with JBDS 1.0 (I also tried the beta 1 of 1.1 but also a no go...)

      Any help appreciated!

      Thanks,

      Mans