bsw@241: Unit = mondelefant.new_class() bsw@241: Unit.table = 'unit' bsw@241: bsw@241: Unit:add_reference{ bsw@241: mode = '1m', bsw@241: to = "Area", bsw@241: this_key = 'id', bsw@241: that_key = 'unit_id', bsw@241: ref = 'areas', bsw@241: back_ref = 'unit' bsw@241: } bsw@241: bsw@241: function Unit:get_flattened_tree() bsw@241: -- TODO implement bsw@241: bsw@241: return Unit:new_selector():exec() bsw@241: end