跳至主要內容
  • Hostloc 空間訪問刷分
  • 售賣場
  • 廣告位
  • 賣站?

4563博客

全新的繁體中文 WordPress 網站
  • 首頁
  • gorm 关联查询问题咨询?
未分類
4 2 月 2021

gorm 关联查询问题咨询?

gorm 关联查询问题咨询?

資深大佬 : fxjson 11

type User struct { gorm.Model Name string AccountId uint Account Acount }

type Account struct{ AccountId gorm:"primary_key" Age int } 获取的数据结构是 { id:1, name:”json”, accountid:1, account:{ age:32, accountid:1 } } 怎么在不添加数据结构情况下得到下面的结构,就是将 age 提升到外面一级别 { id:1, name:”json”, accountid:1, age:32, }

大佬有話說 (0)

文章導覽

上一篇文章
下一篇文章

AD

其他操作

  • 登入
  • 訂閱網站內容的資訊提供
  • 訂閱留言的資訊提供
  • WordPress.org 台灣繁體中文

51la

4563博客

全新的繁體中文 WordPress 網站
返回頂端
本站採用 WordPress 建置 | 佈景主題採用 GretaThemes 所設計的 Memory
4563博客
  • Hostloc 空間訪問刷分
  • 售賣場
  • 廣告位
  • 賣站?
在這裡新增小工具