Scala Squeryl ORM无法使用Long、bigint和操作符?
斯奎尔只是今天没有。我犯了一个严重的错误,到目前为止我一直没有成功解决 Postgres引发的错误:Scala Squeryl ORM无法使用Long、bigint和操作符?,scala,squeryl,Scala,Squeryl,斯奎尔只是今天没有。我犯了一个严重的错误,到目前为止我一直没有成功解决 Postgres引发的错误: Caused by: java.lang.RuntimeException: Exception while executing statement : ERR OR: operator does not exist: character varying = bigint Hint: No operator matches the given name and argument type(s
Caused by: java.lang.RuntimeException: Exception while executing statement : ERR
OR: operator does not exist: character varying = bigint
Hint: No operator matches the given name and argument type(s). You might need
to add explicit type casts.
Position: 722
我不知道为什么会抛出这个错误,只是我在bigint字段中存储了一个Scala Long,然后对它运行查询。我做错什么了吗
所有这些都是基于Squiryl ORM的,所以我有90%的信心我的类型是正确的。我的代码也可以编译
编辑
这就是我用来查询的代码。不多
from(DB.relays)(r =>
where((r.userId === userId))
select (r))
我是一个可怕的人 在这方面花了将近两个小时,但这一切都归结为一个有害的数据库进化 我不知道,我很困惑它是如何消失的,但是
userId
列实际上是一个text
字段。直到开始打印表结构,我才发现错误
我很震惊它是如何在没有被发现的情况下进入的,因为我疯狂地输入了没有错误的记录。当你做了那么糟糕的事情时,需要真正的性格力量来承认。向上投票。谢谢你善良的一位,我的眼泪不再那么咸了。