I have a table with data being inserted from two different applications. One is a legacy application using INSERT QUERIES and the other one uses hibernate to insert the value.
But the hibernate insert (generator="identity") fails first time(index constraint), when we try to insert after the manual insert has run.
But when we try for the second time, the insert is working. Why this is happening?
Is that hibernate caching the next primary key value and then using that value which is conflicting with manual max+1 insert?
Kindly help