Re: Coredata Abstract Relations
Re: Coredata Abstract Relations
- Subject: Re: Coredata Abstract Relations
- From: mmalcolm crawford <email@hidden>
- Date: Sat, 25 Jun 2005 10:13:45 -0700
On Jun 25, 2005, at 9:44 AM, Sammi Williams wrote:
I have a simple program for managing account information. There are
two kinds of transactions, a PersonTransaction and a
BankTransaction, both inheriting from the abstract entity Transaction.
The Bank entity has a to-many (and inverse) relation to instances
of BankTransaction, and also a number of PersonAccounts. A person
account has a number of PersonTransactions.
My question is simply, how can the bank get every single
Transaction associated with it - this includes all its direct
BankTransactions, and also all its PersonTransactions indirectly
related to it through a PersonAccount.
Given that you already have this information, an easy way would be to
implement a custom class for the Bank entity that returns a union of
the bankTransaction relationship and the value for the key path
persons.personTransactions (or however you've named the relationships).
Another small question is how do you define abstract properties
that should be overridden in subclasses? Can you have some kind of
abstract relationship which could either be directly coded in a
subclass, or made a fetched property in a subentity?
What are you trying to achieve?
What is the point of an abstract class?
Assuming you mean abstract entity, although the principle is the same
for both: <http://developer.apple.com/documentation/Cocoa/Conceptual/
CoreData/Articles/cdFAQ.html#//apple_ref/doc/uid/TP40001802-243775>.
Do relations for an abstract class get managed?
Is there any reason to think they would not be?
Also, just something I've been curious about via the xcode
interface - what are 'Configurations' - as in 'General, User Info,
Configurations',
<http://developer.apple.com/documentation/Cocoa/Reference/
CoreData_ObjC/Classes/NSManagedObjectModel.html> > "Configurations".
and what is the difference between a fetched property and a fetch
request? Is a fetch request a global thing?
<http://developer.apple.com/documentation/Cocoa/Reference/
CoreData_ObjC/Classes/NSFetchRequest.html>
<http://developer.apple.com/documentation/Cocoa/Reference/
CoreData_ObjC/Classes/NSFetchedPropertyDesc.html>
mmalc
_______________________________________________
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