Creating a new entity is one place where some of the properties of a business object can escape verification. If a property is a required property, it must be initialized in the process of creation. Furthermore, if it is an integer field, it will be initialized to zero.
There are at least two solutions/workarounds to this problem
.
(1) In the creation code, make sure there are no uninitialized fields that would break verification rules if set to the default value (e.g., an integer field set to 0). This is the quick (but by no means foolproof) method.
(2) Use Instance Verification immediately after creating a business object. This is the sure way (although it is a little more work). Read more about Instance Verification in the "Developer's Guide".
Edited by davidklitzke - 22-Apr-2008 at 7:54pm