Issue 115434 - [cws hsqldb19] Copy table to external hsqldb database Autovalue lost
Summary: [cws hsqldb19] Copy table to external hsqldb database Autovalue lost
Status: CONFIRMED
Alias: None
Product: Base
Classification: Application
Component: code (show other issues)
Version: DEV300m89
Hardware: Unknown Windows 7
: P3 Trivial (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-11-05 16:28 UTC by r4zoli
Modified: 2013-01-29 21:41 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description r4zoli 2010-11-05 16:28:08 UTC
OOo cws hsqldb19 dated 2010.11.04.
Open odb with built in hsqldb.

Create new table with ID integer Autovalue, Text text, add arbitrary value to
text field.

Open odb file connected to external hsqldb server.

Copy from built in, to external file connected odb file, go through copy wizard.

Open table in edit mode in external server connected file, The ID "AutoValue"
changed from Yes to No, and grayed out, you can not to change it.
Comment 1 r4zoli 2010-11-05 16:38:14 UTC
I forget to mention, 
I added hsqldb.jar and sdbc_hsqldb.jar to classpath, and connected to hsqldb
2.0.1.RC2 server.
Comment 2 r4zoli 2010-11-07 09:25:18 UTC
I created new table in server connected odb file, with ID, Integer, AutoValue
set to "Yes".
When I saved the table, the Autovalue settings disregarded. 

I use URL: hsqldb:hsql://127.0.0.1/;default_schema=true

If I use from Tools>SQL.... 
ALTER TABLE "TableName" ALTER COLUMN ID GENERATED ALWAYS AS IDENTITY
I can change the AutoValues to "Yes".

Copy in opposite direction not cause ID Autovalue lost.
Comment 3 r4zoli 2010-11-07 09:36:12 UTC
External server uses memory tables, not cached. 
Comment 4 ocke.janssen 2010-11-23 12:55:19 UTC
The problem here is that the SQL statement doesn't allow to use
"NOT NULL GENERATED BY DEFAULT AS IDENTITY" for Autoincrement fields.

When using the embedded version this string is replace by 
"GENERATED BY DEFAULT AS IDENTITY"

I have to figure out how this could be solved.