simple-odata-client / Simple.OData.Client

MIT License
329 stars 196 forks source link

Nested Open-Types won't work #365

Open Diraekt opened 7 years ago

Diraekt commented 7 years ago

Hello again :-)

Our DTO looks like:

class MyDto
{
 public string WhatEver{get;set;}
 public DynamicContainer Container{get;set;}
}

class DynamicContainer
{
  public IDictionairy<string,object> Properties{get;set;}
}

There are a few things why it won't work at the moment 'WithProperties()` => (AnyProperty(...) implementation doesn't support nested types) The Property Container is recognized as "Structural Property" so Update, Insert won't work. (it will aways be empty)

Do you have any plans to support this ? (may we can help you, if you like)

object commented 7 years ago

Complex types are not currently supported with open types but there's ongoing work here, hopefully it will be released in version 4 soon.

Diraekt commented 7 years ago

Hopefully you understand what I mean. => I want to say: If your Open Type (IDictionairy<string,object>) is not a "direct" Property of your class it won't work. (see example above please)

object commented 7 years ago

Yes I believe I got it.

mmierzwa commented 6 years ago

Are there any updates on this topic? I have the same situation with my schema as described by @Diraekt Are there any workarounds for this limitation?