for (Iterator ee = myMetaData.getDetailNames().iterator(); ee.hasNext();)
{
oneDet = (String) ee.next();
Relation oneDetRelation = myMetaData.getRelation(oneDet);
Persistent detailObj = null;
try
{
detailObj = getFactory().create(oneDetRelation.getToPersistent());
}
catch (Exception e)
{
throw new PersistenceException("Unable to instantiate " + "detail db object '"
+ oneDetRelation.getToPersistent() + "'", e);
}
if (currentTransaction != null)
{
detailObj.setTransaction(currentTransaction);
}
if (! detailObj.allowed(Persistent.DELETE))
{
throw new PersistenceException("Delete of '" + oneDetRelation.getToPersistent() + "' not allowed");
}
Iterator stkLocal = oneDetRelation.getFromFields().iterator();
Iterator stkForeign = oneDetRelation.getToFields().iterator();
while (stkLocal.hasNext())
{
String localField = (String) stkLocal.next();
String foreignField = (String) stkForeign.next();