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
object CommentTable : LongIdTable() {
val post = reference("post", PostTable)
val parent = reference("parent", CommentTable).nullable()
val author = reference("author", UserTable)
val content = text("content")
val created = datetime("created")
val updated = datetime("updated")
}
Code:
val comments =CommentTable.select { CommentTable.post eq id and (CommentTable.parent eq null) }
Error:
Overload resolution ambiguity:publicopenfun <T:Comparable<TypeVariable(T)>, E : EntityID<TypeVariable(T)>?> ExpressionWithColumnType<TypeVariable(E)>.eq(t:TypeVariable(T)?): Op<Boolean> defined in org.jetbrains.exposed.sql.SqlExpressionBuilderpublicopenfun <T> ExpressionWithColumnType<TypeVariable(T)>.eq(t:TypeVariable(T)): Op<Boolean> defined in org.jetbrains.exposed.sql.SqlExpressionBuilder
Additionally, when setting this field:
it[CommentTable.parent] = payload.parent
Type mismatch: inferred type isLong? but TypeVariable(S) was expected
The text was updated successfully, but these errors were encountered:
As a workaround for select expression, you may use the following:
val comments =CommentTable.select { (CommentTable.post eq id) andCommentTable.parent.isNull() }
But it's not clear what's the problem with setting this field. What is payload? Could you provide a minimal reproducible example for this (preferably in a separate issue)?
Definition:
Code:
Error:
Additionally, when setting this field:
The text was updated successfully, but these errors were encountered: