Re: Core Data Bindings. weird behavior.
Re: Core Data Bindings. weird behavior.
- Subject: Re: Core Data Bindings. weird behavior.
- From: Sandro Noel <email@hidden>
- Date: Wed, 13 Aug 2008 16:48:03 -0400
Chris
Thank you for your time.
I'm sorry for the entity names, force of habit.... anything that holds
more than one record is plural to me.
I'll correct them when all the problems are weeded out, I don't want
to add to my current troubles.
My model is EXACTLY the same as what you described.
next time i'll put in the same info.
Sandro.
On 13-Aug-08, at 2:13 AM, Chris Hanson wrote:
On Aug 12, 2008, at 8:10 PM, Sandro Noel wrote:
I have these entities, with these attributes and relationships.
entity: Transactions
attributes: field1, field2
relationship : transactionType
entity: TransactionTypes
attributes: field1, field2
relationship : transaction
This still looks incorrect to me. As we previously explained,
entity names should be singular. Also, what is the cardinality of
your relationships -- are they to-one or to-many? And what are your
relationships' inverses?
I'd describe it like this:
entity: Transaction
attributes: field1, field2
relationships:
transactionType (required to-one to TransactionType, inverse
transactions)
entity: TransactionType
attributes: field1, field2
relationship:
transactions (optional to-many to Transaction, inverse
transactionType)
Having the proper cardinality and inverses set for your
relationships is important, because that tells Core Data how the
structure of the underlying storage needs to be arranged.
How close to what I've put above is your data model?
the problem i get is that if i select a value from that list,
all the transactions that were of the same type of the one i am
trying ti change
get changed as well, not just the one row I am trying to change.
That typically means you have a to-one inverse relationship where
you need a to-many.
-- Chris
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden