private function generateManyToManySetter(ManyToManyProperty $property)
 {
     $containerProp = $property->getEntity()->getPrimaryKey()->getName();
     $containedProp = Singleton::create("ServiceBuilder")->getEntity($property->getEntityName())->getPrimaryKey()->getName();
     $signature = "set" . ucfirst($property->getName()) . "(\${$containerProp}, \${$containedProp}s)";
     return "\tpublic function {$signature} {\n\t\t\$this->getPersistence()->{$signature};\n\t}\n\n";
 }
 private function generateManyToManySetter(ManyToManyProperty $property)
 {
     $containerProp = $property->getEntity()->getPrimaryKey()->getName();
     $containedProp = Singleton::create("ServiceBuilder")->getEntity($property->getEntityName())->getPrimaryKey()->getName();
     return "\tpublic function set" . ucfirst($property->getName()) . "(\${$containerProp}, \${$containedProp}s) {\n" . "\t\t\$this->db->updateQuery(\"DELETE FROM " . $property->getMappingTable() . " WHERE {$containerProp}='\${$containerProp}'\");\n" . "\t\tif(empty(\${$containedProp}s)) {\n" . "\t\t\treturn;\n" . "\t\t}\n" . "\t\t\$insertValues = array();\n" . "\t\tforeach(\${$containedProp}s as \${$containedProp}) {\n" . "\t\t\t\$insertValues[] = \"('\${$containerProp}', '\${$containedProp}')\";\n" . "\t\t}\n" . "\t\t\$this->db->updateQuery(\"INSERT INTO " . $property->getMappingTable() . " ({$containerProp}, {$containedProp}) VALUES " . "\".implode(\", \", \$insertValues));\n\t}\n\n";
 }