Product Information > JADE Schema Load Utility User’s Guide > Chapter 1 - Using the Schema Load Utility > Delete Instances Command

Delete Instances Command

The Delete Instances command for the commandFile parameter enables you to specify that persistent instances of the user class specified in the class-name parameter are deleted.

This command has the following syntax.

Delete Instances schema-name::class-name

You must specify a loadStyle of currentSchemaVersion for this command.

The target class specified in the class-name parameter must be local to the target schema specified in the schema-name parameter (that is, it cannot be a subschema-copy class) and it must not be a system class (that is, a subclass of Application, Global, or WebSession) and it must not be a subclass of Control.

The target schema specified in the schema-name parameter must have at least one non-GUI application defined.

Persistent instances of subclasses of the target class are not deleted.

You can delete the target class (by specifying the Delete Class command) in the same command file after its instances have been successfully deleted and it has no other usage; for example, property types or collection memberships.

A separate application deletes the instances in a single transaction, by executing class.instances().purge(). This executes destructors and performs inverse maintenance (including child reference deletions).

If a destructor relies on environmental information established by initialization or log-on methods such as transient objects referred to using the app system variable, the destructor may raise exceptions. In this case, you must write your own scripts to delete the target class instances.