You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been playing with this in the past. I was thinking about adding 'Reference' property classes to models that could be either 'SingleReference' or 'MultiReference' properties (the latter two would inherit from a ReferenceProperty class). Such properties would be defined in the raw object passed to the Schema constructor.
In this example, spouse would be a SingleReferenceProperty while children would be a MultiReferenceProperty. There would be issues though when naming edge labels, for not all edge labels can be inferred by solely looking at the property name (and users may want customization as well).
in relationship could be inferred from out relationships, or explicitly set. I don't know :).
The idea is to abstract as much thing as possible if needed, but still allow the user to fine tune and manipulate lower level concepts as well.
Reference properties would then be populated when models are fetched, and maybe only some of them (ie fetch(populate: ['spouse', 'children']), for example).
It would be nice to handle some simple relationships handling between models.
I propose this configuration:
What do you think ?
The text was updated successfully, but these errors were encountered: