A QCodo powered CMS
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

9 lines
592 B

  1. /**
  2. * This will DELETE this object's <%= $objTable->ClassName; %> instance from the database.
  3. * It will also unassociate itself from any ManyToManyReferences.
  4. */
  5. public function Delete<%= $objTable->ClassName; %>() {
  6. <% foreach ($objTable->ManyToManyReferenceArray as $objManyToManyReference) { %>
  7. $this-><%= $objCodeGen->VariableNameFromTable($objTable->Name) %>->UnassociateAll<%= $objManyToManyReference->ObjectDescriptionPlural %>();
  8. <% } %>
  9. $this-><%= $objCodeGen->VariableNameFromTable($objTable->Name); %>->Delete();
  10. }