Hi,
First let me state that I'm new to DevForce (also to EF) and having difficulties. I've read neary all the documentation (even the subjects I don't need rigth now because of the insight they gave me) and forum topics that I can search and locate. There are few topics about batch operations like saving/processing large number of records and I could not get what I need from these.
Here is my sample senario (nothing is async, it's a simple console app with DevForce 6.0.3.1):
I've got 4 tables all linked like:
T1 -> T2 -> T3 -> T4
Saving records for T1, T2, and T3 can be done in usual way because they contain relatively low number of records but the record number for T4 is usually more than 10.000, and it takes around 3 minutes to save on my notebook.
You can think of T4 as always insert, because whatever changes in other tables all of the records in T4 is affected and it's easier to delete them all and insert instead of > 10.000 update statements (This is of course mostly incorrect except for what I want to do below).
So, can I make DevForce to let me handle saving of all the records in T4 manually (I'm thinking using SP with a json like param input for each 1.000 records and posting this in Service Broker to let to app continue without waiting for SP to parse this json structure - because only single field has importance for a value and all others are keys in T4, thus could be represented fairly short in string format).
I've tried couple of things with EntityServerSaveInterceptor (with ExecuteSave override) but could not make it work. It always fails with an exception like "The changes to the database were committed successfully, but an error occurred while updating the object context. The ObjectContext might be in an inconsistent state. Inner exception message: A referential integrity constraint violation occurred...". The problem seems to be with the store generated identity field value and tried some actions for this but still does not work.
I've uploaded a sample project to the file area:
http://www.ideablade.com/forum/uploads/835/DFBatchTest.zipI'll appreciate any help,
Thanks in advance,
Sinan