Skip to content

使用 whereLT decimal 类型列的问题 #3915

@Weishan-Allen

Description

@Weishan-Allen

Go version

1.23.2

GoFrame version

2.7.4

Can this bug be reproduced with the latest release?

Option Yes

What did you do?

使用

var v []*entity.V
WhereLT(dao.x.Columns().a, gdb.Raw(dao.x.Columns().b)).Scan(&v)

数据库 a,b 均为 decimal 类型 且 a为0.00 并且b 是大于0.00的任意数
且表只有一条记录(应该关系不大)

What did you see happen?

row 返回为0条记录

What did you expect to see?

row 返回为1

如果采用WhereGT 则可以正常返回
var v []*entity.V
WhereGT(dao.x.Columns().b, gdb.Raw(dao.x.Columns().a)).Scan(&v)

数据库 a,b 均为 decimal 类型 且 a为0.00 并且b 是大于0.00的任意数
猜测应该是和 0值有关

Metadata

Metadata

Assignees

Labels

bugIt is confirmed a bug, but don't worry, we'll handle it.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions