• 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
Re: @Override of EO?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: @Override of EO?


  • Subject: Re: @Override of EO?
  • From: Jesse Tayler <email@hidden>
  • Date: Fri, 02 Aug 2013 14:11:03 -0400

Thanks Christoph,

I see one thing I didn’t notice.

for better or worse, it looks like the posterId is the source attribute in the relationship.

I had thought it was a separate attribute that would be set when the relationship is set, but it’s just the foreign key and the destination object is just an ERAttachment

So, I was looking to my User class to fire the process somehow when the relationship is set or changes.

perhaps there is a better way to pursue this need?


On Aug 2, 2013, at 2:00 PM, Christoph Wick <email@hidden> wrote:

> Primary keys are not set normally (sort of ...). And you should not override setter methods of EOs!
>
> The method of your choice may be overriding EOEnterpriseObject.awakeFromInsertion(EOEditingContext ec).
>
> If your class is e.g. Poster (and you use EOGenerator), then use
>
> 	public class Poster extends _Poster {
>
> 		@Override
> 		public void awakeFromInsertion(EOEditingContext ec) {
> 			super.awakeFromInsertion(ec);
> 			fireMyUnixProcess();
> 		}
>
> 	}
>
> C.U.CW
> --
>
> Christoph Wick - Diplom Informatiker, Managing Director
> i4innovation GmbH, Professor-Neu-Allee 39, 53225 Bonn, Germany
>
> T +49 2 28 28 62 97 93
> M +49 1 51 22 65 78 90
> F +49 2 28 28 62 97 99
> M email@hidden
> W www.i4innovation.de
>
> Geschäftsführer: Thomas Heep, Christoph Wick
> Sitz der Gesellschaft: Bonn | Amtsgericht Bonn HRB 18548 | USt-IdNr.: DE276502600
>
>
> On 02.08.2013, at 19:21, Jesse Tayler <email@hidden> wrote:
>
>>
>> I have an override of a normal EO setter, but for some reason, it isn’t called but the value does get updated
>>
>> I really just want to fire off a unix process once a new posterId has been set, so maybe there’s a smarter way but I thought this would be reliably called once and only after there’s a known primary key id for that poster (ERAttachment)
>>
>> Any thoughts on that?
>>
>>
>>   @Override
>>   public void setPosterId(Integer value) {
>>
>>
>>
>>
>> _______________________________________________
>> 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


 _______________________________________________
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


References: 
 >@Override of EO? (From: Jesse Tayler <email@hidden>)
 >Re: @Override of EO? (From: Christoph Wick <email@hidden>)

  • Prev by Date: Re: @Override of EO?
  • Next by Date: Re: @Override of EO?
  • Previous by thread: Re: @Override of EO?
  • Next by thread: Re: @Override of EO?
  • Index(es):
    • Date
    • Thread