I am using devart dotconnect for Oracle v7.7, and am getting a unexpected error. I am inserting a record into table A, and then another a number of records into table B where B has a foreign key to A, and I'm getting a parent key not found error.
SsinpatDataContext dc = new SsinpatDataContext();
Document doc = new Document();
doc.Text = "bla bla bla";
var id = dc.ExecuteQuery<decimal>("SELECT DOCUMENT_SEQ.NEXTVAL FROM DUAL");
doc.Id = id.ElementAt(0);
dc.Documents.InsertOnSubmit(doc);
DocumentRows dr = new DocumentRows();
dr.Text = "bla bla bla";
dr.DocId = doc.Id;
dc.DocumentRows.InsertOnSubmit(dr);
dc.SubmitChanges();
this throws an exception with the text "ORA-02291: integrity constraint violated-parent key not found" It seems to me that devart is trying to commit the DocumentRows object first, and only then the Document object...
Now, my question here is whether there is a way we can force the commit execution order.
Thanks.