[jbosstools-dev] RE: Hbm2DDLExporterTask logic
Vitali Yemialyanchyk
vyemialyanchyk at exadel.com
Mon Mar 17 11:51:49 EDT 2008
Max,
I setup all settings for ant tests and startup ant tests - I understood
logic - according the tests:
> if(drop && create) {
> export.create(scriptToConsole, exportToDatabase);
> } else {
> export.execute(scriptToConsole, exportToDatabase,
drop, create);
> }
Is ok. [drop, create] - is not the same as [boolean justDrop, boolean
justCreate] from export.execute - now it clear.
So I modify JBIDE-1617 patch - now all should be ok here.
Vitali
-----Original Message-----
From: Max Rydahl Andersen [mailto:max.andersen at redhat.com]
Sent: Monday, March 17, 2008 5:31 PM
To: Vitali Yemialyanchyk
Cc: jbosstools-dev at lists.jboss.org; Exadel List
Subject: Re: Hbm2DDLExporterTask logic
Hi Vitali,
The old schemaexport/schemaupdate had some funky logic around its settings
so I can't say if it is a bug without running the code.
So write a test that shows that is does not do what is expected and lets
work from there.
-max
> 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
>
>
More information about the jbosstools-dev
mailing list