I am using Symfony 1.2 and propel... 
  ----- Original Message ----- 
  From: Java geek 
  To: symfony-users@googlegroups.com 
  Sent: Monday, June 29, 2009 2:30 PM
  Subject: [symfony-users] Foreign key violation when saving embedded forms


  I have following schema.

User
  id: ~
  name: {type: varchar(100)}
  
Registrations
  id: ~
  user_id: {type: integer, foreignTable: User, foreignReference: id}


  schema is not complete, It shows important fields only.

  RegistrationForm


unset($this['user_id']);
$userform = new UserForm($this->object->getUser());
$this->embedForm($userform);


  Form is displayed.. and it works when updating existing registrations.

  But it throws foreign key constraint violation when creating new 
registrations. because user_id is null. Some how new user is not being set on 
registration.

  What am I doing wrong?

  SN
  http://www.jsptube.com

  

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to