Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

no primary key for col #101

Open
lxy1078014075 opened this issue Apr 12, 2021 · 2 comments
Open

no primary key for col #101

lxy1078014075 opened this issue Apr 12, 2021 · 2 comments

Comments

@lxy1078014075
Copy link

internal/statments/values的Value2Interface函数在结构体转换的时候一直报"no primary key for col xxx"的错误
看了一下源码,结构体部分一定会进入!col.SQLType.IsJson()分支,如果把这个分支放在最后,程序就能够正常的进行

@ahojcn
Copy link

ahojcn commented Jun 25, 2022

type User struct {
    Address Address `xorm:"json"`
}

col.SQLType.IsJson() == true

@Sadio94
Copy link

Sadio94 commented Jul 11, 2022

type User struct {
    Address Address `xorm:"json"`
}

col.SQLType.IsJson() == true
what is mean?
and where i can read the example?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants