Open
Description
Expected behavior
In some database, the comparison of field types is strict and must be explicitly converted. I have two models, Model A has a field of type UUID, and Model B also has a logical primary key (sourceId) stored as varchar. When generating SQL, they cannot be directly compared, and their field types must be converted. So, when using the select method, can I add conversion functions or specify the type? Moreover, when I specify it as a string, it throws the following error.
new QClass().select("source_id::string")
property [source_id::string] not found on xxxEntity for query - excluding it.
The automatically generated SQL looks like this:
select *
from a
where a.source_id = (select id
from b)
select *
from a
where a.source_id = (select id::string
from b)
```
Metadata
Metadata
Assignees
Labels
No labels