• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
adding relation EOs
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: adding relation EOs
      • From: Paul Hoadley <email@hidden>
  • Prev by Date: Deployment under Windows Server 2012.R2 issues
  • Next by Date: Re: adding relation EOs
  • Previous by thread: Deployment under Windows Server 2012.R2 issues
  • Next by thread: Re: adding relation EOs
  • Index(es):
    • Date
    • Thread