Hi @all
I wrote a rails app and now I want to test it.
For this, I’d like to use test fixtures wich I created in .yml-files.
In my model, each object can include another object. This
is done by a foreign key. Unfortunately, there is always an error
becaus of a
foreign key constraint which fails. Does anybody knows how to solve this
problem?
My .yml-file looks like this:
one:
id: 1
person_id: 1
father: null
person_type: parent
two:
id: 2
person_id: 2
father: 1
person_type: child
If I only insert the first one, it works…
Thanks for your help!