Hi all.
I'm receving this error while i do doctrine:build-all or insert-sql:
SQLSTATE[HY000]: General error: 1005 Can't create table
'ssm.#sql-9cc_12' (errno: 150). Failing Query: ALTER TABLE skill ADD
CONSTRAINT skill_idcategory_category_id FOREIGN KEY (idcategory)
REFERENCES category(id) ON DELETE SET NULL
However it creates the tables (the first part of the generated SQL)
and gets this error without going forward.
Do you have an idea about this problem?
Should this error be connected to another error i receive if i try to
make a leftJoin between Interview and Category in my model?
Thank you in advance
P.S.: This is my schema:
#schema modello
Category:
actAs: { Timestampable: ~ }
columns:
name: { type: string(255), notnull: true, unique: true }
Skill:
actAs: { Timestampable: ~ }
columns:
idCategory: { type: integer, notnull: true }
tipo: { type: string(255) }
question: { type: string(255), notnull: true }
name: { type: string(255) }
relations:
Category: { onDelete: SET NULL, local: idCategory, foreign: id,
foreignAlias: Skills }
Attitude:
actAs: { Timestampable: ~ }
columns:
tipo: { type: string(255) }
question: { type: string(255), notnull: true }
name: { type: string(255) }
PersonalInformation:
actAs: { Timestampable: ~ }
columns:
tipo: { type: string(255) }
question: { type: string(255), notnull: true }
name: { type: string(255) }
Answer:
actAs: { Timestampable: ~ }
columns:
idSkill: { type: integer }
idAttitude: { type: integer }
idPersonal: { type: integer }
idInterview: { type: integer, notnull: true }
val: { type: string(255) }
relations:
Skill: { onDelete: SET NULL, local: idSkill,
foreign: id }
PersonalInformation: { onDelete: SET NULL, local: idPersonal,
foreign: id }
Attitude: { onDelete: SET NULL, local: idAttitude,
foreign: id }
Interview: { onDelete: SET NULL, local: idInterview,
foreign: id }
Interview:
actAs: { Timestampable: ~ }
columns:
idCategory: { type: integer, notnull: true }
author: { type: string(255), notnull: true }
customer: { type: string(255), notnull: true }
agency: { type: string(255) }
candidate: { type: string(255), notnull: true }
relations:
Category: { onDelete: SET NULL, local: idCategory, foreign:
id, foreignAlias: Interviews }
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"symfony users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en
-~----------~----~----~----~------~----~------~--~---