Q:

define property of EntityB based on those of EntityA

I have a UILabel that displays a managed object of EntityA. I want use the text of that UILabel as a definition for an EntityB managed object. My first question is, is this possible? I'm trying to pull the text and establish it's properties as those of EntityB here:
NSString *temp = managedObjEntityA.nameA;
managedObjEntityA.name = self.UILabel.text;
self.UILabel.text = temp;

EntityB *textEntityB;
temp = textEntityB.nameB;

My hope is to use the defined textEntityB as reference for a newly created object to establish relationship with:
createdObject.objectToB = textEntityB;

Every version I've tried I get nul for textEntityB. How would I call the managed object of EntityB that matches that of EntityA?

A:

You first have to insert EntityB into your managed object context. 
EntityB *newB = [NSEntityDescription insertNewObjectForEntityForName:@"EntityB"
                 inManagedObjectContext:context];

newB.name = aObject.name;
// or
newB.name = self.label.text;

// establish the (to-one) relationship
aObject.objectToB = newB;

