-
Type: New Feature
-
Resolution: Duplicate
-
Priority: Minor - P4
-
None
-
Affects Version/s: 1.4.2
-
Component/s: Feature Request
-
None
Since structure of the document might be changed (i.e. field name, single value property might become a collection), it would be nice to save backward compatibility with old records while supporting new ones. One of the way to achieve this is to add custom attributes that will map new property to the old one(s).
Example:
old version of the class: employee.Task
new version of the class: employee.Tasks
As a result "var query =
employees.AsQueryable<C>()
.Where(e => e.Tasks.Contains(someTask));" should be able to make search through old records searching Task field and new records searching Tasks field.
- is duplicated by
-
CSHARP-622 Add [MongoOldName("OldName")] attribute & updates to Linq provider
- Closed