Re: Generating EO Model using EOF API

From: Mike Schrag (mschra..dimension.com)
Date: Fri Feb 16 2007 - 12:16:20 EST

  • Next message: Kieran Kelleher: "Re: Question on JARs"

                    NSDictionary connectionDictionary = ...;
                    EOAdaptor adaptor = EOAdaptor.adaptorWithName("JDBC");
                    adaptor.setConnectionDictionary(connectionDictionary);
                    adaptor.assertConnectionDictionaryIsValid();
                    EOAdaptorContext context = adaptor.createAdaptorContext();
                    EOAdaptorChannel channel = context.createAdaptorChannel();
                    NSArray tableNames = channel.describeTableNames();
                    EOModel model = channel.describeModelWithTableNames(tableNames);
                    model.writeToFile("/path/to/outputeomodel");

    On Feb 16, 2007, at 11:53 AM, JR Ruggentaler wrote:

    > I have an existing DB schema and I would like to generate and EO Model
    > from my schema using the EOF APIs. Does anyone have and example of
    > doing
    > this or know of documentation to do this? I don't have a Mac and I
    > don't
    > run any of the WO tools (EOModeler...) so I would just like to use the
    > EOF APIs. I can edit the resulting model using Entity Modeler or a
    > text
    > editor.
    >
    > Thanks!
    > J.R.



    This archive was generated by hypermail 2.0.0 : Fri Feb 16 2007 - 12:17:12 EST