Subject Re: [IBO] problem in bindingcursor
Author Jay
> alter table testtable
> add constraint testtable_ref_id foreign key (ref_id)
> references testtable id);

Here you key up your primary not null key with your ref_id field which
could be null.
Besides, above definition looks like a circular reference to me.