HI all,

I have this error :

500 | Internal Server Error | Doctrine_Connection_Mysql_Exception
SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or
update a child row: a foreign key constraint fails
(`yurplan1`.`items`, CONSTRAINT `items_shoplist_id_sub_categories_id`
FOREIGN KEY (`shoplist_id`) REFERENCES `sub_categories` (`id`))

the problem is : I DON'T HAVE ANY FIELD SUB_CATEGORIES in my ITEM...

Here is my yml :


SubCategories:
  actAs: { Timestampable: ~ }
  columns:
    name: { type: string(255), notnull: true }
  relations:
     ...
    ShoppingList:
      type: many
      class: ShoppingList
      local: id
      foreign: subcat_id

ShoppingList:
  actAs: { Timestampable: ~ }
  columns:
    name: { type: string(255), notnull: true }
    subcat_id: { type: integer(50), notnull: false }
  relations:
    SubCategories:
      local: subcat_id
      foreign: id
    Items:
      type: many
      class: Items
      local: id
      foreign: shoplist_id
      onDelete: CASCADE
      foreignAlias: Items

Items:
  actAs: { Timestampable: ~ }
  columns:
    name: { type: string(255), notnull: true }
    shoplist_id : { type: integer(50), notnull: true }
  relations:
    SubCategories:
      local: shoplist_id
      foreign: id

Thanks you for any Help.

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

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

Reply via email to