1
0
mirror of https://github.com/astaxie/beego.git synced 2025-07-11 08:31:01 +00:00

add comments for orm package, done

This commit is contained in:
FuXiaoHei
2014-01-17 23:28:54 +08:00
parent 4c527dde65
commit 828a306069
14 changed files with 192 additions and 0 deletions

View File

@ -7,6 +7,7 @@ import (
"reflect"
)
// single model info
type modelInfo struct {
pkg string
name string
@ -20,6 +21,7 @@ type modelInfo struct {
isThrough bool
}
// new model info
func newModelInfo(val reflect.Value) (info *modelInfo) {
var (
err error
@ -79,6 +81,8 @@ func newModelInfo(val reflect.Value) (info *modelInfo) {
return
}
// combine related model info to new model info.
// prepare for relation models query.
func newM2MModelInfo(m1, m2 *modelInfo) (info *modelInfo) {
info = new(modelInfo)
info.fields = newFields()