Bruce Snyder a �crit :
> 
> This one time, at band camp, Mickael Guessant said:
> 
> MG>But the DDL has to be specific, because of the different syntaxes of
> MG>RDBMS (data types supported, statement separation, ...). What's nice
> MG>with castor doclet is that the javadoc tags are indeed database
> MG>independent. When you want to switch database, just change your ant
> MG>task (-DDB_TYPE=db2 or oracle or sql92...) and maybe your castor
> MG>database.xml file (engine part).
> MG>
> MG>About the ant task, I will consider it (maybe you could submit
> MG>a feature request in SourceForge ;-) ), be I am not really sure it's
> MG>needed. To integrate with ant, I use directly the javadoc ant task :
> MG>
> MG><target name="mapping" depends="compile">
> MG>  <javadoc packagenames="test.*"
> MG>       sourcepath="src"
> MG>       private="true"
> MG>       doclet="org.castor.doclet.ddl.DDL"
> MG>       classpath="${classpath}"
> MG>       docletpath="lib/jdom.jar;lib/castor-doclet.jar"
> MG>       additionalparam=" -J-DFILE=ddl/create.sql  -J-DDB_TYPE=db2
> MG>-J-DLOG=1">
> MG>  </javadoc>
> MG>  <javadoc packagenames="test.*"
> MG>       sourcepath="src"
> MG>       private="true"
> MG>       doclet="org.castor.doclet.jdo.JDO"
> MG>       classpath="${classpath}"
> MG>       docletpath="lib/jdom.jar;lib/castor-doclet.jar"
> MG>       additionalparam="-J-DFILE=properties/mapping.xml -J-DLOG=1">
> MG>  </javadoc>
> MG></target>
> MG>
> MG>Just add an sql task and you can compile, generate DDL and mapping,
> MG>create tables and run your tests in just one click ;-)
> 
> Sure, I know that the DDL is specific to each database. I guess I
> didn't fully describe my complaint.
And I didn't fully understood it either ;-)

> I didn't like the fact that I
> had to fully change the doclet tags when switching from one database
> to another, rather an just send an argument.
>
Which one did you have to change ? I just use the same classes,
with the same tags, for Oracle, DB2 and HypersonicSQL. Every
difference is hidden in properties files inside the castor-doclet.jar
file (well, except for the fact that HSQL doesn't support sequences...)
 
> Last year I began using XDoclet for the generation of the mapping
> descriptor. Unfortunately it doesn't generate DDL... yet ;-)
> 
Xdoclet seems nice, but dedicated to EJBs, isn't it ? How does
it handle classes order in the mapping file (with dependent
objects, you have to be very carefull) ?

-- 
Mickael Guessant
Consultant Architecture Distribu�e
Fi System France - http://www.fisystem.com
mailto:[EMAIL PROTECTED]

----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-dev

Reply via email to