arangoclient.net
arangoclient.net copied to clipboard
Inheritance
How does one handle the inheritance and/or polymorphism and/or abstraction problems?
I hear you can use edges, but wouldn't that have problems during queries? A human that is a friend of another human is also basically two animals being friends. If the friendship edge is on the animal collection, but I only want to find humans that are friends, won't I run into problems?
Please help.
Effectively, I believe, you're querying on the collection name. So when you create your collection, I'd make it based on the lowest level of abstraction. So if you're base class is "Animals" then your collection is animals and when you query, you would return all animals of type Human (which inherits or implements Animal) and pull them in the an ICollection<Human>.
Also, edges are the connective tissue, not collections in and of them selves. Use edges to describe the relationships between your collections (Animals in this case). So you would have a collection of "Animals" and maybe and edge called "Relationships"
From: francnuec [email protected] Sent: Friday, December 16, 2016 5:31:36 AM To: ra0o0f/arangoclient.net Cc: Subscribed Subject: [ra0o0f/arangoclient.net] Inheritance (#62)
How does one handle the inheritance and/or polymorphism and/or abstraction problems?
I hear you can use edges, but wouldn't that have problems during queries? A human that is a friend of another human is also basically two animals being friends. If the friendship edge is on the animal collection, but I only want to find humans that are friends, won't I run into problems?
Please help.
You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/ra0o0f/arangoclient.net/issues/62, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ACywicltKG6xu21i3xra4ON1VPaI9XWQks5rIpK4gaJpZM4LPMAr.