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. 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.
Last year I began using XDoclet for the generation of the mapping
descriptor. Unfortunately it doesn't generate DDL... yet ;-)
Bruce
--
perl -e 'print unpack("u30","<0G)U8V4\@4VYY9&5R\"F9E<G)E=\$\!F<FEI+F-O;0\`\`");'
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev