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
Upgrading from 0.8 to 0.15 the following statement threw an error:
Island.find{Islands.id neq 0}.forEach { island ->
IslandInfo.kt: (58, 40): None of the following functions can be called with the arguments supplied:
public final infix fun ExpressionWithColumnType.neq(other: ???): Op defined in org.jetbrains.exposed.sql.SqlExpressionBuilder
public final infix fun ?, S2 : EntityID?> ExpressionWithColumnType<in EntityID>.neq(other: Expression<in EntityID>): Op defined in org.jetbrains.exposed.sql.SqlExpressionBuilder
Since "eq" still worked but "neq" didn't, I looked at the source code. I copied one of the "eq" extensions like this: infix fun <T:Comparable<T>> Column<EntityID<T>>.neq(t: T?) : Op<Boolean> { if (t == null) { return isNull() } return NeqOp(this, wrap(t)) }
into my code and that seems to make it work.
I notice that "greater" has the same problem as "neq".
Is there a "new" way of doing this, or were these dropped for a reason?
The text was updated successfully, but these errors were encountered:
Upgrading from 0.8 to 0.15 the following statement threw an error:
Island.find{Islands.id neq 0}.forEach { island ->
IslandInfo.kt: (58, 40): None of the following functions can be called with the arguments supplied:
public final infix fun ExpressionWithColumnType.neq(other: ???): Op defined in org.jetbrains.exposed.sql.SqlExpressionBuilder public final infix fun ?, S2 : EntityID?> ExpressionWithColumnType<in EntityID>.neq(other: Expression<in EntityID>): Op defined in org.jetbrains.exposed.sql.SqlExpressionBuilder
Since "eq" still worked but "neq" didn't, I looked at the source code. I copied one of the "eq" extensions like this:
infix fun <T:Comparable<T>> Column<EntityID<T>>.neq(t: T?) : Op<Boolean> { if (t == null) { return isNull() } return NeqOp(this, wrap(t)) }
into my code and that seems to make it work.
I notice that "greater" has the same problem as "neq".
Is there a "new" way of doing this, or were these dropped for a reason?
The text was updated successfully, but these errors were encountered: