generateChangeLog problem

Hello i have a problem using liquibase. I�m using it to use a hibernate files within liquibase as tool. i have a database that was created by a changelogfile automatically generated from some hibernate mappings files with generatechangelog funcionality.
There are some tables that are created and some foreign key,for example :

Then i run the changelog and all is created ok. All tables and foreign keys are created. For some reasons i have to add more hbm files to my database (some files without foereigns keys). I tried to diffchangelog between my new hbms files and my database. All hbm files are the same in both versions the difference is that some hbm files without foreign keys were added (only new tables).

When i do it i obtain a changelog in which besides the changests appear some dropindex changes and new add foreign keys like this:

     
       
   
   .
   .
    .
   
       
   

If i execute it i obtain an error due to foreign key is created. I execute this a simple use of diffdatabasechangelog. what i�m doing wrong?  I review all many times, the foreign keys are created, only the table creation would appear.
I execute this:

<diffDatabaseToChangeLog
driver="${database.driver}"
url="${url}"
username="${username}"
password="${password}"
baseUrl=“hibernate:ddl/hibernate.cfg.xml”
outputFile="${basedir}/ddl2/lb/updateBH.changelog.xml"
classpathref="classpath.liquibase >

Thanks you are doing a great work

What database are you using to compare against? 

The trouble comes down to the fact that the metadata returned by different databases is often times incomplete or misleading and so diffs are difficult.  We are continuing to improve the diff tool, but it will always be a bit off and so you should use what it generates more as a guide, and less of an automatic tool.  Even if it was a perfect comparison, you would want to review and modify the generated changelog against what you expect it to be to handle situations like “a drop column and an add column should actually be a rename column”

Nathan

I�m using mysql 5.0.67 and liquibase 1.9.3. The mysql driver is mysql-connector-java-5.0.6-bin.jar.
I tried other way, i generated hbm files from the database (with middlegen) and i diffchangelog the hbm from database against my new version hbm. The only change in the new version is that a hbm is added (only a table without relations). And there is a problem again. Besides create table change also there are more changes.
I think it would be better make the comparison against the database but i need solutions.
Thanks