From: Tim K. <tkl...@ap...> - 2007-01-25 19:41:55
|
On Jan 25, 2007, at 12:40 AM, Anjo Krank wrote: > > Am 25.01.2007 um 02:27 schrieb Tim Kliewer: >> Framework WWSFS defines the package WWSFS with 2 models: MAD and >> MyLDAP. > > How can a "package" define a model? Thats not what I stated. This is a database access framework. The framework contains 2 models which formerly was non-package specific, I'll try your change with the pre-PW model, thank you! > Why is your package name in uppercase? It was this way when I got here. Considering all the places it is used, it will not be changing now. > Do you have the same entities in both models? No, each entity is unique. > >> My steps to fix the ERXEntityClassDescription ("ClassNotFound") >> problem was to tell the models that every class' classname would >> be WWSFS.<classname>. >> I would prefer not to do this; is there a way to avoid it? >> >> When using the PW tip, I have reworked the line in question: >> ... EOModelGroup.globalModelGroup().entityNamed >> ("User").attributeNamed("userName").width() ... >> to: >> ((ERXModelGroup)ERXModelGroup.defaultGroup >> ()).loadModelsFromLoadedBundles(); >> if (userName.length() > ERXModelGroup.defaultGroup >> ().entityNamed("User").attributeNamed("userName").width()) { >> This now works, but is there a better / preferred Project_Wonder >> way of getting the "entityNamed"? > > Why do you use globalModelGroup() in favor of defaultGroup()? Legacy code, this is the first time I've paid attention to it. I'll look to improving it. << Change made, testing shows it works fine. >> > > Also, you had errors when the relationships were touched while the > destination wasn't loaded, I committed a fix for that, check out if > it works now. Thank you, I'll test it now. Nope, I still get 136 bad substitutions with the following message as an example: 09:00:11 ERXEntityClassDescription$Factory:565 WARN - Invalid class name for entity: User exception: java.lang.ClassNotFoundException: User using com.webobjects.eocontrol.EOGenericRecord instead > Cheers, Anjo Thanks for your help, Anjo. Bottom line is that I have my application working as long as the entities in my framework's model point to their java classes using their full package specified class. This is an acceptable change to make, it was just a minor inconvenience. I would still prefer to not make it. In the interest of full disclosure, I have another data framework that does not use packaging. When it is loaded, there aren't any complaints about not finding the Classes! TNK |