Ecto.Association.HasThrough

Ecto.Association.HasThrough

The association struct for has_one and has_many through associations.

Its fields are:

  • cardinality - The association cardinality
  • field - The name of the association field on the schema
  • owner - The schema where the association was defined
  • owner_key - The key on the owner schema used for the association
  • through - The through associations
  • relationship - The relationship to the specified schema, default :child

Summary

Functions

on_repo_change(map, , , )

Performs the repository change on the association

Functions

on_repo_change(map, , , )

Performs the repository change on the association.

Receives the parent changeset, the current changesets and the repository action options. Must return the persisted struct (or nil) or the changeset error.

Callback implementation for c:Ecto.Association.on_repo_change/4.

© 2012 Plataformatec
Licensed under the Apache License, Version 2.0.
https://hexdocs.pm/ecto/Ecto.Association.HasThrough.html

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部