Allow for including count of joined records #45
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The compiler currently already supports joining other records into the records that are being retrieved in the main query:
With the current change, it now also becomes possible to join the count of records instead of the records themselves:
The change was originally landed in ronin-co/compiler#131.
Furthermore:
On RONIN, link field constraints are designed to prevent the existence of children that don't have parents, and link field actions exist to automatically handle the children if something happens to the parents.
It therefore doesn't make sense to offer link field actions for many-cardinality relationships, since, in those cases, parents are referencing children, and parents should never be affected if something happens to the children, since there can be many children and only one parent.
Lastly, if the parents disappear, their references to the children should also disappear.
The change was originally landed in ronin-co/compiler#132.
Furthermore:
When altering models, it is not possible to pass any model entity (fields, indexes, triggers, or presets), as those must be altered individually. The change ensures that the types reflect this.
Furthermore, the
idPrefix
attribute can also only be provided when the model is created.The change was originally landed in ronin-co/compiler#129.