Yes, although it isn't the current version. None of the examples
really helped. Although the 'blogpost' example has the same structure,
the fact that the 'row keys' and values of 'name' in the 'tags' data
are identical conceals which is being referenced.

With some more reflection, it's the 'row' terminology in the error
message which led me astray.

What one is doing with the data fixtures is instantiating objects and
making them persistent. In the absence of pointers in YAML, one uses
instance names to refer to other objects.

One could then describe the structure as:

<class>:
  <instance name>:
    <property>: <value> | <instance name>

(Leaving aside array-valued properties)

In this case the error would refer to a missing instance name. What do
you think?

On May 11, 6:58 pm, Tom Haskins-Vaughan <t...@templestreetmedia.com>
wrote:
> Did you try the symfony + Doctrine book?
>
> http://www.symfony-project.org/doctrine/1_2/en/05-Data-Fixtures
>
>
>
> On Tue, May 11, 2010 at 12:43 PM, grahamj42 <graham...@orange.fr> wrote:
> > Ah, when I saw 'invalid row key' in the error message, I immediately
> > thought of the primary key of the table, rather than the fixture tag.
> > Another issue stemming from lack of documentation.
>
> > Thanks, again.
>
> > On May 11, 4:45 pm, Tom Haskins-Vaughan <t...@templestreetmedia.com>
> > wrote:
> >> It's not really a case of concatenating. It's just a case of using the
> >> key of the parent object. It could be anything really.The following
> >> would work too:
>
> >> WttlistBox:
> >>  no_particular_key:
> >>    name: Barnham
> >>    WttlistSimulation: pc-rail
> >>  simsig-bristol:
> >>    name: Bristol
> >>    WttlistSimulation: simsig
>
> >> WttListWtt:
> >>   pc-rail-barnham-1930-weekday:
> >>     WttlistBox: no_particular_key
> >>     period: 1930 MF
> >>     year: 1930
>
> >> On Tue, May 11, 2010 at 10:20 AM, grahamj42 <graham...@orange.fr> wrote:
> >> > Tom,
>
> >> > Thanks, that fixed the key error. I had to change the date value to
> >> > '1930-01-01' (including the quotes) and then it loaded.
>
> >> > This is an area that really needs documenting; I would never have
> >> > thought to concatenate the keys at the two levels above, and the code
> >> > is pretty opaque.
>
> >> > The aim of 'less magic' in Symfony 2.0 is a good one, in my opinion.
>
> >> > Regards,
> >> > Graham
>
> >> > On May 11, 2:28 pm, Tom Haskins-Vaughan <t...@templestreetmedia.com>
> >> > wrote:
> >> >> Try this:
>
> >> >> WttListWtt:
> >> >>   pc-rail-barnham-1930-weekday:
> >> >>     WttlistBox: pc-rail-barnham
> >> >>     period: 1930 MF
> >> >>     year: 1930
>
> >> >> On Mon, May 10, 2010 at 5:32 PM, grahamj42 <graham...@orange.fr> wrote:
> >> >> > During my tests, I specified all the attributes of the relations,
> >> >> > although I know I don't need to be so verbose.
>
> >> >> > ----
>
> >> >> > # schema.yml
> >> >> > # $Date: 2010-05-10 15:00:39 +0200 (Mon, 10 May 2010) $
> >> >> > # $Revision: 47 $
> >> >> > #
> >> >> > options:
> >> >> >  type: MyISAM
>
> >> >> > WttlistSimulation:
> >> >> >  actAs:
> >> >> >    sluggable:
> >> >> >      fields: [name]
> >> >> >  columns:
> >> >> >    name: { type: string(32), notnull: true }
>
> >> >> > WttlistBox:
> >> >> >  actAs:
> >> >> >    sluggable:
> >> >> >      fields: [name]
> >> >> >  columns:
> >> >> >    name: { type: string(64), notnull: true }
> >> >> >    simulation_id: { type: integer, notnull: true }
> >> >> >  relations:
> >> >> >    WttlistSimulation:
> >> >> >      class: WttlistSimulation
> >> >> >      local: simulation_id
> >> >> >      foreign: id
> >> >> >      foreignAlias: WttlistBoxes
> >> >> >      foreignType: many
>
> >> >> > WttlistWtt:
> >> >> >  actAs:
> >> >> >    sluggable:
> >> >> >      fields: [period]
> >> >> >  columns:
> >> >> >    box_id: { type: integer, notnull: true }
> >> >> >    period: { type: string(64), notnull: true }
> >> >> >    year: { type: date, notnull: true }
> >> >> >  relations:
> >> >> >    WttlistBox:
> >> >> >      class: WttlistBox
> >> >> >      local: box_id
> >> >> >      foreign: id
> >> >> >      foreignAlias: wtts
> >> >> >      foreignType: many
> >> >> > ----
>
> >> >> > If I uncomment the last section of data.yml, I get an error ' Invalid
> >> >> > row key specified: (wttlist_box) barnham, referred to in (wttlist_wtt)
> >> >> > pc-rail-barnham-1930-weekday'
>
> >> >> > ----
>
> >> >> > # data.yml
> >> >> > # $Date: 2010-05-10 15:00:39 +0200 (Mon, 10 May 2010) $
> >> >> > # $Revision: 47 $
> >> >> > #
> >> >> > WttlistSimulation:
> >> >> >  pc-rail:
> >> >> >    name: PC-Rail
> >> >> >  simsig:
> >> >> >    name: SimSig
>
> >> >> > WttlistBox:
> >> >> >  pc-rail-barnham:
> >> >> >    name: Barnham
> >> >> >    WttlistSimulation: pc-rail
> >> >> >  simsig-bristol:
> >> >> >    name: Bristol
> >> >> >    WttlistSimulation: simsig
>
> >> >> > #WttListWtt:
> >> >> > #  pc-rail-barnham-1930-weekday:
> >> >> > #    WttlistBox: barnham
> >> >> > #    period: 1930 MF
> >> >> > #    year: 1930
>
> >> >> > ----
>
> >> >> > Data load works fine with the Grandchild record commented out as
> >> >> > above. This frustrated me for a number of hours. The documentation on
> >> >> > expressing relations in data fixtures is not very clear.
>
> >> >> > --
> >> >> > 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 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
>
> >> >> --
> >> >> 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 symfony-users@googlegroups.com
> >> >> To unsubscribe from this group, send email to
> >> >> symfony-users+unsubscr...@googlegroups.com
> >> >> For more options, visit this group 
> >> >> athttp://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 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
>
> >> --
> >> 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 symfony-users@googlegroups.com
> >> To unsubscribe from this group, send email to
> >> symfony-users+unsubscr...@googlegroups.com
> >> For more options, visit this group 
> >> athttp://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 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
>
> --
> 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 symfony-users@googlegroups.com
> To unsubscribe from this group, send email to
> symfony-users+unsubscr...@googlegroups.com
> For more options, visit this group 
> athttp://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 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