transientAllowed Class Option

The transientAllowed class option enables you to specify that a class can have non-shared transient instances. (For details, see "Adding Classes to Your Schema", in Chapter 3.)

If you uncheck the Allow Transient Instances check box on the Lifetime sheet of the Define Class dialog, an exception is raised at every attempt to create a non-shared transient instance of the class. An error is raised if you attempt to construct a transient object from within a method (that is, you call create <object-name> transient). Non-shared transient instances of subclasses are restricted according to the subclassTransientAllowed class option, described later in this section.

When you create a new class, the default setting for the transientAllowed class option is determined as follows.