EOEnterpriseObject eo = EOUtilities.createAndInsertInstance(ec, "Employee");
eo.addObjectToBothSidesOfRelationshipWithKey(company, "company");
eo.takeValueForKey(Boolean.TRUE, "manager");
eo.takeValueForKey("Bob" + idx, "name");
eo.takeValueForKey(lastName, "state");
ec.unlock();
}
ec.lock();
ec.saveChanges();
ec.unlock();