Bug 59464 - EDITING: TABLE FIELD PROPERTY AUTOVALUE CAN NOT BE SET IN SPLIT DATABASE
Summary: EDITING: TABLE FIELD PROPERTY AUTOVALUE CAN NOT BE SET IN SPLIT DATABASE
Status: RESOLVED DUPLICATE of bug 45947
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Base (show other bugs)
Version:
(earliest affected)
3.6.4.3 release
Hardware: Other Windows (All)
: medium major
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-01-16 13:09 UTC by guifan
Modified: 2013-01-19 10:02 UTC (History)
0 users

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description guifan 2013-01-16 13:09:19 UTC
In a database with tables stored separately in accordance with advice at http://wiki.openoffice.org/wiki/FAQ_%28Base%29#HSQLDB it is impossible to design a table with an Integer/AutoValue field using the Table Wizard or Design View.

Editing table field parameters in such split databases is a known problem but there are workarounds involving complex copying and pasting as described at http://forum.openoffice.org/en/forum/viewtopic.php?f=13&t=54254 but this method does not allow an Integer field to be set to AutoValue.

The problem of editing table field properties is a significaant issue for many users and I would like this to be looked at but the inability to set up an AutoValue field is much more serious.  It is a basic requirement to be able to set up an Integer/AutoValue field as a Master Key field in a table so this is a serious defficiency and I hope it can be addressed as soon as possible.
Comment 1 Robert Großkopf 2013-01-19 10:02:32 UTC
It's an old problem since the beginning of LO. I have reported this at
https://bugs.freedesktop.org/show_bug.cgi?id=45947
The SQL-Code, which is produced by LO, is wrong, when you set the right code to
Edit → Database → Advanced Settings → Generated Values
The auto-increment statement must be
 GENERATED BY DEFAULT AS IDENTITY(START WITH 0) 
but LO will produce "NOT NULL GENERATED BY DEFAULT AS IDENTITY(START WITH 0)" and fails.
You could only add a automatic generated field by changing the table you have created without increment value:
Tools → SQL:
ALTER TABLE "table" ALTER COLUMN "ID" INT GENERATED BY DEFAULT AS
IDENTITY(START WITH 0)
I set this report as duplicate of the elder report.

*** This bug has been marked as a duplicate of bug 45947 ***