Issue 118038

Summary: Unable to make primary key stick to table if we refuse its automatic creation in GUI
Product: Base Reporter: lapsap7+ooo
Component: codeAssignee: AOO issues mailing list <issues>
Status: CONFIRMED --- QA Contact:
Severity: Normal    
Priority: P3 CC: frank.schoenheit, issues, r4zoli
Version: OOo 3.3   
Target Milestone: ---   
Hardware: PC   
OS: Windows, all   
Issue Type: DEFECT Latest Confirmation in: ---
Developer Difficulty: ---

Description lapsap7+ooo 2011-05-17 17:38:58 UTC
This bug reflects the discussion in the forum at

In summary, if we refuse OObase's automatic creation of primary key in GUI, we would be in trouble creating the primary key of our own.

Here are the steps, more or less similar to those written by DACM, to reproduce the bug:
1. Create Table in Design View...
2. Add an INTEGER field called ID but don't specify yet AutoValue = Yes
3. Add another field
4. Save the Table.
   When asked "Should a primary key be created now?" > Answer "No" (because we
   intend to make the ID field the PK)
5. Go back to the ID field > right-click > Primary Key
6. Save the Table.
   If we open the table in edit view, we can see that the Primary Key disappears
7. Go back to the ID field, change AutoValue to Yes and change it to Primary Key again
8. Save the Table.
   If we open the table in edit view, we can see that the Primary Key disappears again!

The point is, whether the Integer field is AutoValue or not, PK can't stick.

I've found a workaround for the moment:
a. Edit the table and specify the ID field as PK
b. Save the table and close it. (Don't open it!)
c. Save the database file and close OOBase.
d. Reopen the database file and PK is there!

Step b is important.  If you open the table again before closing the whole application, PK just can't stick.
Comment 1 r4zoli 2011-05-18 06:54:09 UTC
I can confirm it, same happens in OOo 3.3. and in OOo 3.4 beta.
Comment 2 Frank Schönheit 2011-06-09 08:22:35 UTC
(reproduced, too, put into the DBA pool of effectively unassigned issues)
Comment 3 Oliver-Rainer Wittmann 2012-06-13 12:32:34 UTC
getting rid of value "enhancement" for field "severity".
For enhancement the field "issue type" shall be used.