Hi,
With reference to the following thread:
http://www.llblgen.com/TinyForum/Messages.aspx?ThreadID=20420
We now have the WPF application which can connect to central database and local database. I planned to do a manual replication of data from central database to local data database. I have set the sequence number in central database starting from 1 million and it will increment by 1. In my local database instance I have set the sequence number starting from 1 to (1 million-1).
I want to insert data created/updated in the server db to local db.Here I want to preserve the PK(generated by Sequence Number through LLBLGen with Oracle) of the all the records in the local database. So what is the best way to get the data from multiple tables(related with each other) from server database to local database.
I have a entity and its related entities fetched using the prefetch path. Could please suggest a way to save the loaded data into the local database with the key values un-changed?
TemplateortpartversionCollection templateOrTpartVersionCollection = new TemplateortpartversionCollection();
IPrefetchPath prefetchPath = new PrefetchPath((int)EntityType.TemplateortpartversionEntity);
prefetchPath.Add(TemplateortpartversionEntity.PrefetchPathAbstractterm);
prefetchPath.Add(TemplateortpartversionEntity.PrefetchPathFormsuser);
prefetchPath.Add(TemplateortpartversionEntity.PrefetchPathKeywordoccurrences);
prefetchPath.Add(TemplateortpartversionEntity.PrefetchPathTemplateortpart);
prefetchPath.Add(TemplateortpartversionEntity.PrefetchPathTemplatepartversion);
prefetchPath.Add(TemplateortpartversionEntity.PrefetchPathTemplateversion);
IPredicateExpression filter = new PredicateExpression();
filter.Add(TemplateortpartversionFields.Tortpartid == documentVersionEntity.Templateid);
filter.AddWithAnd(TemplateortpartversionFields.Tortpartvid == documentVersionEntity.Templatevid);
templateOrTpartVersionCollection.GetMulti(filter, prefetchPath);