Manish Champaneri
Manish Champaneri

Reputation: 652

Beego ORM with MySQL

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.

Upvotes: 0

Views: 1942

Answers (1)

Dennis Mao
Dennis Mao

Reputation: 54

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

Upvotes: 2

Related Questions