I need to create and add EOs to a relationship when the base EO is created.
The end result is that when I create an EO called Event, I want to assign all
the related EOs where isPrimaryPlayer is true.
I added this to my init method of Event:
@Override
protected void init(EOEditingContext ec) {
// TODO Auto-generated method stub
super.init(ec);
NSArray<PersonShowBook> books =
PersonShowBook.fetchPersonShowBooks(editingContext(),
PersonShowBook.IS_PRIMARY_PLAYER.eq(Boolean.TRUE), null);
for (PersonShowBook psb : books) {
this.addToPersonShowBooksRelationship(psb);
}
}
It’s working, but am I stepping on myself?
Ted _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list ([email protected])
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com
This email sent to [email protected]