Skip to content

Conversation

@wunderbarr
Copy link
Member

@wunderbarr wunderbarr added the enhancement New feature or request label Aug 3, 2022
@wunderbarr wunderbarr self-assigned this Aug 3, 2022
*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:
Copy link
Member

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

*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:
Copy link
Member

@coeit coeit Aug 4, 2022

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:
Copy link
Member

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

Copy link
Member

@coeit coeit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Resolve comments

@wunderbarr wunderbarr merged commit a7f92f5 into master Aug 8, 2022
@wunderbarr wunderbarr deleted the pairedEnd branch August 8, 2022 09:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

implement foreignkey arrays for one_to_many relations

2 participants