未知记录属性/相关组件“提供”;在“联系”上 [英] unknown record property/related component "onwer" on "contact"
问题描述
当我尝试执行php symfony doctrine:data-load
时,此消息消失:
When I try to execute php symfony doctrine:data-load
, this message apears :
联系上的未知记录属性/相关组件所有者
unknown record property/related component "owner" on "contact"
这是我的schema.yml:
this is my schema.yml :
Contact:
connection: doctrine
tableName: contact
columns:
id_contact:
type: integer(2)
fixed: false
unsigned: false
primary: true
autoincrement: true
nom:
type: string(30)
fixed: false
unsigned: false
primary: false
notnull: false
autoincrement: false
fonction_organisme:
type: string(1000)
fixed: false
unsigned: false
primary: false
notnull: false
autoincrement: false
categorie:
type: string(300)
fixed: false
unsigned: false
primary: false
notnull: false
autoincrement: false
region:
type: string(1000)
fixed: false
unsigned: false
primary: false
notnull: false
autoincrement: false
province:
type: string(500)
fixed: false
unsigned: false
primary: false
notnull: false
autoincrement: false
adresse:
type: string(1000)
fixed: false
unsigned: false
primary: false
notnull: false
autoincrement: false
tel1:
type: string(30)
fixed: false
unsigned: false
primary: false
notnull: false
autoincrement: false
tel2:
type: string(30)
fixed: false
unsigned: false
primary: false
notnull: false
autoincrement: false
tel3:
type: string(30)
fixed: false
unsigned: false
primary: false
notnull: false
autoincrement: false
tel4:
type: string(30)
fixed: false
unsigned: false
primary: false
notnull: false
autoincrement: false
email:
type: string(30)
fixed: false
unsigned: false
primary: false
notnull: false
autoincrement: false
fax:
type: string(30)
fixed: false
unsigned: false
primary: false
notnull: false
autoincrement: false
ville:
type: string(50)
fixed: false
unsigned: false
primary: false
notnull: false
autoincrement: false
journal:
type: string(2000)
fixed: false
unsigned: false
primary: false
notnull: false
autoincrement: false
commentaire:
type: string(2000)
fixed: false
unsigned: false
primary: false
notnull: false
autoincrement: false
fix:
type: string(30)
fixed: false
unsigned: false
primary: false
notnull: false
autoincrement: false
image:
type: string(30)
fixed: false
unsigned: false
primary: false
notnull: false
autoincrement: false
owner:
type: string(30)
fixed: false
unsigned: false
primary: false
notnull: false
autoincrement: false
relations:
Evenement:
local: id_contact
foreign: id_contact_event
type: many
users :
class : user
refclass : operation_contact
foreignAlias : contacts
Courrier:
connection: doctrine
tableName: courrier
columns:
num_serie:
type: integer(2)
fixed: false
unsigned: false
primary: true
autoincrement: false
annee:
type: integer(2)
fixed: false
unsigned: false
primary: true
autoincrement: false
num_c:
type: integer(2)
fixed: false
unsigned: false
primary: false
notnull: true
autoincrement: false
exp:
type: string(500)
fixed: false
unsigned: false
primary: false
notnull: false
autoincrement: false
dest:
type: string(500)
fixed: false
unsigned: false
primary: false
notnull: false
autoincrement: false
state:
type: string(10)
fixed: false
unsigned: false
primary: false
notnull: true
autoincrement: false
objet:
type: string(1000)
fixed: false
unsigned: false
primary: false
notnull: true
autoincrement: false
image_c:
type: string(500)
fixed: false
unsigned: false
primary: false
notnull: true
autoincrement: false
date_recep:
type: date(25)
fixed: false
unsigned: false
primary: false
notnull: false
autoincrement: false
date_env:
type: date(25)
fixed: false
unsigned: false
primary: false
notnull: false
autoincrement: false
owner_c:
type: string(30)
fixed: false
unsigned: false
primary: false
notnull: true
autoincrement: false
user_c:
type: string(30)
fixed: false
unsigned: false
primary: false
notnull: true
autoincrement: false
relations :
users :
class : user
refclass : operation_c
foreignAlias : courriers
Evenement:
connection: doctrine
tableName: evenement
columns:
id_event:
type: integer(2)
fixed: false
unsigned: false
primary: true
autoincrement: true
date:
type: date(25)
fixed: false
unsigned: false
primary: false
notnull: true
autoincrement: false
action:
type: string(2000)
fixed: false
unsigned: false
primary: false
notnull: true
autoincrement: false
id_contact_event:
type: integer(2)
fixed: false
unsigned: false
primary: false
notnull: true
autoincrement: false
relations:
Contact:
local: id_contact_event
foreign: id_contact
type: one
OperationC:
connection: doctrine
tableName: operation_c
columns:
id_user:
type: integer(2)
fixed: false
unsigned: false
primary: true
autoincrement: false
num_serie:
type: integer(2)
fixed: false
unsigned: false
primary: true
autoincrement: false
operation_c:
type: string(2000)
fixed: false
unsigned: false
primary: false
notnull: true
autoincrement: false
date_op_c:
type: date(25)
fixed: false
unsigned: false
primary: false
notnull: true
autoincrement: false
relations :
user : { onDelete : CASCADE}
courrier : { onDelete : CASCADE }
OperationContact:
connection: doctrine
tableName: operation_contact
columns:
id_contact:
type: integer(2)
fixed: false
unsigned: false
primary: true
autoincrement: false
id_user:
type: integer(2)
fixed: false
unsigned: false
primary: true
autoincrement: false
operation:
type: string(2000)
fixed: false
unsigned: false
primary: false
notnull: true
autoincrement: false
date_op:
type: date(25)
fixed: false
unsigned: false
primary: false
notnull: true
autoincrement: false
relations :
user : { onDelete : CASCADE}
contact : { onDelete : CASCADE }
User:
connection: doctrine
tableName: user
columns:
id_user:
type: integer(2)
fixed: false
unsigned: false
primary: true
autoincrement: true
nom_user:
type: string(30)
fixed: false
unsigned: false
primary: false
notnull: true
autoincrement: false
prenom_user:
type: string(30)
fixed: false
unsigned: false
primary: false
notnull: true
autoincrement: false
adresse_user:
type: string(2000)
fixed: false
unsigned: false
primary: false
notnull: true
autoincrement: false
tel_user:
type: string(30)
fixed: false
unsigned: false
primary: false
notnull: true
autoincrement: false
login:
type: string(30)
fixed: false
unsigned: false
primary: false
notnull: true
autoincrement: false
password:
type: string(30)
fixed: false
unsigned: false
primary: false
notnull: true
autoincrement: false
这是我的灯具文件中的示例:
and this is an example from my fixture file :
contact :
jihane:
nom : jihane bahadi
fonction_organisme : directrice
categorie : autre
region : meknes
adresse : route de fes
tel1 : 0654789632
email : jihane.bahadi@gmail.com
fix : 05698743255
ville : meknes
ouwner : user
推荐答案
好吧,我不确定,但是我认为这是因为您使用所有者作为字段名称!(它使mySQL与所有者保留错误混淆!)我记得o因为我在其中一个字段或模型中使用了 group 一词,这引起了很多问题。但是当我更改名称时,一切正常。只需在模型架构中更改所有者,然后构建模型,表单等并重新创建表并修复固定装置即可。我希望这能解决问题!
well, i'm not sure but i think this is because you use owner for a field name!(it confuses the mySQL with the owner Reserved wrod!) i remember once i was using the word group for one of my fields or models and it caused so many problems. but when i changed that name everything went fine. just change the owner in your model schema and then build your models,forms,etc and recreate your tables and fix your fixture. i hope this fix the problem!
这篇关于未知记录属性/相关组件“提供”;在“联系”上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!