-
Notifications
You must be signed in to change notification settings - Fork 3
1:m or n:m relationships #4
Copy link
Copy link
Open
Labels
enhancementNew feature or requestNew feature or request
Description
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?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request