xorm uuid兼容问题 #1304
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
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: xorm/xorm#1304
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 源码里,发现有一个uuid 类型。默认情况下 mssql 和mysql 都存储Varchar(40)。这个转换看上去没什么问题。但在实际使用中,我发现这个是不通用的,mssql 默认uuid 存为uniqueidentifier。
models 中定义uuid 字段格式如: Guid string 'json:"Guid" xorm:"not null pk uuid 'Guid'"`
问题1,如果我使用xorm 的uuid 这对我mssql现有的 uniqueidentifier字段是不能兼容的。
问题2,如果我不使用xorm 的uuid ,使用uniqueidentifier定义models 字段,无法兼容其它数据库。
我已经解决了这个问题,不知道为什么,没有人遇到一样的需求。是我的问题本身有问题吗?