1
我有一個標題表/模型,並且我還有一個「標題」模塊。當我去標題模塊,這在過去一直很好,現在給了我這個錯誤:無法爲沒有主鍵的模型生成模塊
Cannot generate a module for a model without a primary key (Heading)
這是奇怪的我,因爲我對標題的schema.yml看起來是這樣的:
Heading:
connection: doctrine
tableName: heading
columns:
id:
type: integer(8)
fixed: false
unsigned: false
primary: true
autoincrement: true
referenced_table_name:
type: string(255)
fixed: false
unsigned: false
primary: false
notnull: true
autoincrement: false
column_name:
type: string(255)
fixed: false
unsigned: false
primary: false
notnull: true
autoincrement: false
label:
type: string(255)
fixed: false
unsigned: false
primary: false
notnull: true
autoincrement: false
position:
type: integer(4)
fixed: false
unsigned: true
primary: false
notnull: true
autoincrement: false
import_profile_id:
type: integer(8)
fixed: false
unsigned: false
primary: false
notnull: true
autoincrement: false
note:
type: string()
fixed: false
unsigned: false
primary: false
notnull: true
autoincrement: false
created_at:
type: timestamp(25)
fixed: false
unsigned: false
primary: false
default: '0000-00-00 00:00:00'
notnull: true
autoincrement: false
updated_at:
type: timestamp(25)
fixed: false
unsigned: false
primary: false
default: '0000-00-00 00:00:00'
notnull: true
autoincrement: false
relations:
ImportProfile:
local: import_profile_id
foreign: id
type: one
TotalFromFile:
local: id
foreign: heading_id
type: many
注意主鍵:
columns:
id:
type: integer(8)
fixed: false
unsigned: false
primary: true
autoincrement: true
我懷疑它是與this other problem I'm having。有任何想法嗎?
繼續從其他線程...你有沒有運行「symfony doctrine:clean-model-files」來刪除過時的模型?這是否推動事情呢? – Tom 2010-11-19 17:58:27