On 2010-04-01, at 8:38 AM, David Avendasora wrote:

> 
> On Apr 1, 2010, at 8:23 AM, David LeBer wrote:
> 
>> 
>> On 2010-04-01, at 12:07 AM, Cheong Hee wrote:
>> 
>>> Is there any pointers or sample code how these could be done to initiate 
>>> connection and save changes in respective ec?
>> 
>> You don't need multiple ec's unless you want them. Other than that it's 
>> transparent.
>>      
>>      EOEditingContext ec = ERXEC.newEditingContext();
>>      Person p = (Person)EOUtitlites.createAndInsertInstance(ec, 
>> Person.ENTITY_NAME); // Person entity persists in database A
>>      Horse h = (Horse)EOUtitlites.createAndInsertInstance(ec, 
>> Horse.ENTITY_NAME); // Horse entity persists in database B
>>      // make chagnes to h and p
>>      ec.saveChanges(); // p saved to database A, h saved to database B
>> 
>> You can model cross database relationships as long as you don't try and 
>> create a fetch based on them.
> 
> I think you can fetch on them, you just can't qualify the fetch. It's an 
> all-or-nothing thing.

Erm, yeah, that's what I meant.

> You can't have cross-model inheritance structures either, I don't believe.
> 
> Dave
> 
>> 
>>> 
>>> Cheers
>>> 
>>> Cheong Hee
>>> 
>>> ----- Original Message ----- From: "Mark Ritchie" <mark.ritc...@mac.com>
>>> To: "James Cicenia" <ja...@jimijon.com>
>>> Cc: "WO Dev Group" <webobjects-dev@lists.apple.com>
>>> Sent: Thursday, April 01, 2010 1:05 AM
>>> Subject: Re: two different databases at same time?
>>> 
>>> 
>>>> On 31/Mar/2010, at 8:15 AM, James Cicenia wrote:
>>>>> Is it possible to use two different databases, I guess via two different 
>>>>> models?
>>>>> I will need to connect to an Oracle big database on a remote server and 
>>>>> was
>>>>> wondering if I could also use a mySQL or postgres database for user 
>>>>> control
>>>>> on local server.
>>>> 
>>>> Yes, yes!  You can have multiple concurrent connections!  One for each 
>>>> EOModel!
>>>> Just make sure that the entity names are unique across all EOModels!
>>>> Good luck!
>>>> M.
>>>> _______________________________________________
>>>> Do not post admin requests to the list. They will be ignored.
>>>> Webobjects-dev mailing list      (Webobjects-dev@lists.apple.com)
>>>> Help/Unsubscribe/Update your Subscription:
>>>> http://lists.apple.com/mailman/options/webobjects-dev/chng34%40gmail.com
>>>> 
>>>> This email sent to chn...@gmail.com 
>>> 
>>> _______________________________________________
>>> Do not post admin requests to the list. They will be ignored.
>>> Webobjects-dev mailing list      (Webobjects-dev@lists.apple.com)
>>> Help/Unsubscribe/Update your Subscription:
>>> http://lists.apple.com/mailman/options/webobjects-dev/dleber_wodev%40codeferous.com
>>> 
>>> This email sent to dleber_wo...@codeferous.com
>> 
>> ;david
>> 
>> --
>> David LeBer
>> Codeferous Software
>> 'co-def-er-ous' adj. Literally 'code-bearing'
>> site:        http://codeferous.com
>> blog:        http://davidleber.net
>> profile:     http://www.linkedin.com/in/davidleber
>> twitter:     http://twitter.com/rebeld
>> --
>> Toronto Area Cocoa / WebObjects developers group:
>> http://tacow.org
>> 
>> 
>> 
>> 
>> _______________________________________________
>> Do not post admin requests to the list. They will be ignored.
>> Webobjects-dev mailing list      (Webobjects-dev@lists.apple.com)
>> Help/Unsubscribe/Update your Subscription:
>> http://lists.apple.com/mailman/options/webobjects-dev/webobjects%40avendasora.com
>> 
>> This email sent to webobje...@avendasora.com
>> 
>> 
> 

;david

--
David LeBer
Codeferous Software
'co-def-er-ous' adj. Literally 'code-bearing'
site:   http://codeferous.com
blog:   http://davidleber.net
profile:        http://www.linkedin.com/in/davidleber
twitter:        http://twitter.com/rebeld
--
Toronto Area Cocoa / WebObjects developers group:
http://tacow.org




 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to