Doesn't see all prototypes model?!
Doesn't see all prototypes model?!
- Subject: Doesn't see all prototypes model?!
- From: James Cicenia <email@hidden>
- Date: Thu, 16 Dec 2004 18:11:39 -0600
This only sees the main model.. not the one in the framework... it only
loops once.
public void appendJdbcUrl(String additionalUrl) {
String newDatabaseTag = databaseTagFromUrl(additionalUrl);
if (newDatabaseTag != null) {
EOPrototypeSwitcher switcher = new
EOPrototypeSwitcher(newDatabaseTag.toUpperCase());
System.out.println("Database Tag: "+newDatabaseTag);
jdbcUrls.setObjectForKey(additionalUrl, newDatabaseTag);
for (Enumeration en =
EOModelGroup.defaultGroup().models().objectEnumerator();
en.hasMoreElements();) {
EOModel theModel = (EOModel) en.nextElement();
NSMutableDictionary dict = new
NSMutableDictionary(theModel.connectionDictionary());
String oldUrl = (String) dict.objectForKey("URL");
String replacementUrl = (String)
jdbcUrls.objectForKey(databaseTagFromUrl(oldUrl));
if (replacementUrl != null) {
dict.setObjectForKey(replacementUrl, "URL");
theModel.setConnectionDictionary(dict);
System.out.println("Override EOModel URL. New url is: "
+ theModel.connectionDictionary().objectForKey(
"URL"));
}
switcher.updatePrototypes(theModel);
EOFJDBCConnectionAnalyzer analyzer = new
EOFJDBCConnectionAnalyzer(theModel.connectionDictionary());
}
}
}
any thoughts?
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden