This question is locked. New answers and comments are not allowed.
Hi there
I have the following problem: I inherit the OpenAccessContext to add entries into history tables upon saving changes (slowly changing dimensions, type 4). Everytime a entity gets updated, I write an entry into a corresponding history table. For this I use the method "GetChanges().GetInserts/GetUpdates" of DataAccess.
I.e. if we update the "LastName" property of entity "Person", an entry to "HistPerson" will be written.
This has worked so far very well until I changed the collections on "Person" to IsManaged = true. Since then, I receive "false positives" when calling GetChanges on the context. I.e. if I change a persons "Diploma", also the parent "Person" (Diploma.Person) is marked as dirty (altough there are absolutely no changes - only the Diplomas-collection has an additional entry...).
I don't know if this is by design or a bug. If it's by design, I need a way to filter out the unchanged parents.
My ERD:
Person 1 <-> * Diplomas
Person 1 <-> * Licences
Licence 1 <-> * Addresses
Licence 1 <-> * Restrictions
Do you have any suggestions how to solve/workaround this problem? Are there possibilities to get the changes on a "per field" base (so then I can filter out the TrackedLists myself)?
Greetings,
Florian
I have the following problem: I inherit the OpenAccessContext to add entries into history tables upon saving changes (slowly changing dimensions, type 4). Everytime a entity gets updated, I write an entry into a corresponding history table. For this I use the method "GetChanges().GetInserts/GetUpdates" of DataAccess.
I.e. if we update the "LastName" property of entity "Person", an entry to "HistPerson" will be written.
This has worked so far very well until I changed the collections on "Person" to IsManaged = true. Since then, I receive "false positives" when calling GetChanges on the context. I.e. if I change a persons "Diploma", also the parent "Person" (Diploma.Person) is marked as dirty (altough there are absolutely no changes - only the Diplomas-collection has an additional entry...).
I don't know if this is by design or a bug. If it's by design, I need a way to filter out the unchanged parents.
My ERD:
Person 1 <-> * Diplomas
Person 1 <-> * Licences
Licence 1 <-> * Addresses
Licence 1 <-> * Restrictions
Do you have any suggestions how to solve/workaround this problem? Are there possibilities to get the changes on a "per field" base (so then I can filter out the TrackedLists myself)?
Greetings,
Florian