• 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: Modeling an optional to-one relationship
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Modeling an optional to-one relationship


  • Subject: Re: Modeling an optional to-one relationship
  • From: Mark Ritchie <email@hidden>
  • Date: Fri, 15 Jan 2010 11:18:17 -0800

On 15/Jan/2010, at 11:04 AM, Chuck Hill wrote:
> On Jan 15, 2010, at 9:44 AM, Mark Ritchie wrote:
>> Personally, I like the way that EOF is handling the case.  It works for reading and it correctly warns you when you attempt to change something that never existed in the first place.  There is also programatic access to detect the case
> How are you doing this?  Is it much different than the code I sent a few minutes ago?


Hi Chuck!

>From the code which I posted before, this is the method which asks the DC associated with the given EO for all the objects which didn't exist in the database using the missingObjectGlobalIDs() method.

	private void logObjectsMissingGIDs(EOEditingContext context, EOEnterpriseObject eo){
		EOObjectStore os = context.rootObjectStore();
		if(os instanceof EOObjectStoreCoordinator){
			EOObjectStoreCoordinator osc = (EOObjectStoreCoordinator)os;
			EOObjectStore os2 = osc.objectStoreForObject(eo);
			if(os2 instanceof EODatabaseContext){
				EODatabaseContext dc = (EODatabaseContext)os2;
				NSArray<EOEnterpriseObject> objectsWithMissingGlobalIds = dc.missingObjectGlobalIDs();
				NSLog.err.appendln("objectsWithMissingGlobalIds = " + objectsWithMissingGlobalIds);
			}
		}
	}

M.
 _______________________________________________
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: Modeling an optional to-one relationship
      • From: Chuck Hill <email@hidden>
References: 
 >Modeling an optional to-one relationship (From: Lon Varscsak <email@hidden>)
 >Re: Modeling an optional to-one relationship (From: Travis Britt <email@hidden>)
 >Re: Modeling an optional to-one relationship (From: Lon Varscsak <email@hidden>)
 >Re: Modeling an optional to-one relationship (From: Chuck Hill <email@hidden>)
 >Re: Modeling an optional to-one relationship (From: Lon Varscsak <email@hidden>)
 >Re: Modeling an optional to-one relationship (From: Tom M.Blenko <email@hidden>)
 >Re: Modeling an optional to-one relationship (From: Mark Ritchie <email@hidden>)
 >Re: Modeling an optional to-one relationship (From: Lon Varscsak <email@hidden>)
 >Re: Modeling an optional to-one relationship (From: Mark Ritchie <email@hidden>)
 >Re: Modeling an optional to-one relationship (From: Chuck Hill <email@hidden>)

  • Prev by Date: Re: Modeling an optional to-one relationship
  • Next by Date: Re: Modeling an optional to-one relationship
  • Previous by thread: Re: Modeling an optional to-one relationship
  • Next by thread: Re: Modeling an optional to-one relationship
  • Index(es):
    • Date
    • Thread