Bug 49144 - EDITING: LibreOffice Base does not autocomplete automatic value marked fields
Summary: EDITING: LibreOffice Base does not autocomplete automatic value marked fields
Status: RESOLVED INVALID
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Base (show other bugs)
Version:
(earliest affected)
3.4.4 release
Hardware: x86 (IA32) Windows (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-04-25 07:56 UTC by fioddor
Modified: 2012-10-09 07:07 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Snapshots of the error generating process (32.87 KB, image/png)
2012-04-25 07:56 UTC, fioddor
Details

Note You need to log in before you can comment on or make changes to this bug.
Description fioddor 2012-04-25 07:56:12 UTC
Created attachment 60574 [details]
Snapshots of the error generating process

Sw:
- LibreOffice 3.4.4 Portable (from portableapps.com)
- WinXP 2002 SP3


1.- I mark a field in a table definition as "Automatic Value".
2.- I edit the table entering a new record and leaving the marked field blank.

I expect LO Base to generate the next value for the field defined as "Automatic Value" and create a record with it.


Sympthom: LO Base shows an error dialog:

"
Error inserting a new data record.

Attempt to insert null into a non-nullable column: ID
table: MO_Sitios in statement [INSERT INTO "MO_Sitios" ("URL") VALUES [?]]
"
Comment 1 Robert Großkopf 2012-07-07 12:23:56 UTC
When looking in the tabele there is no auto-value. Could you reproduce this for more times and other versions?

Robert
Comment 2 Jochen 2012-08-27 18:15:24 UTC
@reporter,

exits the problem still in LO 3.6.0 (or 3.6.1 RC2)?
Comment 3 Alex Thurgood 2012-10-05 10:06:57 UTC
Did you change your field definition after having already put data in the table, some of which are NULLed ? If so, then the error message is the logical (at least for Base) response to that.
Comment 4 Alex Thurgood 2012-10-05 10:13:38 UTC
You don't tell us how the database file was created in the first place, i.e. how it was defined, whether or not it held data in it already, or whether the definition of your autovalue field is something of an afterthought that you implemented after initial creation of the table.

Also note that 3.4.x was not the best branch in terms of Base behaviour, many bugs appeared in that branch and only some were resolved in 3.5.x.

Please try a more recent, production version of LO.


Alex
Comment 5 fioddor 2012-10-08 13:12:24 UTC
I've checked again:

1.- Creating a new table from scratch the problem doesn't appear again.

2.- The original table is empty and has the autovalue setting set to "No".
    I change it to "Yes" and close the table definition window.
    Then I open the table and try to enter a record filling the "URL" field.
    The "ID" field shows an "<AutoField>" tag.
    Leaving the record to enter a second record, LibreOffice says:

Error inserting the new record:

Integrity constraint violation - no parent SYS_FK_74 table: MO_URLs in statement [INSERT INTO "MO_Sitos" ( "URL") VALUES ( ?)]


Clicking on the "more..." button an error list with 2 items is shown.
The first says: "Error inserting the new record:"
The second says: "
SQL Status: 23000
Error code: -177

Integrity constraint violation - no parent SYS_FK_74 table: MO_URLs in statement [INSERT INTO "MO_Sitos" ( "URL") VALUES ( ?)]
"

Hope this helps.
Comment 6 fioddor 2012-10-08 13:14:32 UTC
(In reply to comment #3)
> Did you change your field definition after having already put data in the
> table, some of which are NULLed ? If so, then the error message is the
> logical (at least for Base) response to that.

I can't remember right now if it happened that way, but if it did, such records were already deleted and are not here as I reproduce the error again. The table is shown empty.
Comment 7 Robert Großkopf 2012-10-08 17:26:17 UTC
I can't confirm the described behavior under OpenSUSE Linux 32bit rpm - LO 3.3.4 and LO 3.4.4 tested.
Created a table with primarykey without autovalue, punt some content in this table, then closed the database, opened again. Deleted the content of the table. Editing the properties of the primarykey to autovalue. Could write content in other fields. The rows were saved. The primarykey was automatic set in the right way.
Could you please attach a database, which shows the behavior you reported?
Comment 8 fioddor 2012-10-09 07:07:40 UTC
I found what seems to be the root of the problem: a foreign key constrain.
Under such circumstance the behaviour is perfectly correct.
The error message could be improved though. :-m
Thank everybody for your efforts. Sorry for anoying you without a good reason :(