Release notes for re-motion version 1.13.132

List of Issues

Bugfixes

Details

[RM-4541] ClassDefinition.ResolveProperty doesn't find a persistent mixin property if the class implements the same interface as the mixin

Component/s: Data.Linq
Issue Type: Bug
Resolution: Fixed
Status: Closed


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?