0

I am new to Beego as well as Go. I read its documentation but it puts every ORM operation in the main package instead of model package. I can't understand how to organize the code. I am really very confused.

Grokify
  • 15,092
  • 6
  • 60
  • 81
Manish Champaneri
  • 654
  • 3
  • 8
  • 28

1 Answers1

2

You can feel free to follow steps as below, and try to build your first database program.

  1. Build [Models] According to the table structure of your database.
  2. Initialize the ORM
  3. New an ORM instance
  4. Operate CRUD as your want

Link:
Guidance for Beego/orm configuration
https://beego.me/docs/mvc/model/orm.md

Guidance for operating CRUD on Beego/orm
https://beego.me/docs/mvc/model/object.md

Dennis Mao
  • 54
  • 4