Closed pgrill79 closed 1 week ago
Can you provide the "descendants" widget config? Is it JSONata or a query?
It is a query:
Maybe as notice: it has two FK, which points to the same table - maybe this causes issues ? (It worked in the release 5.1.25)
This is the query behind:
SELECT "a1"."animalnr" as "Animal Nr", COALESCE("a1"."origin",'') || "a1"."eartag" as "Ear tag", "a1"."id" as "Name", "sex"."name" as "Sex", "a1"."color" as "Color", "a1"."birth" as "Date of birth", CASE WHEN "a1"."deceased" THEN 'Yes' ELSE 'No' END as "Deceased", a2.id AS "Other parent" FROM relationsrecursive r1 INNER JOIN animal a1 ON root = a1.id INNER JOIN relationsrecursive r2 ON r1.root= r2.root INNER JOIN animal a2 ON r2.id = a2.id LEFT JOIN sex on a1.fk_sex=sex.id WHERE r1.id = ${animalId} AND length(r1.relativerelation) = 1 AND length(r2.relativerelation) = 1 AND r1.relativerelation != r2.relativerelation
this was a side effect of supporting tables like
CREATE TABLE something (
column1,
column2,
column3,
PRIMARY KEY (column1, column2)
)
where the first PK column links to /db/table/key1_key2
the condition was applied too broadly such that it broke in case of this query. Now, it is only applied to the table widget (select * from table) on the table page
Links in table were not resolved correctly in PreRelease 5.130
On the left side you see the source running with 5.1.25 on the right side with 5.1.30:
Also the link itself look strange and does not work:
http://localhost:19030/#/q_animal_getDescendents/46/0_0