« Return to Thread: getting ddl output to the console

Re: getting ddl output to the console

by Jon Gunnip :: Rate this Message:

Reply to Author | View in Thread

Burt,

Could you give a little more detail on how you call SchemaExport to
get the debug to output the DDL?  Where/how are you calling
SchemaExport within the loaded Grails app?

By the way, I've added jira issues for "generate-ddl"
(http://jira.codehaus.org/browse/GRAILS-2760) and "generate-hbm-xml"
(http://jira.codehaus.org/browse/GRAILS-2761) commands.

Thanks,
Jon

On Mon, Feb 11, 2008 at 10:04 PM, Burt Beckwith <burt@...> wrote:

> I've been struggling with this myself - there should be a simple way to use
>  the Hibernate-generated DDL as an initial script that a DBA can customize for
>  production. In regular Spring/Hibernate apps I use the Ant tasks (which wrap
>  SchemaExport) but am having trouble figuring out how to build the
>  Configuration using .groovy files as domain classes.
>
>  SchemaExport does call "log.debug(formatted);" though so as a temporary
>  measure I configured debug logging in Config.groovy for
>  category 'org.hibernate.tool.hbm2dll' and I capture the DDL from the log4j
>  output.
>
>  Burt
>
>
>
>  On Monday 11 February 2008 10:52:27 pm Justin Edelson wrote:
>  > For "regulatory" reasons, I can't have Hibernate/GORM create tables, etc.
>  > directly on the database. Is it possible to get these statements output to
>  > the console (or a file). I'm aware of how this is done with Hibernate, but
>  > is it possible with GORM?
>  >
>  > Thanks,
>  > Justin
>
>
>
>  ---------------------------------------------------------------------
>  To unsubscribe from this list, please visit:
>
>     http://xircles.codehaus.org/manage_email
>
>
>

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


 « Return to Thread: getting ddl output to the console