Did not try it, but should work: add those data (including their ids)
to your fixtures, they should get inserted as long as there's no key
conflict, and you can be sure what the ids are.

On Tue, Jul 28, 2009 at 12:14, Stephen Melrose<[email protected]> wrote:
>
> Hey,
>
> I am just setting up, or at least trying to set up, some Propel unit
> tests for an application we're developing.
>
> I've read the documentation online and I see how this is done and how
> you load test data, however I have a problem in that some of our
> database tables contain static data purely for reference and to reduce
> duplication.
>
> For performance, we have hard coded the IDs of this data into the
> relevant model classes as constants, because they are after all
> constant data.
>
> Here in lies the problem. If I run my unit tests multiple times,
> although the sfPropelData object wipes the database, it doesn't reset
> the primary key auto increment, and it throws off our application.
>
> Does anyone know how to do this?
>
> Ideally, would would be best is to run a propel:insert-sql to
> completely reset the database, then load the data in. I tried doing
> this using exec() and shell_exec(), but all I got was an output of
> "Could not start" from the CLI.
>
> Thanks.
> >
>

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