Is it possible to define multiple references to other entities?
In this example i want to define a 1:m relationship (1 Object has n images)
[
{
"target_class": "database.model:Image",
"data": [
{
"path": "path/to/some/picture",
"title": "01"
}
]
},
{
"target_class": "database.model:ImageContainer",
"data": [
{
"id": 1,
"!refs": {
"images": {
"target_class": "database.model:Image",
"criteria": {
"title": "01"
}
}
}
}
]
}
]
When i try to read the new entities from the json file i get the following type error:
TypeError: Incompatible collection type: Image is not list-like
Thats because my ImageContainer object expects a list of Image objects as image property.
I couldn't find anything in the documentation about this topic and i tried several things to make it work. Do you have any suggestions or is it not implemented yet?
Is it possible to define multiple references to other entities?
In this example i want to define a 1:m relationship (1 Object has n images)
When i try to read the new entities from the json file i get the following type error:
TypeError: Incompatible collection type: Image is not list-likeThats because my ImageContainer object expects a list of Image objects as image property.
I couldn't find anything in the documentation about this topic and i tried several things to make it work. Do you have any suggestions or is it not implemented yet?