path: root/aconf/model/model.lua
diff options
authorKaarle Ritvanen <>2016-12-16 13:11:53 +0200
committerKaarle Ritvanen <>2016-12-16 16:09:55 +0200
commit2cc92ad225ef0fd2756b44c9dc81c59fedbf2f20 (patch)
treeaa57385b8cb98d412169c0eacffc23f6f38f4e45 /aconf/model/model.lua
parent589156c6b29825e79642cf0d78bd9f6a46b47f96 (diff)
doc: add clarifications and clean up
Diffstat (limited to 'aconf/model/model.lua')
1 files changed, 5 insertions, 7 deletions
diff --git a/aconf/model/model.lua b/aconf/model/model.lua
index bf31f17..7417115 100644
--- a/aconf/model/model.lua
+++ b/aconf/model/model.lua
@@ -1,5 +1,5 @@
-Copyright (c) 2012-2015 Kaarle Ritvanen
+Copyright (c) 2012-2016 Kaarle Ritvanen
See LICENSE file for license details
@@ -72,7 +72,6 @@ end
-- key&ndash;value pairs. The key will be the name of the field and
-- the value will determine its type. The value shall be a subclass of
-- @{Field}, an instance of such, or another **&lt;Model&gt;**.
--- @function new
-- @param base (optional <i>**&lt;Model&gt;**</i>) base model
-- inherited by the new model.
-- @return <i>**&lt;Model&gt;**</i> new model
@@ -110,6 +109,8 @@ end
--- Model objects. Each of these represents an actual model
-- object in the data model, in the context of a specific transaction.
+-- These are instances of @{node.TreeNode} and the model class created
+-- e.g. using @{new}.
-- @section Model
M.Model =
@@ -250,14 +251,11 @@ function M.Model:init(context)
--- fetch an object in the context of the model object's transaction.
--- @function Model:fetch
+-- @function fetch
-- @tparam string path path of the object to fetch. A path relative to
-- the model object's own path may be used.
-- @return (<i>**primitive**</i> or <i>@{node.TreeNode}</i>) fetched
--- object. An instance of @{node.TreeNode} represents a non-leaf
--- object in the data model, in the context of a specific
--- transaction. Model objects themselves are a special case of such
--- objects.
+-- object
function M.Model:fetch(path, create)
return getmetatable(self).fetch(path, create)