When I save a new F# Record, I'm getting an extra column called Id@ in the RavenDb document, and it shows up when I load or view the object in code; it's even being converted to JSON through my F# API.
Here is my F# record type:
type Campaign = { mutable Id : string; name : string; description : string }
I'm not doing anything very exciting to save it:
let save c : Campaign =
use session = store.OpenSession()
session.Store(c)
session.SaveChanges()
c
Saving a new instance of a record creates a document with the Id of campaigns/289. Here is the full value of the document in RavenDb:
{
"Id@": "campaigns/289",
"name": "Recreating Id bug",
"description": "Hello StackOverflow!"
}
Now, when I used this same database (and document) in C#, I didn't get the extra Id@ value. This is what a record looks like when I saved it in C#:
{
"Description": "Hello StackOverflow!",
"Name": "Look this worked fine",
}
(Aside - "name" vs "Name" means I have 2 name columns in my document. I understand that problem, at least).
So my question is: How do I get rid of the extra Id@ property being created when I save an F# record in RavenDb?
Campaignrecord definition. - Fyodor SoikinIdproperty, but it doesn't show up as a document value - it's the value used to access the document. The document created with F# has both the Id used to look up the specific database record, and a JSON value in the document calledId@; the C# version doesn't have the "extra" JSON value in the document. - Max