NSDictionary userInfo = model.userInfo();
if (userInfo != null) {
NSDictionary entityModelerDictionary = (NSDictionary) userInfo.objectForKey("_EntityModeler");
if (entityModelerDictionary != null) {
if (databaseConfigName == null) {
databaseConfigName = (String) entityModelerDictionary.objectForKey("activeDatabaseConfigName");
}
if (databaseConfigName != null) {
NSDictionary databaseConfigsDictionary = (NSDictionary) entityModelerDictionary.objectForKey("databaseConfigs");
if (databaseConfigsDictionary != null) {
databaseConfig = (NSDictionary) databaseConfigsDictionary.objectForKey(databaseConfigName);