views:

39

answers:

1

Hi all,

I have an entity with an attribute of type "string". I actually want it to be an array. So I created an another entity "array" and I want to add a many-one relationship between string and the array.

So my question is: Is it possible to add a relationship between an entity and an attribute of another entity?

Thanx in advance.

A: 

You can use observer pattern for achieving this.

Manjunath
Apple documentation about coredata observer says that: "Define a one-to-many dependency between objects so that when one object changes state, all its dependents are notified and updated automatically. The Observer pattern is essentially a publish-and-subscribe model in which the subject and its observers are loosely coupled. Communication can take place between the observing and observed objects without either needing to know much about the other." How is it related to my question?
neha
Please correct me if I'm wrong..
neha