white devles is trying kill me

Posted by durkadurka005 on 11-Mar-2012 11:44

faq u white devles!

All Replies

Posted by durkadurka005 on 11-Mar-2012 18:25

faq u white devles!

Posted by mopfer on 11-Mar-2012 20:47

From the message you got, it sounds like the problem may not be with the "mandatory" property of the database field, rather than timing of when the unique key is assigned.  If the "mandatory" property of the column = TRUE, then you have to supply some value, regardless of whether the column is part of an index.

Posted by durkadurka005 on 12-Mar-2012 12:34

faq u white devles!

Posted by durkadurka005 on 13-Mar-2012 00:50

faq u white devles!

Posted by Admin on 13-Mar-2012 01:28

why do you expect a race condition there? the trigger will fire as part of the transaction, next-value will give you the unique sequence number you were after... unless the sequence get removed, in which case the trigger will fail to assign a new value and then you'll have that unique constraint violation because all records will keep the default value (-1), but as long as the sequence is there it won't be any race condition.

Posted by durkadurka005 on 13-Mar-2012 07:53

faq u white devles!

This thread is closed