bitemyapp/esqueleto
在 GitHub 查看Calling `sum_` on an `Int` column and trying to use the result as an `Int` leads to a marshal error
Open
#82 建立於 2018年3月23日
bughelp wantedneeds discussion
倉庫指標
- Star
- (395 star)
- PR 合併指標
- (30 天內沒有已合併 PR)
描述
It appears that (at least in Postgresql), summing a list of ints gives back a numeric. So when you call sum_ from esqueleto on an Int column and use the result as an Int you get a persist marshal error. IMO this should probably be solved on esqueleto's end, by either inserting an explicit cast or by restricting the return type of sum_ to ones which will not raise a marshal error.