-
Notifications
You must be signed in to change notification settings - Fork 2
doc: paired end foreign keys #38
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
Conversation
setup_data_scheme.md
Outdated
| *targetKey* | String | A unique identifier of the association stored in any of the two models involved in the association. And it could be an array for to-many associations. | ||
| *keysIn* | String | Name of the model where the targetKey is stored. | ||
|
|
||
| Example: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add reverese data model definition
setup_data_scheme.md
Outdated
| *targetKey* | String | Attribute belonging to target model, which stores the associated ids of source model. And it could be an array for to-many associations. | ||
| *keysIn* | String | Name of the model where the sourceKey is stored. | ||
|
|
||
| Example: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- add example for many-to-one / one-to-many paired-end assoc
- add comments like in the single-end assoc example, especially for targetKey, sourceKey, keysIn
| *implementation* | 'sql_cross_table' | Set the `implementation` field to 'sql_cross_table' | ||
| When the association is of type *many_to_many* and it refers to a more particular type of association *many_to_many*, stored in a cross table, the `implementation` argument should be set as `to_many_through_sql_cross_table` and it's only available for `sql` stored models. | ||
|
|
||
| Example: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add comments like in the above examples
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Resolve comments
closes Zendro-dev/graphql-server-model-codegen#185