被xorm坑死 #2189
Labels
No Label
backport/done
backport/v1
blocked
db
oracle
db
sqlserver
duplicate
feature
cache
frontport/done
frontport/main
invalid
kind
breaking
kind
bug
kind
build
kind
dependencies
kind
docs
kind
driver
kind
enhancement
kind
feature
kind
performance
kind
proposal
kind
question
kind
refactor
kind
testing
need
feedback
need
test
proposal:accepted
RaspBerry Pi
regression
skip-changelog
upstream
wip
wontfix
No Milestone
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: xorm/xorm#2189
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
这是表
这是结构体
查出数据,居然不能绑定到结构体上,老版本的xorm可以,项目升级后,坑死,查了半天原因。
有两种方式解决这个问题
xorm:"'WeekDay'"
以前老的框架,什么都没做,同样的表结构,同样的结构体,都能查出数据并且正确赋值,这次升级,被坑的远不止这一个,大概列了有如下:
sessionCount := *session
这种方式,结果全部出问题LIMIT 0
,现在居然默认值是这个,有何意义.Join("dbname.tbname xx")
以前这种用数据库名.表名加别名的方式程序正常,框架升级后就芭比Q了字段映射默认是snake mapper,你如果用了samemapper,要一直用。这个逻辑一直都没有变。
什么都没变,就框架版本升级了下而已
Search SetMapper/SetColumnMapper/SetTableMapper in your codebase.