讓我們來看看這個模式:Symfony的1.4行走:我確定,但外鍵沒有在表中定義
orders:
_attributes: { phpName: Orders, default_table_charset: utf8, default_table_collate: utf8_general_ci }
id: ~
category_id: { type: integer, size: '10', required: true, defaultvalue: '0', foreigntable: categories, foreignreference: id }
whatisthis: { type: longvarchar, required: false }
categories:
_attributes: { phpName: Categories }
id: ~
name: { type: varchar, size: '255', required: true, defaultvalue: '' }
_uniques: { index_name: [name] }
我想通了,外鍵並不在我的表中定義。我使用innoDB
所以PK是可能的。或者Propel不應該設置外鍵?