checkForeignKeys(entity);
        public void applicationDidFinishLaunching(NSNotification n) {            log.debug("ApplicationDidFinishLaunching: " + n);            for (Enumeration ge = EOModelGroup.defaultGroup().models().objectEnumerator(); ge.hasMoreElements();) {                EOModel model = (EOModel)ge.nextElement();                String frameworkName = null;                String modelPath = null;                                if(isRapidTurnaroundEnabled()) {                    for(Enumeration e = NSArray.componentsSeparatedByString(model.path(), File.separator).reverseObjectEnumerator(); e.hasMoreElements(); ) {                        String a = (String)e.nextElement();                        if(a.indexOf(".framework") > 0) {                            frameworkName = a.substring(0, a.indexOf(".framework"));                            break;                        }                    }                    if(frameworkName == null) {                        frameworkName = "app";                    }                    modelPath = ERXFileUtilities.pathForResourceNamed(model.name() + ".eomodeld", frameworkName, null);                    defaultLog.debug("Path for model <" + model.name() + "> in framework <"+frameworkName+">: " + modelPath);                }                                                for (Enumeration ee = model.entities().objectEnumerator(); ee.hasMoreElements();) {                    EOEntity entity = (EOEntity)ee.nextElement();                    EOClassDescription cd = EOClassDescription.classDescriptionForEntityName(entity.name());                    defaultLog.debug("Reading defaults for: " + entity.name());                    if(cd instanceof ERXEntityClassDescription) {                        ((ERXEntityClassDescription)cd).readDefaultValues();                        if(modelPath != null) {                            String path = modelPath + File.separator + entity.name() + ".plist";                            ERXFileNotificationCenter.defaultCenter().addObserver(cd, new NSSelector("modelFileDidChange", ERXConstant.NotificationClassArray), path);                        }                    } else {                        defaultLog.warn("Entity classDescription is not ERXEntityClassDescription: " + entity.name());                    }                }            }        }