我想上具有多對多的關係表中創建燈具,但我得到這個錯誤:Symfony的夾具和多對多的關係(教義)
SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (
bambinbazar
.bambinbazar_category_articles
, CONSTRAINTbabi
FOREIGN KEY (articles_id
) REFERENCESbambinbazar_articles
(id
) ON DELETE CASCADE)
在我的燈具:
BambinbazarArticles:
article_vetement:
title: bla bla
BambinbazarCategory: [whateverCat]
在我的架構:
relations:
BambinbazarCategory:
class:BambinbazarCategory
refClass: BambinbazarCategoryArticles
local: category_id
foreign: articles_id
foreignAlias: BambinbazarArticles
謝謝!今晚會嘗試 – 2010-12-13 19:13:19