Hello,

  Is it the generated form or did you add some code ? (copy/paste it if yes)

  Can you give us the POST variables too ?

  Can you give us the form names, the schema ?

  Thanks,

Alexandre

2009/10/22 phil0 <[email protected]>

>
> I am importing some data from an external data source. For that I
> decided to load the data into a model object, and then pass that to a
> form (generated by Doctrine).
>
> The object that I am editing is has a many-to-many relation, so it
> seems that Doctrine saves the data temporarily and then deletes it
> again. This is not a problem as performance is not an issue for this
> backend functionality.
>
> The problem arises when the form is submitted. The "id" of the object
> is - because it was temporarily saved - set to an integer, but this no
> longer exists because Doctrine deleted it. This makes the form
> validation fail because the "id" is not empty and it doesn't exist in
> the database. This results in an "Id: Invalid." error on the id field.
>
> I would prefer not to save the object before editing it using the
> form, as the user might regret the import and therefore just go back.
> This would result in unedited data in the database.
>
> I hope that I clarified my problem enough - if you need sample code
> just tell me.
> I use symfony 1.3 and the Doctrine version that is in the 1.3 svn.
>
> >
>


-- 
Alexandre Salomé -- [email protected]

--~--~---------~--~----~------------~-------~--~----~
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