MCPcopy Create free account
hub / github.com/pydio/cells / BeforeCreate

Method BeforeCreate

common/proto/tree/node.go:881–886  ·  view source on GitHub ↗
(*gorm.DB)

Source from the content-addressed store, hash-verified

879}
880
881func (tn *TreeNode) BeforeCreate(*gorm.DB) error {
882
883 tn.SetLevel(int64(tn.GetMPath().Length()))
884
885 return nil
886}
887
888func (tn *TreeNode) BeforeSave(*gorm.DB) error {
889

Callers

nothing calls this directly

Calls 3

SetLevelMethod · 0.95
GetMPathMethod · 0.95
LengthMethod · 0.80

Tested by

no test coverage detected