You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I expect the orm to use "join" when executing the query if the relationship between the tables is @manytoone, because the row will always remain one for the original entity.
Actual behavior
ORM executes incremental queries instead of merging everything at once. I searched the documentation and examples for this case, but I didn't find a solution. Maybe I'm not using the library correctly.
Jimmer Version
0.9.2.4
JDK Version
23
Database
PostgreSQL
OS
Windows
Expected behavior
I expect the orm to use "join" when executing the query if the relationship between the tables is @manytoone, because the row will always remain one for the original entity.
Actual behavior
ORM executes incremental queries instead of merging everything at once. I searched the documentation and examples for this case, but I didn't find a solution. Maybe I'm not using the library correctly.
Description
Function for search entity
Next function that use call
find
(this for example, maybe this is not the best example)Reproduction steps
use entities with @manytoone and sequentially combine them through Fetcher. For example:
The website has an owner (user_id), the owner has a role(role_id)
Generated SQL
2025-01-20T18:51:02.735+02:00 INFO 4600 --- [nio-8080-exec-4] o.b.jimmer.sql.runtime.ExecutorForLog : Execute SQL===>
Purpose: QUERY
SQL: select distinct
tb_1_.ID,
tb_1_.id_user
from websites tb_1_
where
tb_1_.ID = ? /* 6 /
and
tb_1_.deleted_at is null
JDBC response status: success
Time cost: 11ms
<===Execute SQL
2025-01-20T18:51:02.749+02:00 INFO 4600 --- [nio-8080-exec-4] o.b.jimmer.sql.runtime.ExecutorForLog : Execute SQL===>
Purpose: LOAD
SQL: select
tb_1_.ID,
tb_1_.id_role
from users tb_1_
where
tb_1_.ID = ? / 9 /
JDBC response status: success
Time cost: 2ms
<===Execute SQL
2025-01-20T18:51:02.754+02:00 INFO 4600 --- [nio-8080-exec-4] o.b.jimmer.sql.runtime.ExecutorForLog : Execute SQL===>
Purpose: LOAD
SQL: select
tb_1_.ID,
tb_1_.identity_name,
tb_1_.PERMISSIONS
from users_roles tb_1_
where
tb_1_.ID = ? / 6 */
JDBC response status: success
Time cost: 3ms
<===Execute SQL
Relation Model
No response
Screenshots
No response
Logs
No response
The text was updated successfully, but these errors were encountered: