You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It is a one-to-many relationship, that means each producer has many videos and each video has one producer. Inserting entries works like a charm, my test data looks as follows inside IndexedDB:
videos Table:
Key
Value
1
{ id: 1, name: "test1", producerId: 1 }
2
{ id: 2, name: "test2", producerId: 1 }
3
{ id: 3, name: "test3", producerId: 2 }
producers Table:
Key
Value
1
{ id: 1, name: "prod1", videoIds: [1, 2] }
2
{ id: 2, name: "prod2", videoIds: [3] }
Now I want to request an entry from the videos table with its respective producer in the result as follows:
I already tried and tested a lot on my end but can't seem to find a bug in my application. Also, I copied and ran the example from the official documentation which gave the same results, meaning the author variable in that case was still the user id rather than the user object.
Am I doing something wrong or is there possibly a bug?
The text was updated successfully, but these errors were encountered:
I have an application with two tables named
videos
andproducers
respectively. The models are as follows:It is a one-to-many relationship, that means each producer has many videos and each video has one producer. Inserting entries works like a charm, my test data looks as follows inside IndexedDB:
videos
Table:{ id: 1, name: "test1", producerId: 1 }
{ id: 2, name: "test2", producerId: 1 }
{ id: 3, name: "test3", producerId: 2 }
producers
Table:{ id: 1, name: "prod1", videoIds: [1, 2] }
{ id: 2, name: "prod2", videoIds: [3] }
Now I want to request an entry from the
videos
table with its respective producer in the result as follows:The result however looks like this:
If I try it the other way around it does work:
The result is:
I already tried and tested a lot on my end but can't seem to find a bug in my application. Also, I copied and ran the example from the official documentation which gave the same results, meaning the
author
variable in that case was still the user id rather than the user object.Am I doing something wrong or is there possibly a bug?
The text was updated successfully, but these errors were encountered: