[
http://jira.jboss.com/jira/browse/JBSEAM-1518?page=all ]
Dan Allen updated JBSEAM-1518:
------------------------------
Attachment: JBSEAM-1518-build_xml-v2.patch
Excellent!
Actually, I am going to go a step further. Whenever the generate-entities command is used
to reverse engineer an H2 database, the entities include catalog="H2" in the
@Table annotation. This breaks all queries in H2 because the SQL references the tables as
H2.PUBLIC.TABLE_NAME rather than PUBLIC.TABLE_NAME as H2 expects. As it turns out, this
is neither a bug in Seam nor a bug in Hibernate tools. Rather, it is caused by a missing
property definition.
In short, to reverse engineer H2 requires the H2MetaDataDialect class. In Hibernate Tools
beta10, this is auto-detected from hibernate.dialect. However, since seam currently uses
beta9 (or less) this property is required. The second version of the patch includes this
property definition if you are using h2 as the dialect.
For speed readers, that is
hibernatetool.metadatadialect=org.hibernate.cfg.reveng.H2MetaDataDialect
Perhaps the powers that be at JBoss can decide who is going to give in on this issue and
implement auto-detection in the respective tool. Until then, we need to be explicit.
And in case anyone is wondering, yes, I did a shitload of research to figure all of this
out. But, I understand the world better today than I did yesterday, and that makes me
happy. Long live Seam ;)
support for H2 in seam-gen
--------------------------
Key: JBSEAM-1518
URL:
http://jira.jboss.com/jira/browse/JBSEAM-1518
Project: JBoss Seam
Issue Type: Patch
Components: Tools
Affects Versions: 1.3.0.ALPHA
Environment: seam CVS trunk
Reporter: Dan Allen
Priority: Minor
Attachments: JBSEAM-1518-build_xml-v1.patch, JBSEAM-1518-build_xml-v2.patch
Original Estimate: 10 minutes
Remaining Estimate: 10 minutes
Currently, the seam-gen questionnaire does not support H2, even though there is a dialect
for Hibernate that functions with a H2 database. I have discovered that H2 is far more
suitable than HSQLDB and prefer to use it now whenever I am doing prototype development.
Naturally, it is annoying to always have to make my case the exception when supporting H2
is just a matter of filling in the proper blanks in the seam-gen build.xml file. Without
further delay, I did just that.
--
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