Re: Creating a EOModel in code
Re: Creating a EOModel in code
- Subject: Re: Creating a EOModel in code
- From: Aaron Rosenzweig via Webobjects-dev <email@hidden>
- Date: Fri, 26 Jun 2020 15:04:41 -0400
Hi Don,
Have a look at EOEntity and friends: EOAttribute, EORelationship.
You can build them out and setup the “external” name for the column, etc. I did
it once as an exercise many moons ago. The only practical use I got out of it
was sometimes sanity checking keyPaths to see if they hit things “in memory” or
if they were completely traversable through EOEntity relationships. Something
that trips an in-memory method call is not something you can use to build a
complex SQL query.
Like other people have said, the “reverse engineering” of the original WO tools
is more likely what you want to use instead. You point Entity Modeler at a
database and it can make a surprisingly good model file from it. Depending on
how big the database is… it might be worth your trouble of firing up MacOS
Tiger and installing the NeXTStep GUI tools to do the reverse engineering. I
don’t think that the Eclipse java based EntityModeler can reverse engineer. I
don’t know if Cayenne can reverse engineer.
AARON ROSENZWEIG / Chat 'n Bike <http://www.chatnbike.com/>
e: email@hidden <mailto:email@hidden> t: (301) 956-2319
> On Jun 25, 2020, at 8:53 PM, Don Lindsay via Webobjects-dev
> <email@hidden> wrote:
>
> Hello;
>
> The Documentation for EOModel states that you can build one in code, but
> there are no examples or further information that I can find. Does anyone
> have any documentation or samples that they can direct me to so I can create
> EOModels while the application is running:
>
> What I want to do is connect to a database that my app does not know about,
> someone provides connection parameters and I create an EOModel and connect to
> that database or rest and access it using the EOModel created using new
> EOModel().
>
> Thanks
>
> Don
> _______________________________________________
> 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