EOEntity destEnt = rel.destinationEntity();
EOAttribute searchAttr = destEnt.attributeNamed(keyWhenRelationship());
if(searchAttr != null) {
String className = searchAttr.className();
if(className.equals("java.lang.Number"))
f = new NSNumberFormatter("0");
if(className.equals("java.lang.BigDecimal"))
f = new NSNumberFormatter("$#,##0.00;-$#,##0.00");
if(className.equals("com.webobjects.foundation.NSTimestamp"))
f = new NSTimestampFormatter("%b %d,%Y");
}
return f;