liquid_feedback_frontend
view model/agent.lua @ 1450:2fbf95bee380
Fixed missing closing end
author | bsw |
---|---|
date | Thu Oct 18 17:17:32 2018 +0200 (2018-10-18) |
parents | 32cc544d5a5b |
children |
line source
1 Agent= mondelefant.new_class()
2 Agent.table = 'agent'
3 Agent.primary_key = { "controlled_id", "controller_id" }
5 Agent:add_reference{
6 mode = 'm1',
7 to = "Member",
8 this_key = 'controller_id',
9 that_key = 'id',
10 ref = 'controller',
11 }
13 Agent:add_reference{
14 mode = 'm1',
15 to = "Member",
16 this_key = 'controlled_id',
17 that_key = 'id',
18 ref = 'controllee',
19 }
21 function Agent:by_pk(controlled_id, controller_id)
22 return self:new_selector()
23 :add_where{ "controlled_id = ?", controlled_id }
24 :add_where{ "controller_id = ?", controller_id }
25 :optional_object_mode()
26 :exec()
27 end