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
Right now an intermediary join table is automatically created for each many-to-many field definition. Ideally we should try to support the use of many-to-many fields involving custom through models, which can be necessary if other fields need to be defined as part of the many-to-many relationship.
The issue with a custom through model is that it would be necessary to introspect the specified model in order to identify what is the "origin" foreign key and the "destination" foreign key. Ideally we should find a way to ensure that this is something that is explicitly defined as part of the many-to-many field definition:
classPost < Marten::Model# Other fields...
field :tags, :many_to_many, to:Tag, through:CustomPostTags, source::field1, target::field2end
The text was updated successfully, but these errors were encountered:
Description
Right now an intermediary join table is automatically created for each many-to-many field definition. Ideally we should try to support the use of many-to-many fields involving custom through models, which can be necessary if other fields need to be defined as part of the many-to-many relationship.
The issue with a custom through model is that it would be necessary to introspect the specified model in order to identify what is the "origin" foreign key and the "destination" foreign key. Ideally we should find a way to ensure that this is something that is explicitly defined as part of the many-to-many field definition:
The text was updated successfully, but these errors were encountered: