Support inverse relationships with interface types
It'd be useful/safer if we could define inverse relationships for references that refer to an interface, or a collection of.
To achieve this at the moment, we have to use Object & ObjectSet/Array references, and then typecast at run-time. Setting these up initially can be a little tricky as you have to do things in a certain order before the relationship dialog will allow you to define inverses for an object reference.
Under the hood, I imagine it could still work in the same way as if they were object references, but we'd benefit from being able to use the reference in a type-safe manner, and the relationship dialog could limit our options for the related class to those which implement the interface we're referring to.
Going a step further, it'd also be useful to define properties on an interface in general, and then the inverse relationship could be setup against those, rather than class properties directly. Classes which implement the interface would then map the interface property to an equivalent class property (like we currently do for methods).
This extra step would be advantageous for those using packages, as it'd then allow us to define inverse relationships between exported classes with those in the client/import schema (represented by exported interfaces).
HistoricalComments
Brian Johnstone 9/10/2018 10:52:59 AM I'd love to be able to include properties on interface definitions, and map them to real properties on classes which implement that interface. Then, being able to define MKDs against that interface property and use those MKDs as the automatic side of an inverse. When I brought this up previously, someone suggested wasn't that just multiple inheritance, but to me it's not so much multiple inheritance but rather a very targeted extension to interfaces that would make them even more useful than they already are.
John Beaufoy 4/10/2018 5:59:14 PM I'd actually support an improvement with the Inverse Relationship dialog to better support Object inverses (2nd para) as being its own suggestion?
John Beaufoy 4/10/2018 5:58:27 PM Allowing for inverses on interfaces over the generic types sounds like a positive step forward, as it should reduce the coupling in our data models while still preserving integrity.
|
+1 for properties on interfaces!