バージョン選択

フォーラム

メニュー

オンライン状況

26 人のユーザが現在オンラインです。 (19 人のユーザが フォーラム を参照しています。)
登録ユーザ: 0
ゲスト: 26
もっと...

サイト内検索

機能要望 > その他 > EC-CUBE で O/R Mapper 的なもの

その他

新規スレッドを追加する

フラット表示 前のトピック | 次のトピック
投稿者 スレッド
ghana
投稿日時: 2009/10/29 11:14
対応状況: −−−
新米
登録日: 2009/10/28
居住地:
投稿: 8
Re: EC-CUBE で O/R Mapper 的なもの
引用:
とあるので, JOIN を使用できるのは PHP5 のみ?!

JOIN というか ClassBelongsTo() とか ClassHasMany() が PHP4 では使えないということみたいです。

引用:
あと, id っていう名前の PRIMARY KEY を作るというのがデフォルトの規約みたいです.

これは

引用:
14. Primary Keys ADOdb_Active_Record does not require the table to have a primary key. You can insert records for such a table, but you will not be able to update nor delete. Sometimes you are retrieving data from a view or table that has no primary key, but has a unique index. You can dynamically set the primary key of a table through the constructor, or using ADOdb_Active_Record::SetPrimaryKeys():

引用:
15. Retrieval of Auto-incrementing ID When creating a new record, the retrieval of the last auto-incrementing ID is not reliable for databases that do not support the Insert_ID() function call (check $connection->hasInsertID). In this case we perform a SELECT MAX($primarykey) FROM $table, which will not work reliably in a multi-user environment. You can override the ADOdb_Active_Record::LastInsertID() function in this case.

引用:
22. TableKeyHasMany For some classes, the mapping between class name and table name (which is the pluralised version) might not match or the primary key is not the default id. For example, the class name might be person, but the table name might be people. So we have 2 tables, people (parent table) and children (child table) linked by people.pid = children.person_id. Then you use the following static function ADODB_Active_Record::TableKeyHasMany($table, $tablePKey, $relation, $foreignKey = '', $foreignClass = 'ADODB_Active_Record') like this: ADODB_Active_Record::TableKeyHasMany('people', 'pid', 'children', 'person_id')


を読む限り id 以外のキーでも constructor でごにょごにょしてやれば使えます。
フラット表示 前のトピック | 次のトピック


題名 投稿者 日時
   EC-CUBE で O/R Mapper 的なもの nanasess 2009/10/27 11:05
     Re: EC-CUBE で O/R Mapper 的なもの pineray 2009/10/27 11:42
       Re: EC-CUBE で O/R Mapper 的なもの nanasess 2009/10/27 12:24
     Re: EC-CUBE で O/R Mapper 的なもの seasoft 2009/10/27 12:35
       Re: EC-CUBE で O/R Mapper 的なもの nanasess 2009/10/27 13:03
         Re: EC-CUBE で O/R Mapper 的なもの nanasess 2009/10/27 18:27
         Re: EC-CUBE で O/R Mapper 的なもの nanasess 2009/10/28 0:34
           Re: EC-CUBE で O/R Mapper 的なもの seasoft 2009/10/28 11:19
             Re: EC-CUBE で O/R Mapper 的なもの ghana 2009/10/28 11:26
               Re: EC-CUBE で O/R Mapper 的なもの nanasess 2009/10/28 13:58
             Re: EC-CUBE で O/R Mapper 的なもの nanasess 2009/10/28 13:54
               Re: EC-CUBE で O/R Mapper 的なもの seasoft 2009/10/28 14:49
                 Re: EC-CUBE で O/R Mapper 的なもの nanasess 2009/10/28 15:35
                   Re: EC-CUBE で O/R Mapper 的なもの seasoft 2009/10/28 15:43
                     Re: EC-CUBE で O/R Mapper 的なもの tao_s 2009/10/29 4:11
                       Re: EC-CUBE で O/R Mapper 的なもの pineray 2009/10/29 6:34
                       Re: EC-CUBE で O/R Mapper 的なもの nanasess 2009/10/29 9:09
                         Re: EC-CUBE で O/R Mapper 的なもの nanasess 2009/10/29 9:30
                           Re: EC-CUBE で O/R Mapper 的なもの rhosoi 2009/10/29 10:47
                             Re: EC-CUBE で O/R Mapper 的なもの nanasess 2009/10/29 13:24
                           Re: EC-CUBE で O/R Mapper 的なもの ghana 2009/10/29 10:54
                         » Re: EC-CUBE で O/R Mapper 的なもの ghana 2009/10/29 11:14
                             Re: EC-CUBE で O/R Mapper 的なもの nanasess 2009/10/29 13:29
                               Re: EC-CUBE で O/R Mapper 的なもの nanasess 2009/11/20 18:33
                                 Re: EC-CUBE で O/R Mapper 的なもの tao_s 2009/11/21 11:06
                                   Re: EC-CUBE で O/R Mapper 的なもの nanasess 2009/12/2 15:44
                     Re: EC-CUBE で O/R Mapper 的なもの seasoft 2009/10/29 9:05
           Re: EC-CUBE で O/R Mapper 的なもの kishik 2009/10/28 11:31
             Re: EC-CUBE で O/R Mapper 的なもの nanasess 2009/10/28 14:01

 



ログイン


EC-CUBE公式 Amazon Payプラグイン

統計情報

総メンバー数は88,922名です
総投稿数は110,012件です

投稿数ランキング

1
seasoft
7367
2
468
3217
3
AMUAMU
2712
4
nanasess
2313
5
umebius
2085
6
yuh
1819
7
h_tanaka
1646
8
red
1570
9
mcontact
1296
10
tsuji
958
11
fukap
907
12
shutta
835
13
tao_s
799
14 ramrun 789
15 karin 689
16 sumida 641
17
homan
633
18 DELIGHT 572
19
patapata
502
20
flealog
485


ネットショップの壺

EC-CUBEインテグレートパートナー

Copyright© EC-CUBE CO.,LTD. All Rights Reserved.