0
に問題私はYAMLスキーマDoctrineはモデルを生成 - 関係型
から教義モデルを生成しようとしています、私はそのようなスキーマがあります。
Product:
columns:
id:
type: integer(5)
primary: true
unsigned: true
autoincrement: true
activation_time:
type: datetime
notnull: true
enduser_id:
type: integer(5)
unsigned: true
notnull: true
relations:
Enduser:
foreignType: one
type: one
foreignAlias: Product
Hostid:
columns:
id:
type: integer(5)
primary: true
unsigned: true
autoincrement: true
value:
type: string(32)
fixed: true
notnull: true
Order:
columns:
id:
type: integer(5)
primary: true
autoincrement: true
unsigned: true
expire_date:
type: datetime
description:
type: clob
Enduser:
columns:
id:
type: integer(5)
primary: true
unsigned: true
autoincrement: true
hostid_id:
type: integer(5)
unsigned: true
notnull: true
order_id:
type: integer(5)
unsigned: true
notnull: true
relations:
Order:
foreignAlias: Endusers
Hostid:
foreignAlias: Endusers
をし、問題が教義によって生成されたモデルが生成-モデル - ということですYAMLはBaseEnduser $商品に 間違ってはDoctrine_Collection
の$ this - > hasManyの( '商品'、アレイ( 'ローカル' => 'ID' '外来' => 'enduser_id'))として定義されます。
代わりに商品オブジェクト
どうしたのですか?
関係が foreignTypeのように定義される:1 タイプ:1
あなたが書いたように(foreignType:one)、それは動作していません;( – mrok
あなたはデータベースを作成してDoctrineがあなたのためにモデル/ ymlを生成させる可能性はありますか? – DrColossos
私はそれを解決しました。タブの代わりに私は2スペースを使用し、すべてうまくいった。 – mrok