• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
stoping models from loading into default EOModelGroup
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

stoping models from loading into default EOModelGroup


  • Subject: stoping models from loading into default EOModelGroup
  • From: Michael Gargano <email@hidden>
  • Date: Fri, 08 Apr 2011 09:01:16 -0700
  • Acceptlanguage: en-US
  • Thread-topic: stoping models from loading into default EOModelGroup

Okay... two days... I give up...

Is there a way to stop a model from getting loaded into the default EOModelGroup?  I have a entity naming conflict and I want to prevent a model in a framework I'm using from loading.  I looked at the delegate methods and they don't seem do do what I want, the EOModelGroup.ClassDelegate looked promising, but from what I read it looks like I'd have to re-implement most of ERXModelGroup.loadModelsFromLoadedBundles() and when I put this code...

// remove the my Model from the default model group of the Application
EOModelGroup.setClassDelegate(new EOModelGroup.ClassDelegate() {


@Override
public EOModelGroup defaultModelGroup() {
ERXModelGroup group = new ERXModelGroup();
group.loadModelsFromLoadedBundles();// pretty sure this would still throw an exception
EOModel model = group.modelNamed("mymodel");
if(model != null)
group.removeModel(model);
return group;
}
});

... in the Application() constructor it get the message...

Class com.webobjects.foundation.NSSelector can not access a member of class com.mycomp.Application$1 with modifiers "public"

If this can't be done I guess my only recourse would be to write a util. program to edit all the plist from my models and prepend something to all the entity names.

Thanks.
-Mike

 _______________________________________________
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

  • Follow-Ups:
    • Re: stoping models from loading into default EOModelGroup
      • From: Mike Schrag <email@hidden>
  • Prev by Date: Re: Latest WOWODC news
  • Next by Date: Re: stoping models from loading into default EOModelGroup
  • Previous by thread: Re: Latest WOWODC news
  • Next by thread: Re: stoping models from loading into default EOModelGroup
  • Index(es):
    • Date
    • Thread