[jbosstools-issues] [JBoss JIRA] Commented: (JBIDE-1431) Generate Entities of non Empty Tables creates weird UIs

Max Andersen (JIRA) jira-events at lists.jboss.org
Fri Jan 18 09:26:21 EST 2008


    [ http://jira.jboss.com/jira/browse/JBIDE-1431?page=comments#action_12395643 ] 
            
Max Andersen commented on JBIDE-1431:
-------------------------------------

Ok - so this is a mix of user "error" and hibernate being naive and mysql stupid.

The user "error" is that if you don't check the "Tables already exist in database" in the seam wizard then persistence.xml contains the following line:

<property name="hibernate.hbm2ddl.auto" value="update"/>

Meaning that on every deploy hibernate tries to update the schema including foreign keys with new names (since these are not reverse engineered into the annotations since it would make them very verbose) - hence hibernate naively creates these an expect the database to reject the creation if there are overlaps.

MySql is then stupid in the sense that it allows you to create the same foreignkey multiple times and thus the reverse engineering gets multple associations.

I'll keep the issue around so I remember to add filtering at the reverse engineering level to filter out stupid databases metadata about foreignkeys.

> Generate Entities of non Empty Tables creates weird UIs
> -------------------------------------------------------
>
>                 Key: JBIDE-1431
>                 URL: http://jira.jboss.com/jira/browse/JBIDE-1431
>             Project: Tools (JBoss Tools)
>          Issue Type: Bug
>          Components: Seam
>    Affects Versions: 2.0.0.GA
>            Reporter: Jim Tyrrell
>         Assigned To: Max Andersen
>             Fix For: 2.1
>
>         Attachments: ScreenShotBloggingOdd.png
>
>
> When running reverse engineering of tables that have existing data odd UI components are created as show in the attached screen shot.  Extra tabs are created when trying to create new records.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jbosstools-issues mailing list