Topic: A problem with the entry reference

If I open a journal entry with reference number 30 and have not finished working on it, and my colleague opens another entry before I finish working on entry number 30, he will take the same reference number 30. When the entry is saved, whoever saves it first saves it without error, and whoever saves it last will receive an error. Is it possible? Every time a record is opened, it takes a different reference

Re: A problem with the entry reference

This is a well known race condition. The corresponding INSERT statement should be modified to make the primary key as NULL so that it is generated at runtime and then last_insert_id() should be used to populate the dependant foreign keys.