hbm2java

Class inheritance with Hibernate and hbm2java

I am generating my domain objects from my hbm files with hbm2java and now I want them to all inherit a base class. This class will have some utility methods for dealing with listeners. It does not really need to be persisted and I am hoping that I would not have to do a hbm file for it since it will be abstract and only have methods. Is ...

hibernate hbm2hbmxml

I am trying to use ant hibernatetool task to generate hbm.xml files from my db schema in mysql. ant task runs without errors but no hbm.xml files are generated. What am I missing... Here are the relevant coonfigurations: build.xml <taskdef name="hibernatetool" classname="org.hibernate.tool.ant.HibernateToolTask" classpathref="...

Maven Java Source Code Generation for Hibernate

Hi, I´m busy converting an existing project from an Ant build to one using Maven. Part of this build includes using the hibernate hbm2java tool to convert a collection of .hbm.xml files into Java. Here's a snippet of the Ant script used to do this: <target name="dbcodegen" depends="cleangen" description="Generate Java source from ...

How to add hbm2java task to Ant in Neatbeans

I'm trying to generate POJO's from mapping xml files. I read something about adding an ant task, to do it easily. I've added this xml below to my project's build-impl.xml in Netbeans, but nothing happens: <target name="codegen"> <echo>Zippzip</echo> <taskdef name="hbm2java" classname="net.sf.hibernate.tool.hbm2jav...

How to generate comments in hbm2java created POJO?

My current setup using hibernate uses the hibernate.reveng.xml file to generate the various hbm.xml files. Which are then turned into POJOs using hbm2java. We spent some time while designing our schema, to place some pretty decent descriptions on the Tables and there columns. I am able to pull these descriptions into the hbm.xml files wh...

POJO from HBM file

HI All, I am new to hibernate and I would to create POJO from xxx.hbm.xml file. Is it possible? Please respond Regards, Vikram A. Deshpande ...

How to configure hbm2java and hbm2dao to add packagename to generated classes

Hi, I'm trying to configure hbm2java with maven to generate POJO classes and DAO objects. One of the issues I'm dealing with is package names aren't generated. I'm using the following pom for that: <execution> <id>hbm2java</id> <phase>generate-sources</phase> <goals> <goal>hbm2java</goal> </goals> <inherited...

Maven doesn't compile target/hibernate3/generated-sources

Can someone tell me how to configure maven for it also to compile sources from the target/hibernate3/generated-sources directory? I have already read this and other posts but they don't seem to solve my problem (which indeed seems trivial). I have used the bottom-up approach hibernate configuration for cfg.xml, hbm.xml and POJO generati...

How do I configure the hbm2java maven2 plugin to generate POJOs for all mapping files

Hi. I am trying to migrate my ant build to maven2. in my build.xml I invoke the hbm2java in the following way: <hibernatetool destdir="/src/generated/"> <configuration configurationfile="${env.ITP_HOME}/core/xml/hibernate/hibernate.cfg.xml"> <fileset dir="/xml/hibernate"> <include name="*.hbm.xml"/> ...