Equal environments give different query results

0
I have deployed the same build of een app in a production and acceptance (on-premise) environment. In both environments the application behaves differently. When I login in both environments as a user with the same userroles on an equal dataset I get different results in a standard datagrid. To analyse this issue I retrieved the executed SQL queries from both logs. What I see is that the executed SQL differs which explains the difference in results. Questions is: What can be the reason(s) for the different queries Example queries Acceptance SELECT "loyalty$loyaltytransactie"."id",  "loyalty$loyaltytransactie"."transactiedatum",  "loyalty$loyaltytransactie"."_ccissuepoints",  "loyalty$loyaltytransactie"."_ccredeempoints",  "loyalty$loyaltytransactie"."transactiebedrag",  CASE WHEN TRUE THEN TRUE END AS "__sec_9"  FROM "loyalty$loyaltytransactie" WHERE ("loyalty$loyaltytransactie"."id" IN (SELECT "a6loyalty$loyaltytransactie_loyaltyschema"."loyalty$loyaltytransactieid"  FROM "loyalty$loyaltytransactie_loyaltyschema" "a6loyalty$loyaltytransactie_loyaltyschema"  INNER JOIN "loyalty$loyaltyschema_loyaltyprogramma" "a7loyalty$loyaltyschema_loyaltyprogramma" ON "a7loyalty$loyaltyschema_loyaltyprogramma"."loyalty$loyaltyschemaid" = "a6loyalty$loyaltytransactie_loyaltyschema"."loyalty$loyaltyschemaid"  INNER JOIN "loyalty$loyaltyprogramma_helper_participant" "a8loyalty$loyaltyprogramma_helper_participant" ON "a8loyalty$loyaltyprogramma_helper_participant"."loyalty$loyaltyprogrammaid" = "a7loyalty$loyaltyschema_loyaltyprogramma"."loyalty$loyaltyprogrammaid"  INNER JOIN "usagemanagement$employee_organization" "c5usagemanagement$employee_organization" ON "c5usagemanagement$employee_organization"."usagemanagement$organizationid" = "a8loyalty$loyaltyprogramma_helper_participant"."registration$participantid"  WHERE "c5usagemanagement$employee_organization"."usagemanagement$employeeid" = 3377699720529275))  ORDER BY "loyalty$loyaltytransactie"."transactiedatum" DESC,  "loyalty$loyaltytransactie"."id" ASC LIMIT 18 Production: SELECT "loyalty$loyaltytransactie"."id",  "loyalty$loyaltytransactie"."transactiedatum",  "loyalty$loyaltytransactie"."_ccissuepoints",  "loyalty$loyaltytransactie"."_ccredeempoints",  "loyalty$loyaltytransactie"."transactiebedrag",  CASE WHEN TRUE THEN TRUE END AS "__sec_20"  FROM "loyalty$loyaltytransactie"  WHERE "loyalty$loyaltytransactie"."id" IN (SELECT "a1loyalty$loyaltytransactie_terminal"."loyalty$loyaltytransactieid"  FROM "loyalty$loyaltytransactie_terminal" "a1loyalty$loyaltytransactie_terminal"  INNER JOIN "registration$terminal" ON "registration$terminal"."id" = "a1loyalty$loyaltytransactie_terminal"."registration$terminalid"  INNER JOIN "loyalty$loyaltytransactie_loyaltyschema" "a3loyalty$loyaltytransactie_loyaltyschema" ON "a3loyalty$loyaltytransactie_loyaltyschema"."loyalty$loyaltytransactieid" = "a1loyalty$loyaltytransactie_terminal"."loyalty$loyaltytransactieid"  INNER JOIN "loyalty$loyaltyschema_loyaltyprogramma" "a4loyalty$loyaltyschema_loyaltyprogramma" ON "a4loyalty$loyaltyschema_loyaltyprogramma"."loyalty$loyaltyschemaid" = "a3loyalty$loyaltytransactie_loyaltyschema"."loyalty$loyaltyschemaid"  INNER JOIN "loyalty$loyaltyprogramma_helper_participant" "a5loyalty$loyaltyprogramma_helper_participant" ON "a5loyalty$loyaltyprogramma_helper_participant"."loyalty$loyaltyprogrammaid" = "a4loyalty$loyaltyschema_loyaltyprogramma"."loyalty$loyaltyprogrammaid"  INNER JOIN "usagemanagement$employee_organization" "c2usagemanagement$employee_organization" ON "c2usagemanagement$employee_organization"."usagemanagement$organizationid" = "a5loyalty$loyaltyprogramma_helper_participant"."registration$participantid"  WHERE ("registration$terminal"."id" IN (SELECT "a7registration$terminals_participant"."registration$terminalid"  FROM "registration$terminals_participant" "a7registration$terminals_participant"  INNER JOIN "usagemanagement$employee_organization" "c6usagemanagement$employee_organization" ON "c6usagemanagement$employee_organization"."usagemanagement$organizationid" = "a7registration$terminals_participant"."registration$participantid"  WHERE "a7registration$terminals_participant"."registration$terminalid" = "registration$terminal"."id" AND "c6usagemanagement$employee_organization"."usagemanagement$employeeid" = 63050394783188966)) AND "registration$terminal"."omschrijving" = ? AND ((("c2usagemanagement$employee_organization"."usagemanagement$employeeid" = 63050394783188966))))  ORDER BY "loyalty$loyaltytransactie"."transactiedatum" DESC,  "loyalty$loyaltytransactie"."id" ASC LIMIT 18
asked
2 answers
3

 Mendix will create the same query in 2 environments for an xpath retrieve. The difference is in registration.terminal/omschrijving. Maybe the search field values are still in browser cache?

answered
1

Problem solved:
The issue was indeed caused by the registration.terminal/omschrijving search field. But not because of the caching.
The search field was defined as a dropdown over an association with multiple select.
Because some description values have value NULL or '', this value is shown once in the popup list and is automatically selected (why??).
Because of this weird autoselect the grid shows no data.

We added a constraint when entering a registration.terminal so that empty values are no longer possible.
When opening the datagrid all selectable registration.terminal now have a description value and none of them is automatically selected.

answered