[Libreoffice-bugs] [Bug 108057] Primary key should default to AutoValue= Yes when type is integer

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Thu Oct 19 14:49:49 UTC 2017


https://bugs.documentfoundation.org/show_bug.cgi?id=108057

--- Comment #3 from Mike Kaganski <mikekaganski at hotmail.com> ---
Actually, there is even more important use case for this proposal. Comment 0
deals with a case when user creates the ID manually; the program should guess
the "AutoValue" setting based on user's provided data.

But consider the following scenario:
1. User creates a new table in Design View mode.
2. User *does not* create a key field manually.
3. On "Save", Base detects the absence of a key field, and emits the dialog:
> No primary key
> 
> A unique index or primary key is required for data record
> identification in this database.
> You can only enter data into this table when one of these two
> structural conditions has been met.
> 
> Should a primary key be created now?

Upon selecting "Yes", a new key field named "ID" is created, of type INTEGER.
In this case, the AutoValue isn't set by default, either! But that is clearly
wrong, even if one could see the original use case as something arguable. When
the key field was created automatically by program, then failing setting
AutoValue is absolutely against user's expectations, and just trying to use
resulting table as is, without further adjusting the key field, will result in
error because of key field not set.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20171019/d1c94e8f/attachment.html>


More information about the Libreoffice-bugs mailing list