0
심포니 1.4.12에서 Fixitures의 ID 문제는 내가 follwing을 fixiture 파일이 있습니다.YML
나는 그렇게 사용하지 않으 :
Post1:
category_id: 1
title: Ceci est un Test 1
content: TEST
하지만 난 webDev
, webDesign
또는 Autres
카테고리 이름의 이름을 사용하고 싶습니다. 작업 내가 실행할 때 나는 오류가 없습니다 :
./symfony doctrine:build --all --no-confirmation --and-load
을 그러나 내가 NULL
를 얻을 내가 범주 id
대신 MySQL 데이터베이스에 보면,. 왜? 오류는 어디에 있습니까?
은 여기 내이 schema.yml
Category:
tableName: categories
columns:
name: string(100)
Post:
tableName: posts
actAs:
Timestampable: ~
Sluggable:
fields: [title]
columns:
category_id: integer
title: string(100)
content: text
relations:
Category:
type: one
foreignType: many
local: id
foreign: id
의
local: category_id
를 시도? – Flask내 schema.yml로 질문을 업데이트했습니다. –
"Post"에 "category_id"를 정의하고 있으면 "local"ID가 Category 관계에 대해 "category_id"여야한다고 생각합니까? –