[prev in list] [next in list] [prev in thread] [next in thread]
List: turbine-torque-dev
Subject: [jira] Created: (TORQUE-32) Native id-method columns in hsqldb
From: "Scott Eade (JIRA)" <jira () apache ! org>
Date: 2006-06-20 3:42:29
Message-ID: 5157010.1150774949778.JavaMail.jira () brutus
[Download RAW message or body]
Native id-method columns in hsqldb start with 0
-----------------------------------------------
Key: TORQUE-32
URL: http://issues.apache.org/jira/browse/TORQUE-32
Project: Torque
Type: Bug
Components: Generator
Environment: Any.
Reporter: Scott Eade
Priority: Minor
Using hsqldb with id-method native columns creates columns defined with the \
constraint "IDENTITY". This generated an index starting with 0. As Torque regards \
objects with an primary key 0 as not initialized, this can lead to problems when \
using relationships between tables.
To prevent this I've patched the generated string from "IDENTITY" to "GENERATED BY \
DEFAULT AS IDENTITY (STARTING WITH 0)".
This broke the created SQL for hsqldb tables since Torque preprends the String "NOT \
NULL" in front of the identity string. hsqldb does not allow this.
To change this I've patched the interface org.apache.torque.engine.platform.Platform \
and added a method "public getNullString(Column col)" since the \
PlatformHypersonicImpl needed to know if the column is a not null and if the column \
uses the native id-method. The default implementation of Platform delegates the call \
of this method to the former existing one. Only the hsqldb implementation uses more \
than the property notNull of the column.
The new method is now used getSqlString of class Column.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic