//truncate table is not allowed if there are any tables referencing it.
//except if it is self referencing.
ConstraintDescriptorList cdl = dd.getConstraintDescriptors(td);
for(int index = 0; index < cdl.size(); index++)
{
ConstraintDescriptor cd = cdl.elementAt(index);
if (cd instanceof ReferencedKeyConstraintDescriptor)
{
ReferencedKeyConstraintDescriptor rfcd = (ReferencedKeyConstraintDescriptor) cd;
if(rfcd.hasNonSelfReferencingFK(ConstraintDescriptor.ENABLED))
{