-
Notifications
You must be signed in to change notification settings - Fork 212
Select on join and condition #857
-
Does Mybatis Dynamic support a sub select inside and() method as a join() condition?
SELECT ...
FROM table1 t1
JOIN table2 t2 ON t2.id = t1.id AND t2.value = (SELECT max(column) FROM table3)
How it should be defined in this case?
select(...)
.from(table1, "t1")
.join(table2, "t2").on(t2.id, equalTo(t1.id), and(t2.value, isEqualTo(select(max(column)).from(table3)))
Same and() condition seems allowed with where() clause.
Beta Was this translation helpful? Give feedback.
All reactions
Answered by
jeffgbutler
Oct 16, 2024
This is supported in the 2.0.0 version. It's not released yet, but it is in the SNAPSHOT version currently.
Replies: 1 comment 1 reply
-
This is supported in the 2.0.0 version. It's not released yet, but it is in the SNAPSHOT version currently.
Beta Was this translation helpful? Give feedback.
All reactions
1 reply
-
Will check v2.0.0 and wait for release. Thanks for the great tool!
Beta Was this translation helpful? Give feedback.
All reactions
Answer selected by
ramadom
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment