summaryrefslogtreecommitdiffstats
path: root/createDefaultMapper/mappertemplate
diff options
context:
space:
mode:
Diffstat (limited to 'createDefaultMapper/mappertemplate')
-rw-r--r--createDefaultMapper/mappertemplate13
1 files changed, 11 insertions, 2 deletions
diff --git a/createDefaultMapper/mappertemplate b/createDefaultMapper/mappertemplate
index 62de1eb..c7c857e 100644
--- a/createDefaultMapper/mappertemplate
+++ b/createDefaultMapper/mappertemplate
@@ -35,10 +35,19 @@ class Application_Model_MAPPER
$data = array(SAVEDATA);
if (null === ($id = $MVAR->getID()) ) {
- unset($data['id']);
+ unset($data['MVARID']);
$this->getDbTable()->insert($data);
} else {
- $this->getDbTable()->update($data, array('id = ?' => $id));
+ $this->getDbTable()->update($data, array('MVARID = ?' => $id));
+ }
+ }
+
+ public function delete(Application_Model_MODEL $MVAR)
+ {
+ if (null === ($id = $MVAR->getID()) ) {
+ return;
+ } else {
+ $this->getDbTable()->delete(array('MVARID = ?' => $id));
}
}