Hi 🙂
I am having a difficulty with the join mechanism: apparently if you hold a reference to a table and you join them
object UserQuestionTable : LongIdTable("user_question") {
val uid = reference("uid", UserTable, onDelete = ReferenceOption.CASCADE)
val oid = optReference("oid", OtherTable)
val allow = bool("allow").default(true)
}
but you have a complex join that is not just the reference ids equal
UserQuestionTable.join(OtherTable, JoinType.LEFT, additionalConstraint = {
(OtherTable.id inList otherIds) and (
(OtherTable.id eq UserQuestionTable.oid) or (
UserQuestionTable.oid.isNull() and (UserQuestionTable.allow eq true)
)
)
})
but the output query is added a
user_question.oid = other.id
and then the rest of the additional constraint query
what can I do to remove this addition?