public interface IDocument { string Name { get; } } public class Document : IDocument { [StorageClassNone] public string Name { get; } } public class DocumentMixin : DomainObjectMixin<Document>, IDocument { // Persistent public string Name { ... } }
In this case, ClassDefinition.ResolveProperty always returns null because it first checks the Name property on Document and disregards the interface property.
Scenario where this causes problems:
var query = from d in QueryFactory.CreateLinqQuery<DmsItem>() where ((IDocument)d).Name == "?" // or via LinqRedirectionAttribute on the Document.Name property select d;
Additional consideration: What should happen when both the class and the mixin (or two mixins) implement the same property in a persistent way?