Added the ability to specify explicit db type's for a property type using an overloaded ctor argument. This allows us to specify explicit db types for properties without having them get overwritten during the repository saving logic which will always reset it to be the db type of the underlying property editor. In the case of our built-in membership properties we do not want this to happen. Fixes some unit tests. Removes built-in props from being included in the property types on the profile model on the front-end.

This commit is contained in:
Shannon
2014-02-21 12:56:00 +11:00
parent 1ada5210ad
commit 3e67b3034d
13 changed files with 250 additions and 116 deletions

View File

@@ -43,7 +43,7 @@ namespace Umbraco.Core.Models
private static readonly PropertyInfo ValueSelector = ExpressionHelper.GetPropertyInfo<Property, object>(x => x.Value);
private static readonly PropertyInfo VersionSelector = ExpressionHelper.GetPropertyInfo<Property, Guid>(x => x.Version);
/// <summary>
/// Returns the Alias of the PropertyType, which this Property is based on
/// </summary>
@@ -59,9 +59,14 @@ namespace Umbraco.Core.Models
/// <summary>
/// Returns the DatabaseType that the underlaying DataType is using to store its values
/// </summary>
/// <remarks>Only used internally when saving the property value</remarks>
/// <remarks>
/// Only used internally when saving the property value.
/// </remarks>
[IgnoreDataMember]
internal DataTypeDatabaseType DataTypeDatabaseType { get { return _propertyType.DataTypeDatabaseType; } }
internal DataTypeDatabaseType DataTypeDatabaseType
{
get { return _propertyType.DataTypeDatabaseType; }
}
/// <summary>
/// Returns the PropertyType, which this Property is based on