Just getting started with Valentina, and I'm thinking about how to implement binary links among tables in an application, and I don't quite get how to do it safely using the SQL interface, if the database is in simultaneous use by multiple users. The examples I see tend to follow these steps:
1) Insert something into master table
2) Select Last_Rec_ID_Of_Table to get recid of record inserted in step 1.
3) Link record to reference tables using Link Record.
My concern is when another connection is also inserting into the database between my step 1 and 2, then Last_Rec_ID will actually return the recid of the record inserted by the other user, right? Or is Last_Rec_ID in someway isolated per connection / etc?
Perhaps wrapping the entire sequence of steps 1-3 inside a transaction the proper way to guarantee the desired behavior, which then makes me wonder if Valentina supports nested transactions... That would certainly reduce the complexity of my application logic.
Thanks in advance for any pointers.