Hey Jordan,

Could you open an issue about this please?
https://github.com/symfony/symfony/issues

Thanks,
Bernhard

Am Dienstag, 15. Mai 2012 19:33:42 UTC+2 schrieb Jordan Stout:
>
> So, correct me if I'm wrong in any of this for I haven't dug too deep 
> into this exact issue. 
>
> I've noticed through developing many collection types, there's no 
> direct association to tying items back to an object after the submit 
> action took place and that it's based off the 0-indexed order in the 
> Collection.  This default use case seems to work great if you're 
> issuing the same exact query to build the data object layer. 
>
> Now to explain where doing this has failed me. 
>
> I've created a full jQuery / Ajax site that never does any redirects. 
> I do refresh content of certain blocks within the page, however, I am 
> now forced to update the form as well.  I noticed after manipulating 
> the form in the DOM (by doing a drag / drop reordering, or anything 
> else like this), the first submit works, but anything after the first 
> yields incorrect saves to the DB. 
>
> I feel that this isn't the way to do things when dealing with 
> collections.  I've always (unless I've been wrong the entire time) 
> have done collections like: 
>
> <input type="text" name="children[0][title]" value="Foo" /> 
> <input type="hidden" name="children[0][id]" value="1" /> 
> <input type="hidden" name="children[0][position]" value="1" /> 
>
> <input type="text" name="children[1][title]" value="Bar" /> 
> <input type="hidden" name="children[1][id]" value="2" /> 
> <input type="hidden" name="children[1][position]" value="2" /> 
>
> And do updates based on the 'id' and if it isn't present, to create a 
> new one. 
>
> Also, this is untested, but I'm assuming that if a user is doing 
> something like repositioning a form collection's children, and in the 
> backend, an item was deleted... that if the user was to then save the 
> form, it would either create a new item to replace that one, or 
> completely ignore it without the user knowing about it (which could be 
> BAD especially in my industry). 
>
> Anyway, I hope someone has been to where I'm at and understands this 
> is a problem... 
>
> I look forward to responses!

-- 
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 developers" 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-devs?hl=en

Reply via email to