• 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: Executing simple one-time tasks using EOF
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Executing simple one-time tasks using EOF


  • Subject: Re: Executing simple one-time tasks using EOF
  • From: Paul Hoadley <email@hidden>
  • Date: Sun, 29 Jun 2014 08:51:01 +1000

On 29 Jun 2014, at 8:04 am, Miguel Arroz <email@hidden> wrote:

 Can't you use Wonder migrations? I have the vague recollection I did that on a past life for doing tasks like that. AFAIK there were two methods you could define on a migration, the first before EOF loaded the models, and the second one after. But I don't touch that for quite some time now, so I may be confused.

Yeah, I’ve certainly been known to do some one-time EOF-related tasks in a migration class—you can leave upgrade() and downgrade() empty, make sure you implement IERXPostMigration, and run the code in postUpgrade().  As for how dirty that makes you feel, I guess it’s a case-by-case basis.  I’ve justified it from time to time because the postUpgrade() one-time tasks were model-related, and didn’t feel like a terrible abuse of migrations.  YMMV.


-- 
Paul Hoadley
http://logicsquad.net/



 _______________________________________________
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: Executing simple one-time tasks using EOF
      • From: Hugi Thordarson <email@hidden>
References: 
 >Executing simple one-time tasks using EOF (From: Hugi Thordarson <email@hidden>)
 >Re: Executing simple one-time tasks using EOF (From: Miguel Arroz <email@hidden>)

  • Prev by Date: Re: Executing simple one-time tasks using EOF
  • Next by Date: Re: Executing simple one-time tasks using EOF
  • Previous by thread: Re: Executing simple one-time tasks using EOF
  • Next by thread: Re: Executing simple one-time tasks using EOF
  • Index(es):
    • Date
    • Thread