-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: ID's getter and setter is not generated.
PostPosted: Tue Jun 07, 2005 9:08 am 
Beginner
Beginner

Joined: Fri Aug 20, 2004 3:45 pm
Posts: 22
Location: Florence - ITALY
I'm using the last version of Hibernate version 3.0.3 and Hibernate-tool 3.0 alpha 1. I'm using this ant task for code generation:

Code:
<target name="gen-classes" description="Creates the code based on the Hibernate mapping docs.">
        <pathconvert refid="hibernate.mapping.files"
                property="hibernate.mappings" pathsep=" "/>
        <java classname="org.hibernate.tool.hbm2java.CodeGenerator" fork="true">
            <classpath refid="project.class.path" />
            <arg line="--output=${build.src}"/>
            <arg line="${hibernate.mappings}"/>
        </java>
    </target>


This is my mapping file:

Code:
<hibernate-mapping>

   <class name="it.dp.magazzino.hibernate.Profilo" table="profilo">
      <meta attribute="generated-class" inherit="false">it.dp.magazzino.hibernate.AbstractProfilo</meta>
      <meta attribute="scope-class">public abstract</meta>

      <id name="id" type="long" unsaved-value="null">
         <generator class="increment" />
      </id>

      <property name="descrizione" type="java.lang.String" column="descrizione" not-null="true" length="255" />

      <set name="utenti" lazy="true" inverse="true" cascade="none">
         <key>
            <column name="id_profilo" />
         </key>
         <one-to-many class="it.dp.magazzino.hibernate.Utente" />
      </set>

   </class>

</hibernate-mapping>


No ID's getter and setter method has been generated.
Where is the problem?

Thank.
Gianni


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jun 08, 2005 8:49 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
you are using a non hibernate 3 code generator (it should not have been included in the dist)

i'm right now uploading the latest release which has the new ant + docs included....so be patient ,)

_________________
Max
Don't forget to rate


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.