personTable.addForeignKey("companyID", "Company", "id");
petTable.addForeignKey("ownerID", "Person", "id");
}
public void postUpgrade(EOEditingContext editingContext, EOModel model) throws Throwable {
Company c1 = Company.createCompany(editingContext, "mDT");
Company c2 = Company.createCompany(editingContext, "Apple");
Company c3 = Company.createCompany(editingContext, "Microsoft");
Person p1 = Person.createPerson(editingContext, "Mike");
p1.setCompanyRelationship(c1);
Animal a1 = Animal.createAnimal(editingContext, "Derby", p1);
Animal a2 = Animal.createAnimal(editingContext, "Sydney", p1);
Person p2 = Person.createPerson(editingContext, "Adam");