Problem with ERAttachmentMigration

9 views
Skip to first unread message

Pascal Robert

unread,
Mar 29, 2012, 4:03:47 PM3/29/12
to WebObjects Development
I have a rather strange problem with ERAttachmentMigration: the ERAttachment table is not created, so when the linked table try to create the foreign key, it crash the migration. I have tried to do some debugging, and in ERXMigrator._buildDependenciesForModelsNamed, pendingModelNames and processedModelNames never have ERAttachement, I only see the two models in the project.

I also tried to force it by using er.migration.modelNames with the three model names, no luck. Anyone have seen this?
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (Webobje...@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/webobjects-dev-garchive-31333%40googlegroups.com

This email sent to webobjects-dev...@googlegroups.com

David Holt

unread,
Mar 29, 2012, 4:07:29 PM3/29/12
to Pascal Robert, WebObjects Development
You have these properties set?

# Migrations
er.migration.migrateAtStartup=true
er.migration.createTablesIfNecessary=true


On 2012-03-29, at 1:03 PM, Pascal Robert wrote:

I have a rather strange problem with ERAttachmentMigration: the ERAttachment table is not created, so when the linked table try to create the foreign key, it crash the migration. I have tried to do some debugging, and in ERXMigrator._buildDependenciesForModelsNamed, pendingModelNames and processedModelNames never have ERAttachement, I only see the two models in the project.

I also tried to force it by using er.migration.modelNames with the three model names, no luck. Anyone have seen this?
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (Webobje...@lists.apple.com)
Help/Unsubscribe/Update your Subscription:

Pascal Robert

unread,
Mar 29, 2012, 4:21:27 PM3/29/12
to David Holt, WebObjects Development

Le 2012-03-29 à 16:07, David Holt a écrit :

> You have these properties set?
>
> # Migrations
> er.migration.migrateAtStartup=true
> er.migration.createTablesIfNecessary=true

Yes, and migrations for the two other models works fine.

>
> On 2012-03-29, at 1:03 PM, Pascal Robert wrote:
>
>> I have a rather strange problem with ERAttachmentMigration: the ERAttachment table is not created, so when the linked table try to create the foreign key, it crash the migration. I have tried to do some debugging, and in ERXMigrator._buildDependenciesForModelsNamed, pendingModelNames and processedModelNames never have ERAttachement, I only see the two models in the project.
>>
>> I also tried to force it by using er.migration.modelNames with the three model names, no luck. Anyone have seen this?
>> _______________________________________________
>> Do not post admin requests to the list. They will be ignored.
>> Webobjects-dev mailing list (Webobje...@lists.apple.com)
>> Help/Unsubscribe/Update your Subscription:
>> https://lists.apple.com/mailman/options/webobjects-dev/programmingosx%40mac.com
>>
>> This email sent to program...@mac.com
>


_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (Webobje...@lists.apple.com)
Help/Unsubscribe/Update your Subscription:

David Holt

unread,
Mar 29, 2012, 4:44:02 PM3/29/12
to Pascal Robert, WebObjects Development
You could try adding a model dependency to your migration file?

public NSArray<ERXModelVersion> modelDependencies() {
    return new NSArray<ERXModelVersion>(new ERXModelVersion[] { new ERXModelVersion("ERAttachment", 0) });
Reply all
Reply to author
Forward
0 new messages