Gorm can i do count with filter from struct?

Your Questioncan i do .Count with filter from struct? like how .Find workswith .Find i can dodb.Find(&dest, &inp...

Gorm How to JOIN with a table which have a reserved word as its table name?

Your QuestionI can't JOIN that table. When I use Joins("`lines`"), it still generate as JOIN lines. It ate the ` . So it...

Gorm Observer model

Your Questionhi, I'm looking for a solution to listen for the events trigger model ( created, updated, deleted, creating...

Gorm default value for slice

Default value for sliceIs there a way to declare a default value for slice like this?type SoftwareComponent struct { ...

Gorm Default value with slice

Your QuestionIs there a way to declare a default value for slice like this?type SoftwareComponent struct { Id ...

Gorm can i use association feature without create foreignkey?

Your Questioncan i use association feature without create foreignkey?eg: Auto Create/Update、Eager LoadingThe document yo...

Gorm Preload self-referential belongs to

GORM Playground Linkhttps://github.com/go-gorm/playground/pull/90DescriptionGORM v0.2.33I have a struct like this:type U...

Gorm How to avoid creating a new record if it already exist in Many2Many relationship?

Your Questiongorm ver.: gorm.io/gorm v1.23.4golang ver.: go1.17Hi, I met a question when I use Many2Many relationship. F...

Gorm Many2many error ON CONFLICT DO UPDATE postgresql

GORM Playground Linkhttps://github.com/go-gorm/playground/pull/426DescriptionMany2many error on conflictI use many2many ...

Gorm 多级一对一关系表使用Joins查询不到数据

多级一对一关系表使用Joins查询出错使用 #3282 问题的回复处理报错, 源码内好像只有对主表的关联关系有判断加连表sql又查询不到结果, 我看源码对字段解析好像只有一级表关系使用"__"做处理. 这是我的表接口以及具体查询type U...

Gorm [performance] bulk create very slow when logging enabled

GORM Playground Linkhttps://github.com/go-gorm/playground/pull/1DescriptionBulk create (200 records) is very slow due to...

Gorm Strange memory consumption, that is slowly increasing

GORM Playground Linkhttps://github.com/go-gorm/playground/pull/161DescriptionI am using Gorm a lot (v1, now v2), but I s...

Gorm Stale action is stuck in an infinite loop

GORM Playground LinkIt looks like there is a problem with the new version of the stale action, causing the action to kee...

Gorm There is a problem with primary key auto-filling

GORM Playground Linkhttps://github.com/go-gorm/playground/pull/1DescriptionWhen the primary key data type is int(11),Cre...

Gorm Empty QueryClauses breaks association query

GORM Playground Linkhttps://github.com/go-gorm/playground/pull/492Descriptionassociation append unnecessary ’where' cla...

Gorm How to set a timestamp attribute just like updated_at / created_at

Your QuestionHi, Thanks for the awesome library.In the following example, I would like notifications_last_checked_at act...

Gorm 对mysql进行删除操作,删除后进行查询,查询出的结果不对。

Your Question前端触发,对mysql的数据进行同步(删除过时记录)。在同步后,马上进行查询操作。同一个页面的两次请求。发现查询的数据不对,比较少,多次刷新后正常。正常后再刷新数据又不齐。感觉是删除时对mysql加了锁。请问是否有...

Gorm Return richer error message

The declaring of my model is error, which make schema.ParseWithSpecialTableName method return error. But, Execute call s...

Gorm GORM Performance comparison with other ORMS/Tools

Your Question@jinzhu I just wanted to show you this: https://github.com/efectn/go-orm-benchmarks It seems that Gorm is a...

Gorm how to use multi once forget query in one connection?

Your QuestionIn other words, in same one connection, i can use query different tables using multiple sqldb.Connection(fu...
上一页 下一页
.