cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kevin Menard <nirvd...@gmail.com>
Subject Re: Updating Cayenne Advice 1.x => 3.0: createAndRegisterNewObject is deprecated...
Date Wed, 21 Oct 2009 17:15:41 GMT
Hi Eric,

It's been a while since I've upgraded from 1.x.  Cayenne 2.x should be
API compatible with 1.2, save for the new apache package names.  The
changes from 2.x to 3.x were mostly backward compatible.  If you
wanted to, you could upgrade in two steps, using 2.x to make sure you
got all the object references correct.

newObject should do what you need now.  The data object will be
automatically registered with the ObjectContext (note that this now
the new interface for DataContext and CayenneContext).  You can
associate unregistered objects with registered ones and they'll be
automatically registered with the same context as well.

The really big change you need to be aware of is that Cayenne 3 is
Java 5+ only.  So, if you need to run on an older JVM you should stick
with 1.2/2.x.

-- 
Kevin



On Wed, Oct 21, 2009 at 8:07 AM, Eric Lazarus <ericllazarus@yahoo.com> wrote:
> We have been using 1.x happily for years and now finally have a reason to upgrade: our
need for embedded database (e.g., H2) support. Seems like createAndRegisterNewObject is deprecated.
I assume we are supposed to use one or another version of newObject() instead. Is that right?
What else should we do differently?
>
> What OTHER advice do you have for someone finally getting around to upgrading?
>
> Thanks!
>
> Eric
>
>
>
>

Mime
View raw message