How to handle master/detail entering of new data with SQLite if both master and detail tables have autoincrement primary keys and primary key of master is foreign key of detail table?
When a new record is entered into master dataset, the primary key is not yet queried from SQLite, thus is not available to slave detail dataset and foreign key violation happens.
If master dataset is refreshed, then the primary key value becomes available, but the master dataset goes to the first record, not to the one that has been edited or inserted, which is annoying and not user-freiendly behavior.
How to solve this?