Hi,
I am facing a problem when two user are simultaneously trying to insert a record in a table and both of them getting the same id. I am generating the id (
pattern xxx-xxx) in my DAO layer and the way I am doing this is - first I am retrieving the last id created and incrementing it by one to generate a new id and then inserting the records in the database with that new id and calling a commit.
How should I then handle this situation so that no two user end up having the same id.
Thanks