When I deal with collections in forms, I always use an instance of a base collection form: http://github.com/schmittjoh/jmsFormsPlugin/blob/master/lib/form/jmsBaseCollectionForm.class.php
I have only looked at your plugin superficially, but you might be able to solve some of your problems with nested embedded relations/multiple relations by using some of this code. Kind regards, Johannes On 21 Jul., 13:19, Daniel Lohse <[email protected]> wrote: > Sorry for getting back to you so late. > > Unfortunately many-to-many relations in embedded forms are *not* working and > probably won't be for a while (or never). > > Two reasons for this: > 1. The plugin is not ready for this as this means dealing with nested > embedded relations which is not implemented right now (I have done some work > on this but it's unfinished, wonky, and probably not going to work anyway :() > 2. symfony has a critical bug that will (hopefully) be fixed according to > Kris Wallsmith (the release manager of 1.3 and 1.4). Here's the > ticket:http://trac.symfony-project.org/ticket/5867and here's his tweet about > it:http://twitter.com/kriswallsmith/status/17993956854 > > So, in light of this it's highly unlikely that you'll fix this on your own > (sorry about that, please prove me wrong, I'd like that! :)). > > If you have more ideas on how to deal with this, I'm open to suggestions. I'm > also sorry to the bringer of bad news. :( > > Cheers, Daniel > > On 16.07.2010, at 12:10, François SEDE wrote: > > > Thanks you. > > > 2010/7/16 Daniel Lohse <[email protected]> > > Sorry for not answering in a more timely manner — I'm the plugin developer. > > :) But as it's a bit late I'll answer your question tomorrow; I hope that > > alright. ;-) > > > Cheers, Daniel > > > Sent from my iPad > > > On Jul 15, 2010, at 12:29 PM, François SEDE <[email protected]> wrote: > > > > Hi, > > > > I'm using the ahDoctrineEasyEmbeddedRelationsPlugin with a many to > > > many relation and I have an error : > > > > 500 | Internal Server Error | Doctrine_Record_Exception > > > Couldn't call Doctrine_Core::set(), second argument should be an > > > instance of Doctrine_Collection when setting many-to-many references. > > > > Yaml : > > > > Event: > > > actAs: { Timestampable: ~ } > > > columns: > > > ... > > > relations: > > > ... > > > Participant: > > > class: Profile > > > local: event_id > > > foreign: profile_id > > > refClass: EventProfile > > > > Profile: > > > actAs: { Timestampable: ~ } > > > columns: > > > ... > > > relations: > > > ... > > > Event: > > > class: Event > > > local: profile_id > > > foreign: event_id > > > refClass: EventProfile > > > > EventProfile: > > > columns: > > > profile_id: > > > type: integer > > > event_id: > > > type: integer > > > relations: > > > Profiles: > > > class: Profile > > > local: profile_id > > > foreign: id > > > onDelete: CASCADE > > > Event: > > > class: Event > > > local: event_id > > > foreign: id > > > onDelete: CASCADE > > > > Here is my code : > > > > class EventForm extends BaseEventForm { > > > public function configure() { > > > > ... > > > > $this->embedRelations(array( > > > 'Participant' => array( > > > 'considerNewFormEmptyFields' => array(), > > > 'noNewForm' => false, > > > 'newFormLabel' => 'New > > > Adresse :', > > > 'newFormClassArgs' => > > > array(array('sf_user' => $this->getOption('sf_user'))), > > > 'displayEmptyRelations' => false, > > > 'formClassArgs' => > > > array(array('ah_add_delete_checkbox' => false)), > > > 'newFormAfterExistingRelations' => true, > > > 'formFormatter' => null, > > > 'multipleNewForms' => true, > > > 'newFormsInitialCount' => 2, > > > 'newFormsContainerForm' => null, > > > 'newRelationButtonLabel' => '+', > > > 'newRelationAddByCloning' => true, > > > 'newRelationUseJSFramework' => 'jQuery', > > > ) > > > ) > > > ); > > > > Can you help me please? > > > > Thanks for your 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 > > > -- > > 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 > > > -- > > 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 > > -- 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
