Convert EO Model from Oracle to Derby at runtime
Convert EO Model from Oracle to Derby at runtime
- Subject: Convert EO Model from Oracle to Derby at runtime
- From: JR Ruggentaler <email@hidden>
- Date: Wed, 9 Jul 2008 14:17:33 -0500
I have a EO model that I want to move some entities at runtime from an Oracle database to a local Derby database. I created a new model at run time and added the entities to the new model and removed the same entities from the other model. Then I tried using:
EOSchemaGeneration.createTableStatementsForEntityGroup(localModel.entities());
to generate the Derby create statements but that fails at:
EOSQLExpression.columnTypeStringForAttribute();
the external types from the Oracle model are different from Derby. For example Derby doesn't recognize NUMBER and VARCHAR2. Is there some way to convert a model written for one RDBMS (Oracle) to another RDBMS (Derby)? I can manually iterate the attributes and change the attribute external type (EOAttribute.setExternalType()) but I am hoping EOF or some one on this list has a more elegant way of switching RDBMS on the fly in code.
P.S. I am using WO 5.4
JR |
_______________________________________________
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