adding relation EOs
adding relation EOs
- Subject: adding relation EOs
- From: Theodore Petrosky <email@hidden>
- Date: Tue, 15 Nov 2016 14:39:22 -0500
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@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden