[jboss-user] [JBoss Tools (users)] - Re: How to generate annotated Java classes from hbm.xml file

baz do-not-reply at jboss.com
Sun Feb 10 05:05:17 EST 2008


Finally i found it.
This mapping causes the exception:
<?xml version="1.0" encoding="UTF-8"?>
  | <!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
  | 
  | <hibernate-mapping package="demo"> 
  |   <class name="Sample2Well" table="sample2well" optimistic-lock="none"> 
  |     <id name="id" type="long" unsaved-value="null" column="SAMPLE2WELLID">
  |       <generator class="native"/>
  |     </id>
  |     <property name="analysisIndex" type="integer" column="analysisindex"/>
  |     <bag name="sampleWell" lazy="false" table="samplewell" cascade="save-update"> 
  |       <key foreign-key="sampleWell_id" column="SAMPLE2WELLID"/>
  |       <composite-element class="demo.SampleWellType"> 
  |         <many-to-one name="sample" entity-name="demo.Sample" foreign-key="Sample_id" not-null="false" column="SAMPLEID" cascade="none"/>
  |         <nested-composite-element name="well" class="demo.Well"> 
  |           <property name="adress" type="string" column="well_adress"/>
  |           <property name="column" type="short" column="well_column"/>
  |           <property name="row" type="character" column="well_row" length="1"/>
  |         </nested-composite-element>
  |       </composite-element>
  |     </bag>
  |   </class>
  | </hibernate-mapping>
  |  <hibernate-mapping package="demo"> 
  |   <class name="Sample" table="sample" optimistic-lock="none"> 
  |     <meta attribute="class-description" inherit="false">@hibernate.class table="sample"</meta>
  |     <id name="id" type="long" unsaved-value="null" column="SAMPLEID">
  |       <generator class="native"/>
  |     </id>
  |     <version name="version" column="version"/>
  |     <property name="sampleCode" type="string" column="sample_code"/>
  |    </class>
  | </hibernate-mapping>
  | 
I have created this second jira issue:
http://jira.jboss.com/jira/browse/JBIDE-1768 

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4128158#4128158

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4128158



More information about the jboss-user mailing list