-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hierarchical API analysis #3
Comments
There is one "problem" with the above approach. The validation logic will try to validate an entity when it is initialized. If we want an entity to have a not nil reference, shouldn't it have that relationship at initialization? To complicate things, if we add a backlink to relate the reference, it may not be persisted which means it may not have an id. We can't expect the reference value to be calculated until write, which means we may want some sentinel value like: The write logic may need to include reevaluating the ref-attributes (by setting |
Maybe Using Maybe simply, I think And Now the question becomes is there a way to mark entities that are |
Suppose we have some data (below) and we want to initialize the entities into their hierarchical tree. Intuitively, we would think adding relationship links in both directions. However, given these are immutable data structures (and that is a "good" thing [at least for now]). Adding the backlinks will always be incomplete because link will be missing the relationships that it is being added to (I can add more details if needed).
Maybe the underlying assumption should be that entities given in a tree are by definition not going to have backlinks and the API will know how to work will that. After all, we can add backlinks (ad hoc) when request a child entity of a tree.
The text was updated successfully, but these errors were encountered: