Re: [symfony-users] [Symfony 2] A way to load fixtures in a user defined order, taking into account associations?

2011-03-03 Thread Gustavo Adrian
This would be only for entities that couldn't exists without its "parent". In terms of fixtures, having a Country and a State, a State needs to know about its Country when its loaded, but a Country doesn't need to know about its States. Knowing this, you'd only have to modify the State fixtures cla

Re: [symfony-users] [Symfony 2] A way to load fixtures in a user defined order, taking into account associations?

2011-03-03 Thread Christophe COEVOET
Le 03/03/2011 05:45, Gustavo Adrian a écrit : Actually playing around with the interface I've noticed that the order is numbered. Given that my app actually has not a "fixed" number of bundles (and, for instance, of fixtures), I had to look for another way of ordering, because this way I can't

Re: [symfony-users] [Symfony 2] A way to load fixtures in a user defined order, taking into account associations?

2011-03-02 Thread Gustavo Adrian
Actually playing around with the interface I've noticed that the order is numbered. Given that my app actually has not a "fixed" number of bundles (and, for instance, of fixtures), I had to look for another way of ordering, because this way I can't always know which number should I use for each bun

Re: [symfony-users] [Symfony 2] A way to load fixtures in a user defined order, taking into account associations?

2011-03-02 Thread oscar balladares
Good tip. I will tag this. 2011/3/2 Gustavo Adrian > Great! I didn't know it was a new interface for this. I'll give it a try > now. > > Thanks a lot guys! > > > On Wed, Mar 2, 2011 at 3:08 PM, Christophe COEVOET wrote: > >> Le 02/03/2011 19:06, Alex Pilon a écrit : >> >> I do not know very mu

Re: [symfony-users] [Symfony 2] A way to load fixtures in a user defined order, taking into account associations?

2011-03-02 Thread Gustavo Adrian
Great! I didn't know it was a new interface for this. I'll give it a try now. Thanks a lot guys! On Wed, Mar 2, 2011 at 3:08 PM, Christophe COEVOET wrote: > Le 02/03/2011 19:06, Alex Pilon a écrit : > > I do not know very much about symfony2 at the moment, however in symfony 1 >> if you load a

Re: [symfony-users] [Symfony 2] A way to load fixtures in a user defined order, taking into account associations?

2011-03-02 Thread Christophe COEVOET
Le 02/03/2011 19:06, Alex Pilon a écrit : I do not know very much about symfony2 at the moment, however in symfony 1 if you load a directory of fixtures in a single command such as symfony doctrine:data-load data/fixtures/pages.yml data/fixtures/layout.yml it doesn't matter what order you lo

Re: [symfony-users] [Symfony 2] A way to load fixtures in a user defined order, taking into account associations?

2011-03-02 Thread Christophe COEVOET
Le 02/03/2011 19:00, Gustavo Adrian a écrit : Yes, but my problem is the order in which they're loaded. Suppose I have: . Layout . Page (Has an association ManyToOne with Layout) In this case, if the fixtures from Page are loaded before the Layout ones, it would throw a constraint exception, b

Re: [symfony-users] [Symfony 2] A way to load fixtures in a user defined order, taking into account associations?

2011-03-02 Thread Alex Pilon
I do not know very much about symfony2 at the moment, however in symfony 1 if you load a directory of fixtures in a single command such as symfony doctrine:data-load data/fixtures/pages.yml data/fixtures/layout.yml it doesn't matter what order you load them, the relationships get create regardles

Re: [symfony-users] [Symfony 2] A way to load fixtures in a user defined order, taking into account associations?

2011-03-02 Thread Gustavo Adrian
Yes, but my problem is the order in which they're loaded. Suppose I have: . Layout . Page (Has an association ManyToOne with Layout) In this case, if the fixtures from Page are loaded before the Layout ones, it would throw a constraint exception, because each page has a Layout associated, which i

Re: [symfony-users] [Symfony 2] A way to load fixtures in a user defined order, taking into account associations?

2011-03-02 Thread Christophe COEVOET
Le 02/03/2011 18:47, Gustavo Adrian a écrit : Hi everyone, I'd like to know if there's a way to load fixtures from different bundles in order (without calling explicitly doctrine:data:load for each bundle by hand). I create the bundle's instances (in the "registerBundles" method on my AppKern

[symfony-users] [Symfony 2] A way to load fixtures in a user defined order, taking into account associations?

2011-03-02 Thread Gustavo Adrian
Hi everyone, I'd like to know if there's a way to load fixtures from different bundles in order (without calling explicitly doctrine:data:load for each bundle by hand). I create the bundle's instances (in the "registerBundles" method on my AppKernel) in the order it should be loaded. Is there a wa