Re: oracle constraint problem, sequences for generating unique IDs
Tanmoy <[email protected]> Tue, 31 Mar 2009 10:54:04 -0700
| Newsgroups | gmane.comp.web.webobjects.admin |
|---|---|
| Message-ID | <[email protected]> |
Hi Vicky, WO provides a very simple way to implement this. Just create a sequence with the name <TABLENAME>_SEQ. And then you dont have to worry about anything. WO will take care of incrementing this sequence every-time you insert a record automatically. You don't have to incorporate this column during your insert. (Setting the EOs for insert) E.g. your table name : emp_sal . Sequence name will be emp_sal_seq. Thanks, Tanmoy On 31-Mar-09, at 7:11 AM, Vicky C. Miller wrote: > >> Hello: >> >> >> >> We are attempting to overcome an oracle constraint problem, >> specifically: >> >> >> >> Caused by: java.sql.BatchUpdateException: ORA-00001: unique >> constraint >> (..SYS_C001711) violated >> >> >> >> We've resolved the error with a short term solution but we are >> trying to get >> away from sequences for generating unique IDs since it is expensive >> on the >> performance side. Has anyone implemented WO such that the >> capability to >> cache sequence numbers is functional and it is NOT necessary to >> cache and >> query for the next sequence number before making an update to Oracle? >> >> >> Thanks in advance. >> >> >> >> _______________________________________________ >> WebObjects-admin mailing list >> [email protected] >> http://www.omnigroup.com/mailman/listinfo/webobjects-admin >> >