• 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
Re: Convert EO Model from Oracle to Derby at runtime
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Convert EO Model from Oracle to Derby at runtime


  • Subject: Re: Convert EO Model from Oracle to Derby at runtime
  • From: David Avendasora <email@hidden>
  • Date: Wed, 9 Jul 2008 16:57:03 -0400


On Jul 9, 2008, at 4:32 PM, JR Ruggentaler wrote:


On Jul 9, 2008, at 3:11 PM, David Avendasora wrote:

JR,

I think you don't understand what the prototypes are that Chuck is referring to.

I do understand but we are not using prototypes. The EO models are quite old and were always targeted at Oracle and the external types were specified using Oracle types (VARCHAR2, NUMBER,...) back in the WO 4.x days.

The good news is that setting them up is only marginally more work than manually updating everything once. So if you are at a point of considering manually updating the model, then you might as well move to Prototypes, and then not have to worry about it again in the future.




Prototypes, when talking about Entity Modeler, are a way to abstract the DB's data types from the model. So instead of specifying the external type for a attribute, you specify which prototype to use. You can then swap out the prototypes from Oracle ones to Derby ones and your done. Without prototypes, you'll have to manually change them. Prototypes _are_ the automatic way of changing RDBMSs that you are looking for.

http://wiki.objectstyle.org/confluence/display/WOL/Using+Entity+Modeler
I will check out the page.

Scroll down to the section on prototypes and it will show you how to add them to your model. This should save you a lot of time in the future.

Dave

On Jul 9, 2008, at 3:32 PM, JR Ruggentaler wrote:

No, no prototypes are used. All the entities are EOGenericRecords and are modified quarterly+. We are trying speed access to this data but we don't want to cache these entities due to the amount of data.

On Jul 9, 2008, at 2:24 PM, Chuck Hill wrote:

Are you using prototypes in your model?


On Jul 9, 2008, at 12:17 PM, JR Ruggentaler wrote:

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

--

Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems.
http://www.global-village.net/products/practical_webobjects







_______________________________________________ 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
References: 
 >Convert EO Model from Oracle to Derby at runtime (From: JR Ruggentaler <email@hidden>)
 >Re: Convert EO Model from Oracle to Derby at runtime (From: Chuck Hill <email@hidden>)
 >Re: Convert EO Model from Oracle to Derby at runtime (From: JR Ruggentaler <email@hidden>)

  • Prev by Date: Re: Convert EO Model from Oracle to Derby at runtime
  • Next by Date: Re: Convert EO Model from Oracle to Derby at runtime
  • Previous by thread: Re: Convert EO Model from Oracle to Derby at runtime
  • Next by thread: Re: Convert EO Model from Oracle to Derby at runtime
  • Index(es):
    • Date
    • Thread