Open xiucaiwu opened 5 months ago
你的所有代码我拿过来测试的结果却是user_id:2,live_id:266,报名了
。
Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑🤝🧑👫🧑🏿🤝🧑🏻👩🏾🤝👨🏿👬🏿
I took all your codes and tested them, but the result was
user_id: 2, live_id: 266, registered
.
你的所有代码我拿过来测试的结果却是
user_id:2,live_id:266,报名了
。
我的orm和gf都是2.7.1的
require (
github.com/gogf/gf/contrib/drivers/mysql/v2 v2.7.1
github.com/gogf/gf/v2 v2.7.1
)
而且我发现打印_liveHaveSignUp的结果中target_id存放的是内存地址,但是collection_id却不是
_liveHaveSignUp:[]map[string]interface {}{map[string]interface {}{"collection_id":1, "target_id":0x10a}}
按理说不应该存放内存地址的
Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑🤝🧑👫🧑🏿🤝🧑🏻👩🏾🤝👨🏿👬🏿
I took all your codes and tested them, but the result was
user_id: 2, live_id: 266, registered
. My orm and gf are both 2.7.1require ( github.com/gogf/gf/contrib/drivers/mysql/v2 v2.7.1 github.com/gogf/gf/v2 v2.7.1 )
And I found that the target_id in the result of printing _liveHaveSignUp is the memory address, but the collection_id is not.
_liveHaveSignUp:[]map[string]interface {}{map[string]interface {}{"collection_id":1, "target_id":0x10a}}
Logically speaking, memory addresses should not be stored.
@xiucaiwu 你好,请提供最小可运行代码,以便于复现和定位。
Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑🤝🧑👫🧑🏿🤝🧑🏻👩🏾🤝👨🏿👬🏿
@xiucaiwu Hello, please provide the minimum runnable code to facilitate reproduction and location.
Go version
1.20.3
GoFrame version
2.7.1
Can this bug be reproduced with the latest release?
Option Yes
What did you do?
collection(报名表单)表数据,其中target_id存放的是直播id
collection_user(用户报名记录)表数据
测试代码
如果把ORM的All()改为Scan,则结果是我想要的
What did you see happen?
What did you expect to see?
user_id:2,live_id:266,已报名