I'm sorry, but the problem is still here for me...
Empty new records are inserted and i still have the "duplicate key"
Error,
even with the svn HEAD ...

What i'm trying to do:
store values for email templating, for example to add a series of gigs
to an email:
a gig is a RepeatingField wtih keyword = "gig", which has several
occurences (RepeatingFieldItem),
which have several properties (RepeatingFieldItemProperty) like date,
venue, etc...

So:
MessageForm->embedRelations(RepeatingFields)
RepeatingFieldForm->embedRelations(Items)
RepeatingFieldItem->embedRelations(Properties)

# schema.yml
Message:
  actAs:              [Timestampable]
  columns:
    name:             string(255)
  relations:
    RepeatingFields:
      class:          RepeatingField
      type:           many
      local:          id
      foreign:        message_id
      cascade:     [delete]

RepeatingField:
  columns:
    message_id:       integer
    keyword:             string(255)
  relations:
    Message:
      class:          Message
      local:           message_id
      foreign:        id
      onDelete:     CASCADE
      onUpdate:    CASCADE
    Items:
      class:         RepeatingFieldItem
      local:          id
      foreign:        field_id
      type:           many
      foreignType:    one
      cascade:        [delete]

RepeatingFieldItem:
  columns:
    field_id:         integer
  relations:
    ParentField:
      class:         RepeatingField
      local:          field_id
      foreign:        id
      type:           one
      foreignType:    many
      onDelete:       CASCADE
      onUpdate:       CASCADE
      #cascade:        [delete]
    Properties:
      class:          RepeatingFieldItemProperty
      local:          id
      foreign:        item_id
      type:           many
      foreignType:    one
      cascade:        [delete]

RepeatingFieldItemProperty:
  columns:
    item_id:          integer
    keyword:          string(255)
    content:          clob
  relations:
    Item:
      class:          RepeatingFieldItem
      local:          item_id
      foreign:        id
      type:           one
      foreignType:    many
      onDelete:       CASCADE
      onUpdate:       CASCADE
      #cascade:        [delete]





On 9 août, 17:22, gimler <[email protected]> wrote:
> i have allready fix this bug in the trunk and some other problems like
> nested embeded ;)
>
> actually we test the actual state and make a release in the near time.
>
> greetings
> Gimler
>
> On Aug 9, 4:55 pm, Adam Divak <[email protected]> wrote:
>
> > Hi,
>
> > I'm trying to set up a form using
> >ahDoctrineEasyEmbeddedRelationsPluginand I think there is a small bug
> > in the code that renders the whole thing useless: whenever I save my
> > form, a new item is inserted (or at least Sf tries to insert a new
> > record and I get a Doctrine error). The problem is that the new
> > subform is still considered valid even though isNewFormEmpty returns
> > true.
>
> > I think the error is that an unset is flawed in the function doBind as
> > $this->embeddedForms[$containerName] isn't unset.
>
> > So, I think that line 249 of lib/form/ahBaseFormDoctrine.class.php
> > should read
>
> > unset($values[$containerName], $this->validatorSchema[$containerName],
> >                     $this->embeddedForms[$containerName]);
>
> > instead of
>
> > unset($values[$containerName], $this-
>
> > >validatorSchema[$containerName]);
>
> > Cheers,
> > Adam

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