Closed kbruegge closed 1 year ago
I can confirm this. A fix would be great.
One thing I forgot to mention. The relation can point to multiple rows in the other collection. See the attached screenshot from the PocketBase admin interface.
Relation expansion has a passing integration test here
I can see that this currently only works for a single record relation.
Can you confirm that your issue is caused only when there is a 'multi' relationship to a 'list of multiple record' relationships?
The PR #66 should fix this.
Can you please check if the following behaviour is what you want to see:
With PR #66 the value of Record.expand["xxx"] can either be any of
This is somewhat "highly dynamically typed" in a mapped 1:1 as it simply comes out of pocketbase.
Hi. Thanks for the PR. I will test it once I get back to work next tuesday.
PR #66 does indeed fix it. Thank you.
Hi there,
I've been trying to use
client.collection("foo").get_list
andclient.collection("foo").get_full_list
together with theexpand
query parameter.See the documentation of the JS SDK here: https://pocketbase.io/docs/working-with-relations/#expanding-relations
Apparently the
load
method of the "BaseModel" class expects a dict but receives a list. I added some print statements.Here is the output:
Which further results in the following exception
Thanks for working on this by the way!