I am trying to load a document by its id from a domain that does not have the CLR type that was stored.
The original structure looks something like this:
public class Document
{
public int DocumentId {get;set;}
public string SomeValue {get;set;}
public List<Data> Data {get;set;}
}
public abstract class Data { }
public class Data1 : Data
{
public string SomeOtherValue {get;set;}
}
Now in my second project which does not have access to this structure i try to load it by using the duck-typing features of raven with a class that looks the same.
public class Document
{
public int DocumentId {get;set;}
public string SomeValue {get;set;}
//public List<Data> Data {get;set;}
}
public abstract class Data { }
public class Data1 : Data
{
public string SomeOtherValue {get;set;}
}
If i do not include the Data parameter (as above) in this class it loads fine, but if i do include it it fails with an error saying it doesn't know about the original type stored ("Could not load assembly 'OriginalAssemblyName'"). Is there any way to make raven duck-type the list of objects as well instead of trying to cast it to a type i don't have access to?