When creating a view in the database, we are encountering the following bug:
Trying to get a column of a table “A” related to a table “B” related to table “C” related to table “A” again… the interface seems to want to fetch things from “C” even though we specify “A”. “A” is the first table referenced in our view.
In the view designer, when selecting a column from Table A through the intermediate tables, we get an error like so:
In fact we’re trying to get ‘full_name’ in a different table… so the view designer is pointing its query to the wrong table.
Hi @Alex_Klein,
could you please share your scheme or create a reproducible demo and export view?
I tried to reproduce it, but seems I don’t quite understand how your schema looks like. It also depends on what the source table is.
Regards,
Stanislaw
Hi @stanislaw.grin if you can go into our app and look at the schema, would be great. App Id is AE4235E1-DBB7-C6F0-FF4A-E0378B0B2B00
In our views, I created student_packages_view_2
. The starting table is packages
, it’s a child of profiles
(profiles
has 1:M relations to packages
). There are two tables we need properties of: student_passes
& student_subscriptions
. Both of these tables relate to children of packages
(pack_passes
& pack_subscriptions
), and they also relate back to profiles
via the student_id
relation.
In the student_packages_view_2
, I want to get the objectId in the profiles
table which is the student_id. So I choose +objectId in the profiles
table. The designer lets me choose “pack_pass_id.student_passes[pass_id].student_id.objectId”. But when I choose that, the view gets the objectId for the pack_passes
table, NOT the profiles
table. Clearly this is a bug, otherwise why would the designer let me choose something from the profiles
table, only to return a property from pack_passes
?
“Export” is not available in our plan.
I tried to select the objectId
column and then chose the pack_pass_id.student_passes[pass_id].student_id.objectId
option. Here what I got:
As you can see, the column source is profiles
table, not the pack_passes
.
I’ve saved it.
Am I doing something wrong?
That objectId is actually an objectId from the pack_passes table. Even though it says “source: profiles”! If you try to add “full_name” from profiles using the same path (so pack_pass_id.student_passes[pass_id].student_id.full_name you will see the error.
Thanks. I was able to reproduce it now.
I’ve created an internal ticket for this issue, will keep you updated here.
Regards
The problem has been fixed. The new release is expected in about two weeks.
Hello @Alex_Klein
Problem fixed. Please let us know if the solution works for you.
Regards,
Inna
1 Like