[CSHARP-60] The driver doesn't generate GUID id correctly. Created: 03/Sep/10  Updated: 19/Oct/16  Resolved: 08/Sep/10

Status: Closed
Project: C# Driver
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Mihai Ciureanu Assignee: Craig Wilson
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

If saving a class like this:

public class Post
{
public Guid Id

{ get; set; }
public string Text { get; set; }

}

the Id remains default(typeof(Guid)), so it isn't generated correclty. The GuidCombGenerator doesn't get called.



 Comments   
Comment by Craig Wilson [ 08/Sep/10 ]

This is currently by design and won't be fixed. In general, id's won't be nullable (and probably shouldn't be) because they are not allowed to be null in their storage locations. The workaround is to use a custom IIdGeneratorConvention across the board, or, for specific classes, assign a generator to the id property.

Generated at Wed Feb 07 21:35:41 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.