-
I am using pydantic_factories to generate random data following a nested model and having some problems with generating unique instances with .batch() command. The model is quite nested but I will describe it using a simple example. This is a simple nested model:
Dataset and File have 1-to-many relationship. One dataset can have multiple files. Hence I would like to create many file names for one dataset. I tried using this to manage cardinality:
However, it returns the same values for File. So, my question is, how can I create different File instances? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Okay, my bad. There was a mistake in my custom factory field definitions. It is solved. |
Beta Was this translation helpful? Give feedback.
Okay, my bad. There was a mistake in my custom factory field definitions. It is solved.