I current has an object that has the public property Id. When I store an object, I would like the Id to be part of the data and not become the Id document as it currently works. When creating a document repository, I install only the connection string.
using (var session = documentStore.OpenSession())
{
session.Store(a);
session.SaveChanges();
}
a can be thought of an object as:
public class A
{
public Guid Id { get; set; }
}
So either I want it to generate a random identifier, or have both data and documentId, which are a property of Id of class A.
EDIT:
So, two possibilities: 1. Document Id = Id and
Data Section contains:
{
data //sorry if the notation is not correct, doing it off of memory
{
Id: [my guid]
//other properities
}
}
Or data containing id and document id = randomly generated raven
source
share