Module: N::ManagedChild
- Includes:
- Managed
- Defined in:
- lib/n/db/mixins.rb
Overview
ManagedChild
A common type of non-entity
Instance Attribute Summary
Attributes included from Managed
Instance Method Summary collapse
-
#__db_pk ⇒ Object
pid is the primary key.
- #initialize(parent = nil) ⇒ Object
- #set_parent(parent) ⇒ Object
Methods included from Managed
#__ancestors_classes, #__db_insert, #__db_pre_delete, #__db_pre_insert, #__db_update, #__descendants_classes, eval_db_insert, eval_db_read_row, eval_db_update, eval_dbseq, eval_dbtable
Instance Method Details
#__db_pk ⇒ Object
pid is the primary key
276 277 278 |
# File 'lib/n/db/mixins.rb', line 276 def __db_pk return "pid" end |
#initialize(parent = nil) ⇒ Object
267 268 269 |
# File 'lib/n/db/mixins.rb', line 267 def initialize(parent = nil) @pid = parent.to_i end |
#set_parent(parent) ⇒ Object
271 272 273 |
# File 'lib/n/db/mixins.rb', line 271 def set_parent(parent) @pid = parent.to_i end |