Core data issues on iphone
<p>how to generate addchild method while adding data to father class for mother object</p>

<p>i have father class and mother class </p>

<p>i have created a realtionship  from father to mother </p>

<p>father class</p>

<pre><code>#import &lt;Foundation/Foundation.h&gt;
#import &lt;CoreData/CoreData.h&gt;

@class Mother;

@interface Father : NSManagedObject {
@private
}
@property (nonatomic, retain) NSString * Name;
@property (nonatomic, retain) NSString * Desciption;
@property (nonatomic, retain) Mother * Wife;

@end
</code></pre>

<p>in .xcdatamodel</p>

<p>in relation field i  have
Relation-> wife  , Destination -> Mother , inverse -> no inverse</p>

<p>now in main class</p>

<pre><code>Father *fat=(Father *)[NSEntityDescription insertNewObjectForEntityForName:@"Father" inManagedObjectContext:managedObjectContext];
fat.Name=@"fataa";

Mother *mom = (Father*)[NSEntityDescription insertNewObjectForEntityForName:@"Mother" inManagedObjectContext:managedObjectContext];


[fat addObject:mom]; // but there is no addOjbect method i think it shows by default 
</code></pre>

<p>i want to add mother data in father object</p>
