Incorrect Data Type between Select Value and Its References

The value column in Meta_Select_Item is of String/Character type, while its references like in project (status_select, project_type_select) are of numeric/Integer type.

This resulted in an error, when I was trying to get the list of projects by status using the following query.

SELECT “Meta Select Item”.“title” AS “title”, count(*) AS “count”
FROM “public”.“project_project”
LEFT JOIN “public”.“meta_select_item” “Meta Select Item” ON “public”.“project_project”.“status_select” = “Meta Select Item”.“value”
LEFT JOIN “public”.“meta_select” “Select” ON “Meta Select Item”.“select_id” = “Select”.“id”
WHERE “Select”.“name” = ‘project.status.select’
GROUP BY “Meta Select Item”.“title”
ORDER BY “Meta Select Item”.“title” ASC

So I had to explicitly cast the column to get the query running.

Is this something that is going to be addressed in future release?

Hello.

To keep the selection feature flexible it’s important to keep the value column of meta_select_item as string. So yes, need to cast the value while executing the query if selection field is of type integer.
But for your information, if you are only referring the project.statusSelect field, there are some updates in latest release, It’s been referred as a separate entity as referenced in project.

Thank you.