Drkcore

29 10 2006 perl DBIC Tweet

belongs_toとhas_oneとmight_haveの関係

DBICのMLより

[Dbix-class] Difference between belongs_to and has_one

Belongs to is a child -> parent relationship Has one is a sibling <-> sibling relationship?

has_oneはちょっと違うんじゃないかと。

101号室より愛をこめてに詳しい解説があった。

家族の関係、核家族とか最近の4人家族のイメージだと

  • has_one,has_many
  • 親からみた子
  • might_have
  • 兄弟姉妹みたいな関係(いるかもしれんしいないかもしれん)
  • belongs_to
  • 子供からみた親の関係

ぐらいに捉えておけばいいのか。

About

  • もう5年目(wishlistありマス♡)
  • 最近はPythonとDeepLearning
  • 日本酒自粛中
  • ドラムンベースからミニマルまで
  • ポケモンGOゆるめ

Tag

Python Deep Learning javascript chemoinformatics Emacs sake and more...

Ad

© kzfm 2003-2021