I use lower case "id" as my document id convention in RavenDB (build 2910 and 2916)
var store = new DocumentStore
{
Conventions =
{
FindIdentityProperty = q => q.Name == "id"
}
};
Say I have an index on Tasks created using: ( BTW.. just for show, not actually using this index )
public class Task
{
public string id { get; set; }
public string Name { get; set; }
}
public class Task_Index : AbstractIndexCreationTask<Task, Task_Index.TaskIndexData>
{
public class TaskIndexData
{
public string TaskId { get; set; }
public string Name { get; set; }
}
public Task_Index()
{
Map = Tasks => from t in Tasks
select new TaskIndexData
{
Name = t.Name,
};
}
}
Looking in Raven studio the generated index looks something like this
docs.Tasks.Select(t => new {
TaskID =
t.id, //does not populate unless I use t.Id
Name = t.Name
})
The TaskId property in the index is always null unless I manually change the index to use t.Id..
What am I missing here? The __document_id property is there but how do I use it from the Map/Reduce in AbstractIndexCreationTask?
Seems like AbstractIndexCreationTask should look at the documnt id convention and change the lower case "id" to "Id" in the generated index?..
You received this message because you are subscribed to the Google Groups "RavenDB - 2nd generation document database" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
.
.