Ejemplo n.º 1
0
 public function getDeleteStatementId($object, $id)
 {
     $statement = new \Maestro\Database\MSQL();
     $statement->setDb($this->fromClassMap->getDb());
     $statement->setTables($this->getAssociativeTable());
     $this->setKeysAttributes();
     $whereCondition = $this->toAttributeMap->getName() . ' IN (' . implode(',', $id) . ') ';
     $whereCondition .= " AND ( " . $this->fromAttributeMap->getName() . " = " . $object->getAttributeValue($this->fromAttributeMap) . ")";
     $statement->setWhere($whereCondition);
     return $statement->delete();
 }