You are viewing a plain text version of this content. The canonical link for it is here.
Posted to torque-dev@db.apache.org by Kostyantyn Shchekotykhin <Ko...@ifit.uni-klu.ac.at> on 2004/03/09 09:50:56 UTC
Domain test fails torquegen
Hi All,
can anybody explain me why in domain test, which uses mysql, assert
waits for INTEGER and not for MEDIUMINT. That assertion fails domain
tests. Maybe the following patch can be useful.
Index: DomainTest.java
===================================================================
RCS file:
/home/cvspublic/db-torque/src/generator/src/test/org/apache/torque/engine/database/model/DomainTest.java,v
retrieving revision 1.10
diff -u -r1.10 DomainTest.java
--- DomainTest.java 22 Feb 2004 06:29:38 -0000 1.10
+++ DomainTest.java 9 Mar 2004 08:49:31 -0000
@@ -132,7 +132,7 @@
Table table = db.getTable("native");
Column col = table.getColumn("native_id");
assertEquals("AUTO_INCREMENT", col.getAutoIncrementString());
- assertEquals("native_id INTEGER NOT NULL AUTO_INCREMENT",
col.getSqlString());
+ assertEquals("native_id MEDIUMINT NOT NULL AUTO_INCREMENT",
col.getSqlString());
col = table.getColumn("name");
assertEquals("", col.getAutoIncrementString());
}
@@ -142,7 +142,7 @@
Table table = db.getTable("article");
Column col = table.getColumn("article_id");
assertEquals("", col.getAutoIncrementString());
- assertEquals("article_id INTEGER NOT NULL ", col.getSqlString());
+ assertEquals("article_id MEDUIMINT NOT NULL ", col.getSqlString());
col = table.getColumn("name");
assertEquals("", col.getAutoIncrementString());
}
Regards,
Kostya
---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org
Re: Domain test fails torquegen
Posted by Scott Eade <se...@backstagetech.com.au>.
Kostyantyn Shchekotykhin wrote:
> can anybody explain me why in domain test, which uses mysql, assert
> waits for INTEGER and not for MEDIUMINT. That assertion fails domain
> tests. Maybe the following patch can be useful.
Sometimes explanations are hard to come by.
Your patch looks correct to me and I have applied it.
Thanks,
Scott
--
Scott Eade
Backstage Technologies Pty. Ltd.
http://www.backstagetech.com.au
---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org