-
1. Re: seam generate-entities problem NO @OneToMany or @ManyToMany
max.max.andersen.jboss.com Mar 26, 2008 12:49 PM (in response to manuelgchacon)Sounds like you are either using an too old jdbc driver or you underlying mysql is using ISAM instead of innodb and thus no foreign keys are reported to us via jdbc.
-
2. Re: seam generate-entities problem NO @OneToMany or @ManyToMany
manuelgchacon Mar 26, 2008 3:37 PM (in response to manuelgchacon)Thanks for the well intended tips Max. However my problem turned out to be something a little more devious than that. It turns out that seam-gen uses Middlegen under the hood. Middlegen has issues with table names that are either in uppercase or mixed case.
Due to this
feature
in Middlegen and thus seam-gen, if you want to use MySQL the table names must be all in lower case.You are right regarding the ISAM vs INNODB tables though. The engine behind the tables must be INNODB.
Check out Middlgen's site for more info.
-
3. Re: seam generate-entities problem NO @OneToMany or @ManyToMany
pmuir Mar 28, 2008 7:40 PM (in response to manuelgchacon)
Manuel Chacon wrote on Mar 26, 2008 03:37 PM:
Thanks for the well intended tips Max. However my problem turned out to be something a little more devious than that. It turns out that seam-gen uses Middlegen under the hood. Middlegen has issues with table names that are either in uppercase or mixed case.It never does. I was so surprised by this assertion that I double checked with Max ;-)
Seam-gen uses Hibernate Tools for all the real work (it's really just a set of templates).
-
4. Re: seam generate-entities problem NO @OneToMany or @ManyToMany
pmuir Mar 28, 2008 7:46 PM (in response to manuelgchacon)Oops, my quote was a bit long.
What I meant was:
Seam-gen doesn't use middlegen in anyway at all.
-
5. Re: seam generate-entities problem NO @OneToMany or @ManyToMany
manuelgchacon Mar 29, 2008 12:06 AM (in response to manuelgchacon)I could have sworn I read on a Hibernate site page somewhere that Hibernate Tools used Middlegen. I will take your word for it.
I will say this however, switching the table names to all lower case fixed the problem I was experiencing. With upper or mixed-case table names the relationships were not recognized by seam-gen.
Does the Eclipse Dali project also uses the same code base as seam-gen? I assume so because JBoss is a sponsor of that project. I ask because I saw the exact same behavior with the Dali
Data Source Explorer
. It was not showing the foreign key constraints with mixed case or uppercase table names.All I can say is that the behavior I was experiencing is eerily similar to the problem that Middlegen describes on this page.
http://boss.bekk.no/boss/middlegen/platforms/database.html
BTW -- I think you guys have done a great job with SEAM so far. I think its going to be the
Next Big Thing