DBIx::Class::Relationship
http://search.cpan.org/~frew/DBIx-Class-0.08192/lib/DBIx/Class/Relationship.pm英語読めるようになりそう。
DBIとDBIxは違っていて、おそらく
DBIがSQLがりがり書けて、リレーションはりやすくて
発行のタイミングもつかめて、とか、手動的な感じ。
DBIxは、初期設定、テーブルやそれに関連する他テーブルを記述して
後は自動で好きなように使える感じ、
あまりSQLの事考えなくていい。
Class::DBI vs. DBIx::Class
http://www.perlmonks.org/?node=557402『Class::DBIもDBIx::Classもとても素晴らしいけれども、パワフルで安定した方を使いたい。
一体どっちを使ったほうがいいの』
っていう主旨の質問。
To me, the DBIx:: modules are more useful as facade interfaces to DBI, and the class::dbi modules are helpful to define relations between tables.
As this topic has been discussed before; a Super Search will also lead to A brief survey of the DBI usability layer modules on the CPAN .
『僕にとっては、the DBIx::modulesのほうが、表面上のインターフェースがDBIより使いやすいよ。
dbi modulesは、テーブル間のリレーションを明確にするのに役立つ。
この議論、以前のトピックであったよ、これ見てみて。
A brief survey of the DBI usability layer modules on the CPAN
http://www.perlmonks.org/?node_id=504724』
ちなみに、私はセンター英語で60%実力です。
8割ぐらい当たってるかな。
結論。
ここに書いてあった。
http://rt.air-nifty.com/pods/DBIx/Class/Relationship.html__PACKAGE__->has_many('自分テーブルのカラム名称' => 'リレーション先のテーブルSchema', 'リレーション先のカラム名');
で出来た。
posted by onishi at 13:16|
Comment(0)
|
DBix
|

|