You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note that not all primary keys are autoincrement, so for tables with primary keys that are not autoincrement, there is not way to define a new row, as it is nor possible to assign a value to the primary key field.
The solution is that the functions New_ include parameters for the primary key fields. That implies modifications to dborm.py, which is in python, a surprise as this is Ada generating Ada. In the indicated github path an full Ada solution is included, replacing the python module.
The documentation is also misleading. It is indicated that it is highly recommended to set a primary key on all tables, also recommending using integers for such primary keys for efficiency reasons (i. e. autoincrement). This is not an accurate description: it must say that tables having non-autoincrement primary keys cannot be expanded (using gnatcoll-db) with new rows as the generated Ada code do not include routines to define new rows in these cases.
The text was updated successfully, but these errors were encountered:
Note that not all primary keys are autoincrement, so for tables with primary keys that are not autoincrement, there is not way to define a new row, as it is nor possible to assign a value to the primary key field.
The solution is that the functions New_ include parameters for the primary key fields. That implies modifications to dborm.py, which is in python, a surprise as this is Ada generating Ada. In the indicated github path an full Ada solution is included, replacing the python module.
The documentation is also misleading. It is indicated that it is highly recommended to set a primary key on all tables, also recommending using integers for such primary keys for efficiency reasons (i. e. autoincrement). This is not an accurate description: it must say that tables having non-autoincrement primary keys cannot be expanded (using gnatcoll-db) with new rows as the generated Ada code do not include routines to define new rows in these cases.
The text was updated successfully, but these errors were encountered: