[CSHARP-487] Add multiple fields search support for LINQ provider Created: 05/Jun/12 Updated: 20/Mar/14 Resolved: 13/Mar/13 |
|
| Status: | Closed |
| Project: | C# Driver |
| Component/s: | Feature Request |
| Affects Version/s: | 1.4.2 |
| Fix Version/s: | None |
| Type: | New Feature | Priority: | Minor - P4 |
| Reporter: | Roman Sydorenko | Assignee: | Unassigned |
| Resolution: | Duplicate | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Description |
|
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). old version of the class: employee.Task As a result "var query = |
| Comments |
| Comment by Roman Sydorenko [ 05/Jun/12 ] |
|
Yes, sure, priority is up to you. Thank you for your feedback! |
| Comment by Craig Wilson [ 05/Jun/12 ] |
|
Seems reasonable enough. We'll take it under consideration. Thanks for the proposal. Can we downgrade the priority of this from Critical to Minor? This doesn't seem like it would affect a majority of people. |
| Comment by Roman Sydorenko [ 05/Jun/12 ] |
|
Using reflection. I think that corresponding fields of the class could be marked by custom attribute (i.e. [FieldToCheck("Task", typeof(string))]). Then driver could check the attribute and know about all field names/types that had been used before for the marked field (in our example, for the "Tasks" field). |
| Comment by Craig Wilson [ 05/Jun/12 ] |
|
@Roman: How would you propose the driver know about the document structure change? |