[jbosstools-dev] Hbm2DDLExporterTask logic

Vitali Yemialyanchyk vyemialyanchyk at exadel.com
Sat Mar 15 10:29:43 EDT 2008


Max, 

 

I get some question about logic in Hbm2DDLExporterTask  - please look at
code lines:

 

>>> 

                  if(drop && create) {

                        export.create(scriptToConsole, exportToDatabase);

                  } else {

                        export.execute(scriptToConsole, exportToDatabase,
drop, create);

                  }

 

 >>>

But in SchemaExport:

>>> 

    public void create(boolean script, boolean export)

    {

        execute(script, export, false, false);

    }

>>> 

 

Seems something wrong here - it seems should be:

>>> 

                  if(!(drop && create)) {

                        export.create(scriptToConsole, exportToDatabase);

                  } else {

                        export.execute(scriptToConsole, exportToDatabase,
drop, create);

                  }

 

 >>>

Or just

>>> 

                        export.execute(scriptToConsole, exportToDatabase,
drop, create);

>>> 

 

Please comment the code.

 

Best regards,

 

Vitali

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jbosstools-dev/attachments/20080315/797d220f/attachment.html 


More information about the jbosstools-dev mailing list