Re: framework load order????
Re: framework load order????
- Subject: Re: framework load order????
- From: Ramsey Gurley <email@hidden>
- Date: Mon, 23 Feb 2015 16:19:48 -0700
In your framework principal class you reference ERCoreBL.class in your REQUIRES constant. That will ensure it is loaded before your framework can finish loading. See er.r2d2w.ERR2D2W for an example.
You need to set up your framework principal correctly
https://wiki.wocommunity.org/display/documentation/Creating+a+ERXFrameworkPrincipal+subclass?src=search
And you need to define which migrations you want to run before yours in your Migration's modelDependencies() method. See ERCoreBL0 for an example.
On Feb 23, 2015, at 4:09 PM, Theodore Petrosky <email@hidden> wrote:
> How can I ensure that ERCoreBusinessLogic is loaded BEFORE my framework. I ordered the frameworks and put the ERCBL on top, ahead of my framework, but still no joy. I need to run some SQL against the ERCBL:
>
> ERXJDBCUtilities.executeUpdate(database.adaptorChannel(), "ALTER TABLE ERCAuditTrail DROP COLUMN is_deleted");
> ERXJDBCUtilities.executeUpdate(database.adaptorChannel(), "ALTER TABLE ERCAuditTrail ADD COLUMN is_deleted boolean not null");
>
> I want to put this in a migration and run it AFTER ERCBL’s migrations are run.
>
> Or is there someplace else I can put this?
>
> Actually, is this something I should put into a pull request. if I don’t make this change, I will get:
>
> com.webobjects.eoaccess.EOGeneralAdaptorException: EvaluateExpression failed: <com.webobjects.jdbcadaptor.PostgresqlExpression: "INSERT INTO ERCAuditTrail(GID, id, IS_DELETED) VALUES (?::varchar(255), ?::int4, ?::bool)" withBindings: 1:_EOIntegralKeyGlobalID[EventBook (java.lang.Integer)19](gid), 2:1(id), 3:false(isDeleted)>: Next exception:SQL State:42804 -- error code: 0 -- msg: ERROR: column "is_deleted" is of type integer but expression is of type boolean Hint: You will need to rewrite or cast the expression. Position: 84 Next exception:SQL Warning:00000 -- error code: 0 -- msg: parse <unnamed>: SHOW TRANSACTION ISOLATION LEVEL Next exception:SQL Warning:00000 -- error code: 0 -- msg: bind <unnamed> to <unnamed> Next exception:SQL Warning:00000 -- error code: 0 -- msg: execute <unnamed>:
>
> anyone else have this problem?
>
> Ted
> _______________________________________________
> 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