yaml スキーマから教義モデルを生成しようとしています
私はそのようなスキーマを持っています:
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
そして問題は、doctrine generate-models-yaml によって生成されたモデルが BaseEnduser で間違っていることです $Product は Doctrine_Collection として定義されています
$this->hasMany('Product', array( 'local' => 'id', 'foreign' => 'enduser_id'));
代わりに、製品オブジェクトのみ
私は何を間違えましたか?
関係は、foreignType: one type: one として定義されます