ra0o0f / arangoclient.net

ArangoDB .NET Client with LINQ support
Apache License 2.0
99 stars 37 forks source link

Support Polymorphism #43

Open cocowalla opened 8 years ago

cocowalla commented 8 years ago

I can't see any way to work with class hierarchies.

For example, let's say I had an Animal class, and Dog and Cat subclasses. Working with MongoDB I'd create an Animal collection, then I would insert Dog and Cat instances and a type discriminator field would automatically be added. I could then use Linq's .OfType<Dog> to query specifically on dogs, for example.

AFAICS, arangoclient doesn't support polymorphism?

ra0o0f commented 8 years ago

client does not doesn't support polymorphism yet, but like _t discriminator field in mongodb, client have a '$type' filed that is supported by json.net for the polymorphism, it is used now for serializing derived/interface class members(wont work for your scenario which you need it for collections) .so it could be done with a few wrappers. i will work on it this week and inform you here when the implementation is done.

cocowalla commented 8 years ago

Superb, thanks!

cocowalla commented 7 years ago

Have you got any further forward with this?

ra0o0f commented 7 years ago

sorry about the delay, no i did not but i will as soon as i add support for the .NET CORE

Rleahy commented 4 years ago

Is this still been worked on?