1. A computer program product, comprising a non-transitory computer usable medium having a computer readable program code embodied therein, the computer readable program code causing a computer to implement a method for automatic code generation for object deletion, the method comprising: identifying by a database system an object within a database of the database system, where the object has a foreign key relationship with at least one other object within the database; receiving at the database system metadata specific to the database, the metadata including: a delete method by which the object is deleted within the database, and a delete constraint uniquely configured for the foreign key relationship of the object, the delete constraint limiting deletion of the object within the database; and automatically generating code by the database system for deleting the object in response to a user request to delete the object within the database, using the received delete method and the delete constraint included in the metadata, by: inputting by the database system the metadata including the delete method and the delete constraint into a code generator in response to the user request to delete the object within the database, determining whether the delete constraint allows deletion of the object of the database, and upon determining that the delete constraint allows deletion of the object of the database having the foreign key relationship, automatically generating code to delete the object using the delete method in response to the input, utilizing the code generator.