0

Im trying to create dataset for unit test.

<dataset>
    <team id="1" lead_id="1" />
    <player id="1" team_id="1" />
</dataset>

Player has reference to Team table and vice versa. So when I run test (no matter what is created first, team or player), it returns exception, because ForeignKey requirements was not met.

How can I fix it? Maybe disable FK for data import or dataset.xml allows to update fields in some way.

flgdev
  • 467
  • 1
  • 6
  • 17

1 Answers1

0

Yes, will need to drop one of those DB constraints. If there is a feature implementation you find that works, please add it here: https://sourceforge.net/p/dbunit/feature-requests/

Jeff
  • 956
  • 8
  • 10