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

ERXMigration Problem with Multiple Models


  • Subject: ERXMigration Problem with Multiple Models
  • From: Aleksey Novicov <email@hidden>
  • Date: Sun, 6 Apr 2008 13:43:49 -0700

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

er.migration.migrateAtStartup=true
er.migration.createTablesIfNecessary=true
er.migration.modelNames=Model1,Model2
Model1.MigrationClassPrefix=com.xxx.Model1
Model2.MigrationClassPrefix=com.xxx.Model2

@Override
public void upgrade(EOEditingContext editingContext, ERXMigrationDatabase database) throws Throwable {
ERXJDBCUtilities.createTablesForModel(database.adaptorChannel(), database.model());
}

Apr 06 13:18:11 SmalltownAdmin[8888] (ERXNSLogLog4jBridge.java:41) WARN  NSLog  - A fatal exception occurred: null
[2008-4-6 13:18:11 PDT] <main> java.util.ConcurrentModificationException
at java.util.HashMap$HashIterator.nextEntry(HashMap.java:841)
at java.util.HashMap$KeyIterator.next(HashMap.java:877)
at er.extensions.migration.ERXMigrator._buildDependenciesForModelsNamed(ERXMigrator.java:236)
at er.extensions.migration.ERXMigrator.migrateToLatest(ERXMigrator.java:158)
at er.extensions.ERXApplication.finishInitialization(ERXApplication.java:831)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.webobjects.foundation.NSSelector._safeInvokeMethod(NSSelector.java:122)
at com.webobjects.foundation.NSNotificationCenter$_Entry.invokeMethod(NSNotificationCenter.java:588)
at com.webobjects.foundation.NSNotificationCenter.postNotification(NSNotificationCenter.java:532)
at com.webobjects.foundation.NSNotificationCenter.postNotification(NSNotificationCenter.java:546)
at com.webobjects.appserver.WOApplication.run(WOApplication.java:1223)
at er.extensions.ERXApplication.run(ERXApplication.java:925)
at com.webobjects.appserver.WOApplication.main(WOApplication.java:547)
at er.extensions.ERXApplication.main(ERXApplication.java:397)

 _______________________________________________
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: ERXMigration Problem with Multiple Models
      • From: Mike Schrag <email@hidden>
  • Prev by Date: Re: Are one-to-one relationships valid?
  • Next by Date: Re: Are one-to-one relationships valid?
  • Previous by thread: Re: Are one-to-one relationships valid?
  • Next by thread: Re: ERXMigration Problem with Multiple Models
  • Index(es):
    • Date
    • Thread