• 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: ERXMigration Problem with Multiple Models
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ERXMigration Problem with Multiple Models


  • Subject: Re: ERXMigration Problem with Multiple Models
  • From: David LeBer <email@hidden>
  • Date: Sun, 6 Apr 2008 21:59:09 -0400


On 6-Apr-08, at 9:52 PM, Aleksey Novicov wrote:
Thanks Mike. Where is the signup for the Wonder list?

<https://lists.sourceforge.net/lists/listinfo/wonder-disc>


I do have a third model for accessing legacy data in a separate database, but on the same MySQL server. There are a couple of relationships that traverse models to the legacy data. But that third model does not use migrations at all.


I tried explicitly listing the third model in the model names list, and... it works! That fixed it.

Thanks!
Aleksey

This should really be on the Wonder list rather than wo-dev, but I
just committed a fix for this ... I saw this once before but didn't
end up looking into it. Is it possible you are depending on another
framework that is bringing in a migration that only is being
discovered because of a relationship to a 3rd model? For instance,
you are declaring Model1 and Model2, but do you have a relationship to
a Model3 that also uses migrations (like ERAttachment or ERTaggable,
maybe?). Anyway, that was the scenario that would cause this ... If
you can track down that 3rd model and list it explicitly in the
modelNames list, it would probably fix the problem for you also, or
you can update Wonder after tonight's build and it should be properly
fixed.


As an aside, you no longer have to declare MigrationClassPrefix for
your models if the class name matches your EOModel name ...

ms

On Apr 6, 2008, at 4:43 PM, Aleksey Novicov wrote:

I love ERXMigration! But I seem to be having a problem when I use it
for multiple models. The models do not have any dependency on each
other, so I don't bother to implement modelDependencies() in either
of my Migration classes.

If I configure the settings so that the migration for only one model
runs, and not the other, everything runs fine. So it seems to be
gagging on the fact there are multiple models. Do I need to
configure some sort of default model dependency, even if there is
none? Both models refer to the same database, and the migrations are
both migration0.

Thanks,
Aleksey

;david

--
David LeBer
Codeferous Software
'co-def-er-ous' adj. Literally 'code-bearing'
site:   http://codeferous.com
blog: http://davidleber.net
profile: http://www.linkedin.com/in/davidleber
--
Toronto Area Cocoa / WebObjects developers group:
http://tacow.org


_______________________________________________ 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: 
 >Re: ERXMigration Problem with Multiple Models (From: Aleksey Novicov <email@hidden>)

  • Prev by Date: Re: ERXMigration Problem with Multiple Models
  • Next by Date: Re: Generate SQL fails
  • Previous by thread: Re: ERXMigration Problem with Multiple Models
  • Next by thread: Re:[SOLVED] ERXMigration Problem with Multiple Models
  • Index(es):
    • Date
    • Thread