cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Gentry <mgen...@masslight.net>
Subject Re: Accessing DataContext
Date Mon, 28 Mar 2011 16:15:41 GMT
Hi Eldred,

You may want to read through the UPGRADE.txt file in 3.1.  Of interest
to you is this snippet:


E.g. to instantiate the Cayenne stack in 3.1 you would do something like that:

    ServerRuntime cayenneRuntime = new
ServerRuntime("cayenne-UntitledDomain.xml");

To obtain a new ObjectContext, the following API is used:

    ObjectContext context = cayenneRuntime.getContext();


mrg


On Mon, Mar 28, 2011 at 11:46 AM, Eldred Mullany
<eldred.mullany@easypay.co.za> wrote:
> Hi all
>
> I have upgraded from cayenne3.0 to 3.1M2 and obviously have a few
> breakable changes.
>
> From 3.0 I was able to access Datacontext  ie ObjectContex context =
> DataContext.createDataContext() for a standalone application.
>
> How would I access the context from 3.1M2 ?
>
> Is there any documentation from 3.0 to 3.1 that can help me ?
>
> Many thanks
> Eldred
>

Mime
View raw message