My first Wix project is as good as finished, so I am contemplating number 2: a reservation system. Large parts can be done in Wix Code, but I do not know the following: every reservation has to be issued a unique numerical, auto-increment-by-one reservation number. This is a requirement by law.
Yoav allready explained earlier to someone here why auto-increment is not implemented. So I would have to roll it myself. I would have a collection with 1 row, that holds the last res#. To issue a new one, I would have to put a wait_lock on in, read it, increment by 1, write it back and release_lock. This, to garantee that the res# will be unique (in case 2 concurrent user make a res. at exactly the same moment) (and this is probably the same problem as Yoav explained).
Locking cannot be done now, so is there any other way I could guarantee a unique, autoincrement integer at db-level?