• 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
Programmatically loading new models in a new EOModelGroup
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Programmatically loading new models in a new EOModelGroup


  • Subject: Programmatically loading new models in a new EOModelGroup
  • From: David Avendasora <email@hidden>
  • Date: Mon, 24 Feb 2014 10:06:21 -0500

Hi all,

I’m getting braver (dumber) in my old age.

I have decided that for what I want to do I want to keep two independent EOObjectStoreCoordinators each having their own EOModelGroup made up of different Models (okay, fine, They both load erprototypes.eomodeld) but as far as non-prototype EOModel, they don’t share any. 

There is no data shared between the two OSCs either. I don’t need any cross-OSC relationships, no reading values out of one and writing them into the other so all of those possible mistakes are eliminated. 

What I *do* need to blend the data from both together in the UI. Seems pretty doable; in practical terms I’ll simply have a WOComponent with two EOEditingContexts, each one a child of one of the two OSC.

I have figured out all the stuff I need to do to Create the second OSC and load its EOModels - which I load from a location outside of the Resources directory so I know they are not being automatically loaded at application launch (and I’ve verified that they are not being loaded by. I am programmatically setting the connectionDictionary on the manually loaded EOModel using EODatabaseContext.forceConnectionWithModel(MyModel, connectionDictionary, secondaryEC()).

The problem is that it is still trying to connect with the connection information for the models loaded at app launch! I get errors saying that the schema specified in the newly loaded EOModel isn’t in the database. Well, dammit, that’s not the database you should be looking in!!! Ahg!

…

Um…

Errrrrr… Huh.

I guess the property like "dbConnectURLGLOBAL=“ and “dbConnectPluginGLOBAL=” mean that the connection information information is used … and here’s the tricky bit … Globally.

Funny, that.

Still posting to the list so future me will be able to find the answer when I forget what Global means again. I mean really, I’m American. “Global” isn’t a concept I usually bother myself with!

Dave

—————————————————————————————
WebObjects - so easy that even Dave Avendasora can do it!™
—————————————————————————————
David Avendasora
Senior Software Abuser
Nekesto, Inc.





 _______________________________________________
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: Programmatically loading new models in a new EOModelGroup
      • From: Chuck Hill <email@hidden>
    • Re: Programmatically loading new models in a new EOModelGroup
      • From: Aaron Rosenzweig <email@hidden>
  • Prev by Date: Re: "ERRest Application" project--still available?
  • Next by Date: Re: Programmatically loading new models in a new EOModelGroup
  • Previous by thread: Re: Same model with multiple databases and no EOs --a vendor "database"
  • Next by thread: Re: Programmatically loading new models in a new EOModelGroup
  • Index(es):
    • Date
    • Thread