SEAM 2.1 ANT-FILE - SQL Generation from EntityBeans
---------------------------------------------------
Key: JBSEAM-3675
URL:
https://jira.jboss.org/jira/browse/JBSEAM-3675
Project: Seam
Issue Type: Feature Request
Components: Build
Affects Versions: The future
Environment: SEAM 2.1, JBOSS 4.2.3, JSF, FACELETS, Hibernate, JPA, EJB 3
Reporter: nimo stephan
Integration of an ANT-TASK in SEAMs Ant-File, which produces a DDL-SQL-Script from a set
of given Entity-Beans.
It would be an enhancement and abstraction of the well-known sub-task
"schemaexport":
<!-- SQL Generation-->
<taskdef name="hibernatetool"
classname="org.hibernate.tool.ant.HibernateToolTask"
classpathref="toolslib" />
<target name="schemaexport">
...
<hbm2ddl drop="false" create="false" export="false"
outputfilename="helloworld-ddl.sql" delimiter=";"
format="true"/>
</target>
The abstracted ant-task can be something like:
<task>
<database schema="#{mySQL}" entityBeans="{package.xy}" outputFile
="#{resources.ddl.sql}" relatedLibraries="#{database-drivers}"/>
</task>
with these properties:
schema-attribute: defines the Database, such as DB2, mySQL, SQLServer, etc. (to recognize
the database-syntax, such as delimiter=";" )
entityBeans: defines the package, where all the entityBeans lies (subdirectories should
also be included)
outputFile: defines the place, where the generated SQL script should be stored
relatedLibraries: defines place of libraries needed for the generation (database-drivers,
...)
It would be really nice, to integrate such a task.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira