Re: Migrations and OpenBase
Re: Migrations and OpenBase
- Subject: Re: Migrations and OpenBase
- From: WebObjects <email@hidden>
- Date: Fri, 17 Oct 2008 12:09:52 -0500
Yes im (was) using the OpenBase plugin. Im chanign to FrontBase now. Im just in a learning phase so I can change whatever I want. I hope in real-work app I will be able to handle the errors
Gus
On Oct 17, 2008, at 12:03 PM, Darryl Snover wrote: On Oct 17, 2008, at 6:03 AM, David Avendasora wrote: Gus,
Can you turn on EOAdaptor Debugging so you can see what the actual SQL being sent to the DB is? Do this by creating the following property in your Resources/Properties file:
log4j.logger.er.transaction.adaptor.EOAdaptorDebugEnabled=DEBUG
The log you sent shows two conflicting things:
Oct 16 18:32:57 ControlHorarios[1250] (ERXJDBCUtilities.java:588) INFO er.extensions.jdbc.ERXJDBCUtilities - Executing ALTER TABLE EMPLOYEETURN ADD CONSTRAINT EMPLOYEETURN_EMPLOYEE_ID_id_FK FOREIGN KEY (EMPLOYEE_ID) REFERENCES EMPLOYEE (id)
and
2008-10-16 18:32:57 -0500: &ScheduleControl:SQL ERROR - [position 24, near 'ADD' in 'PLOYEETURN ADD CONSTRAINT'] alter table command expected but not found.{ NSColor = NSCalibratedRGBColorSpace 0 0 1 1; }
You can see that the SQL the migration is trying to send to the table looks properly formed (I am not an OpenBase developer) but the error says that it isn't, so we need to see the actual SQL sent by the EOAdaptor.
The SQL that is being sent appears to be proper SQL for an Oracle database (and probably some others), but not for OpenBase (the two RDBMS systems I am most familiar with). It appears that based on the log information, the SQL that the DB received is the same, although truncated. For OpenBase, the SQL to add a foreign key constraint would be similar to that of adding the column (this is based on if the ID column in the EMPLOYEE table is a longlong or integer, or NUMBER of zero decimal precision):
ALTER TABLE EMPLOYEETURN ADD COLUMN EMPLOYEE_ID longlong index REFERENCES EMPLOYEE.id
Note that although the column EMPLOYEE_ID may already exist in the EMPLOYEETURN table, re-adding it will not result in any loss of data in OpenBase.
Are you using the OpenBase plugin?
Best Regards,
Darryl Snover
|
_______________________________________________
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