Re: Coredata schema question.
Re: Coredata schema question.
- Subject: Re: Coredata schema question.
- From: mmalcolm crawford <email@hidden>
- Date: Wed, 1 Jun 2005 18:03:00 -0700
On Jun 1, 2005, at 11:20 AM, Scott Ellsworth wrote:
Smart playlists appear to be best done via fetched properties.
This is not necessarily true.
"Smart playlists" provide a useful analogy to introduce the concept
of fetched properties, however unlike smart playlists, fetched
properties are largely "not dynamic". That is:
(a) You cannot change the structure of the associated predicate(*).
(b) More importantly, after it's first fetched the property is
cached. It does not dynamically update as the destination is
updated. If you want to ensure the property is up-to-date, you must
re-fault the source object and re-fetch.
Fetched properties are best suited to cross-store relationships,
"loosely coupled" relationships, and similar transient groupings.
mmalc
(With thanks to BT.)
(*) The predicate itself can change if it's based on $FETCH_SOURCE
and/or $FETCHED_PROPERTY (the latter only for XML/binary stores),
since these values themselves are variable. For example, if a
fetched property of a Song were dependent on the source's songTitle,
then if the title were changed from "Underpass" to "Overpass" the
predicate might change from
songTitle like "Underpass"
to
songTitle like "Overpass"
There is no way, however, to modify the predicate structure, for
example to:
songTitle contains "Overpass"
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden