From: Andy J. (JIRA) <web...@jp...> - 2007-11-27 21:14:09
|
[ http://www.jpox.org/servlet/jira/browse/RDBMS-18?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_14679 ] Andy Jefferson commented on RDBMS-18: ------------------------------------- Why should it be reopened ? I marked it as fixed since as far as I'm concerned it is with the information provided (a description, no testcase) when I did it. Since you now have a testcase you are responsible for running it against latest code. If you encounter a problem you mention that here, and then and only then will it get reopened. > Use of jdbc-type="CLOB" in Postgresql creates schema but gives error on validate of generated schema > ---------------------------------------------------------------------------------------------------- > > Key: RDBMS-18 > URL: http://www.jpox.org/servlet/jira/browse/RDBMS-18 > Project: RDBMS > Issue Type: Bug > Environment: Linux 2.6.18, PostgreSQL 7.3.1, driver "postgresql.jar", JDK 5, "org.jpox.autoCreateTables" > Reporter: Yang ZHONG > Assigned To: Andy Jefferson > Fix For: 1.2.0-rc-1 > > Attachments: AutomaticSchema.java, package.jdo > > > "org.jpox.validateTables" should accept "org.jpox.autoCreateTables" outputs. > Otherwise, at a very high level, it's either "autoCreateTables"'s bug for generating "incompatible" tables, or "validateTables"'s bug for not accepting compatible tables. > Let me describe the problem, then throw a preliminary idea as 1st effort towards solving the problem. > Like many other column precision validation discussions in the forums, the problem is *not* whether or not to map CLOB to LongVarChar (for PostgreSQL). As a matter of fact, many of us don't really care that much that what's mapped to or the generated column precision or any other trivia. Just like Andy just pointed out, we care much more about jdbc-type, even Java/model type. > The problem has been, w/ "org.jpox.validateTables" default "true", "autoCreateTables" outputs fail the tables validation. > A work-round is, to explicitly disable "org.jpox.validateTables", which however makes "validateTables" practically useless even harmful to user experience if "org.jpox.autoCreateTables". > Considering also supporting the scenario that tables exist already, maybe we can mark automatically created tables w/ their original desire, so that "validateTables" can retrieve that info back in oredr to compare w/ current MetaData. > E.g. given ORM: > <column name="DESCRIPTION_X" jdbc-type="CLOB"/> > It's fine for "autoCreateTables" to generate column LongVarChar (for PostgreSQL) or anything else as long as marked w/ the original desire "CLOB". Therefore during "validateTables", table/column mark "CLOB" can be compared to current ORM ("CLOB"). > As for existed tables *not* created by "autoCreateTables", since no marking, "validateTables" gets only "LongVarChar" back to compare to current ORM ("CLOB"). > Column precision and other info can be marked to automatically created tables the similar way. As for implementation, database annotation, a standalone "marking" table, or anything else, all your discretion. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://www.jpox.org/servlet/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |