Steps to Reproduce:
[PersistentInterface]
public interface MyInterface1 {
String Name { get; set; }
}
[PersistentInterface]
public interface MyInterface2 {
String Name { get; set; }
MyInterface1 Persistent { get; set; }
[NonPersistent]
MyInterface1 NonPersistent { get; set; }
}
[DomainLogic(typeof(MyInterface2))]
public class MyInterface2Logic {
public static MyInterface1 Get_NonPersistent(MyInterface2 instance) {
return instance.Persistent;
}
public static void Set_NonPersistent(MyInterface2 instance, MyInterface1 value) {
instance.Persistent = value;
}
}
[Test]
public void TestMy() {
Builder.RegisterEntity("TestEntity1", typeof(MyInterface1));
Builder.RegisterEntity("TestEntity2", typeof(MyInterface2));
Builder.ForceBuild();
XPClassInfo info1 = Builder.GetEntity("TestEntity1");
XPClassInfo info2 = Builder.GetEntity("TestEntity2");
using(UnitOfWork uow = new UnitOfWork(DataLayer)) {
MyInterface2 obj = info2.CreateNewObject(uow) as MyInterface2;
obj.NonPersistent = info1.CreateNewObject(uow) as MyInterface1;
}
}