﻿// Copyright (c) 2015 SIL International
// This software is licensed under the MIT license (http://opensource.org/licenses/MIT)
using System;

namespace LfMerge.LanguageForge.Model
{
	public class LfAuthorInfo : LfFieldBase
	{
		public string CreatedByUserRef { get; set; }
		public DateTime CreatedDate { get; set; }
		public string ModifiedByUserRef { get; set; }
		public DateTime ModifiedDate { get; set; }
	}
}


﻿// Copyright (c) 2015 SIL International
// This software is licensed under the MIT license (http://opensource.org/licenses/MIT)
using System;
using MongoDB.Bson;

namespace LfMerge.LanguageForge.Model
{
	public class LfAuthorInfo : LfFieldBase
	{
		public ObjectId? CreatedByUserRef { get; set; }
		public DateTime CreatedDate { get; set; }
		public ObjectId? ModifiedByUserRef { get; set; }
		public DateTime ModifiedDate { get; set; }
	}
}


Handle Mongo ObjectId references better
Handle Mongo ObjectId references better

ObjectId is a struct in the Mongo C# driver, so it's a non-nullable
object by default. However, our PHP code stores null for these UserRef
fields if no user reference is available. I had been making these fields
strings, but nullable ObjectId values are better: they will round-trip
correctly this way whether there is data there or not.
