I'm looking at how auto-increment fields work in Firedac, using Delphi xE7, and I've been able to put together an example documentation that syncs two master-details tables with the correct key. The doubt arose when I wanted to mirror my Firebird server in SQLite, because I'm going to distribute an application that needs not only to work offline, but also to persist the data when closing the application.
Then in my remote application I will add records in two tables ( Pedidos
, Itens
) in the master-detail schema, which need to have a foreign key in common. When connecting to the server at the end of the day I want to send
requests and new items, knowing that there may be other users who have also generated SQLite keys that are the same as mine. Using Firedac, how to update them with unreleased keys, without losing the master-detail link?
Remembering that the server is Firebird and locally is SQLite ...