0

I'm writing some additional fixtures for a project, and I have a question about how to use the natural keys.

In another fixture, the natural key for area is defined like so:

"fields": {
            "area": [
                "auckland",
                "NZ"
            ],

However, I'm writing a fixture for a model with a ManyToMany relation, so how do I include multiple two object keys? the following doesn't seem to work.

"fields": {
            "areas": [
                "auckland",
                "NZ",
                "sydney",
                "AUS"
            ],
Darkstarone
  • 4,590
  • 8
  • 37
  • 74

1 Answers1

0

Ok, turns out its super straightforward:

"fields": {
            "areas": [
                [
                    "auckland",
                    "NZ",
                ],
                [
                    "sydney",
                    "AUS"
                ]
            ],
Darkstarone
  • 4,590
  • 8
  • 37
  • 74