Download a RavenDB document without a CLR type

I am trying to load a document by its identifier from a domain that does not have a saved CLR type.

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 am trying to load it using the duck duck input function of a 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 enable the Data parameter (as indicated above) in this class, it loads fine, but if I turn it on, it fails with an error saying that it does not know about the original type ("Failed to load assembly" OriginalAssemblyName ") Is there any way to make a thieves duck-type list of objects, and instead of trying to apply it to type i, I don’t have access?

+3
1

- . JObject, , . sesssion.Load(ID). - . https://groups.google.com/forum/#!topic/ravendb/y3-SVB18xVg

0

All Articles