• 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
Re: dynamic database connection
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: dynamic database connection


  • Subject: Re: dynamic database connection
  • From: Chuck Hill <email@hidden>
  • Date: Mon, 7 May 2007 11:25:56 -0700


On May 7, 2007, at 11:18 AM, Mark Morris wrote:

Tom,

I've never had to do this, but I'm pretty sure it can be done. Someone please jump in and correct any errors, but off the top of my head I think you need to manually created an EOModelGroup and an EOObjectStoreCoordinator for your session, associate your model with the EOModelGroup, and then you can associate the correct connection dictionary for your user's organization.

I'll just add that the models in each model group need to be different object instances. The only problem that I know of with this is that some 3rd party code relies on EOModelGroup.defaultModelGroup() being the only model group. It is a bad assumption, but I have seen it made (not, IIRC, in the WO code itself).


Chuck


Or, maybe better, you can create the new group and coordinator lazily at the Application level when a user from a particular organization logs in, and only end up creating at most as many as you have organizations.


I apologize that this is not very detailed, but hopefully it will point you in the right direction.


--

Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems. http://www.global-village.net/products/practical_webobjects





_______________________________________________
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


References: 
 >dynamic database connection (From: Tom Termini <email@hidden>)
 >Re: dynamic database connection (From: Mark Morris <email@hidden>)

  • Prev by Date: Re: WOPopUpButton otherTagString
  • Next by Date: Re: Apple's Support of WebObjects
  • Previous by thread: Re: dynamic database connection
  • Next by thread: Adding/Removing objects to/from toMany relationships.
  • Index(es):
    • Date
    • Thread