lcollong
FabriKant d'applications web
Interesting thread.
I had to write my own script to handle the copy function about 2 years ago for this reason. The Fabrik's method wasn't copying joined records.
I added a basic mechanism to verify the id of the newly created record in the maint table. As it seems the getLastInsert method does not guarantee that the returned id of the newly created main record (copy) has this id in case of someone else create a record exactly on the same time frame. Thus I needed to be sure to not link the joined tables to the wrong id. This site is on production (almost 8000 records created or duplicated since there) and yesterday, for the first time, the message show up indicating something went wrong during the duplicate operation. And indeed, after verification, two records have the same date of creation from two different users.
So my question. Is the Fabrik's copy record method guarantees that the joined tables will always been joined to the right main record in case of simultaneous operation on the tables ?
I had to write my own script to handle the copy function about 2 years ago for this reason. The Fabrik's method wasn't copying joined records.
I added a basic mechanism to verify the id of the newly created record in the maint table. As it seems the getLastInsert method does not guarantee that the returned id of the newly created main record (copy) has this id in case of someone else create a record exactly on the same time frame. Thus I needed to be sure to not link the joined tables to the wrong id. This site is on production (almost 8000 records created or duplicated since there) and yesterday, for the first time, the message show up indicating something went wrong during the duplicate operation. And indeed, after verification, two records have the same date of creation from two different users.
So my question. Is the Fabrik's copy record method guarantees that the joined tables will always been joined to the right main record in case of simultaneous operation on the tables ?