From: Max R. A. <max...@jb...> - 2006-06-20 09:01:15
|
ask this on the tools forum at forum.hibernate.org and i'll answer :) /max > Greetings, > I am in the process of migrating my project code base to Hibernate-3 > and having quite trouble with the way hibernate-tool in Hibernate3 > work's with the CustomUserType's defined. The version of hibernate > being used is 3.1.3 and hibernate-tools is 3.1.0.beta4 > > Working version (old): > In Hibernate2, on invocation of hbm2java the following property in my = = > *.hbm.xml > <property column=3D"LAST_MODIFIED" length=3D"11" name=3D"lastM= odified" > type=3D"com.company.hibernate.usertypes.LastModifiedColumn= Type"> > <meta attribute=3D"use-in-tostring">true</meta> > <meta attribute=3D"default-value">new java.util.Date()</me= ta> > </property> > gets converted to the following > /** nullable persistent field */ > protected Date lastModified =3D new java.util.Date(); > which was correct & all the interfaces with setters and getters were > written accordingly. > e.g: public void setLastModified(java.util.Date dt), > public Date getLastModified(); > > NEW: > In Hibernate-3, on invocation of the new hibernate-tool that wraps > hbm2java, the same snippet from *.hbm.xml results > protected LastModifiedColumnType lastModified =3D new java.util.Date(= ); > and hence all the code base breaks on the compile step coz =3D> > found : com.company.hibernate.usertypes.LastModifiedColumnType > required: java.util.Date > > I have several other custom type's and I am not sure how this can be > fixed so that I can reuse my custom type(s). Is this a hibernate-tool > (hbm2java) bug in 3.1.0.beta-4 or is there a right way to accomplish > the same as in HIbernate-2. > > Thanks for reading! Appreciate if any one can help. > > > _______________________________________________ > hibernate-devel mailing list > hib...@li... > https://lists.sourceforge.net/lists/listinfo/hibernate-devel -- = -- Max Rydahl Andersen callto://max.rydahl.andersen Hibernate ma...@hi... http://hibernate.org JBoss Inc max...@jb... |