Description: Hi all, I can't manage to create a table with an auto increment that is not the primary key with Base. Some databases do not require that the column which is declared as auto increment necessarily be the primary key. Base doesn't know how to do this, or maybe I'm using it wrong... Steps to Reproduce: Try to create a table in Base with a column declared as auto increment and which is not the primary key. Actual Results: I can't do it Expected Results: I can do it Reproducible: Always User Profile Reset: No Additional Info: Maybe this problem has something to do with bug #156513[1], but I can't really understand bug #156513. [1] https://bugs.documentfoundation.org/show_bug.cgi?id=156513
Looking more closely, it seems that the choice that an auto increment is necessarily the primary key is made in this code [1] and [2]. All this is done based on the AutoIncrementIsPrimaryKey option which is true by default [3] Although by putting this option (AutoIncrementIsPrimaryKey) with a false value in my Driver.xcu file I cannot get the functionality which seems correct to me if I look at the code!!! [1] https://github.com/LibreOffice/core/blob/master/dbaccess/source/ui/tabledesign/TEditControl.cxx#L577 [2] https://github.com/LibreOffice/core/blob/master/dbaccess/source/ui/tabledesign/TEditControl.cxx#L1536 [3] https://github.com/LibreOffice/core/blob/master/connectivity/source/commontools/dbmetadata.cxx#L312
Well I think I found it, it comes from a bad configuration of my Drivers.xcu The AutoIncrementIsPrimaryKey option must be under the "MetaData" xml node (lcl_getDriverSetting) and not under the "Properties" xml node (lcl_getConnectionSetting) Ok, I'm closing.