I was just pointing out that deprecated = gone in this case.  :-)

Option 1 is to make the code still call fetchFinished() for 3.0 and
get rid of it in 3.1.  Option 2 would be to remove it from the actual
code and documentation since it looks like it is still supported.  The
downside to option 2 is that there would be no warning to the
end-user.  I just looked in the JavaDoc docs and I was hoping to find
an @removed or similar, but didn't see one.

I can do the PostLoad callback tomorrow.  Just reporting what I'm
finding thus far.

/dev/mrg


On 7/26/07, Andrus Adamchik <[EMAIL PROTECTED]> wrote:
IMO with 3.0 being a major version change, it's a fair game to change
API .. as long as we don't abuse it. And in fact you can setup a
'PostLoad' callback to invoke existing 'fetchedFinished' on your
objects, so there is a reasonable replacement. Even better - since
POST_LOAD is executed between DataContext and DataDomain, you won't
even have to switch to ObjectContext. Instead you can instantiate the
DC with this bit of extra wiring (that will hopefully go away in the
following milestones):

// postInterceptor can be shared between multiple DataContexts
DataChannelCallbackInterceptor postInterceptor = new
DataChannelCallbackInterceptor();
postInterceptor.setChannel(domain);
ObjectStore objectStore = new ObjectStore
(domain.getSharedSnapshotCache());

DataContext context = new DataContext(postInterceptor, objectStore);


// here is how you would register callbacks (once per app)
LifecycleCallbackRegistry registry = domain.getEntityResolver
().getCallbackRegistry();
registry.addListener(LifecycleListener.POST_LOAD, MyDataObject.class,
"fetchFinished");


Andrus


On Jul 26, 2007, at 9:30 PM, Michael Gentry wrote:

> OK, I finally was able to try to migrate my old 1.2.x project to 3.0.
> After some missing jar (log4j, common collections, etc) issues and
> renaming all of my packages from objectstyle to apache, I was able to
> launch the application but it doesn't work.  A good portion of my
> application depends on fetchFinished() being called.  Yes, I know
> fetchFinished() is deprecated and the implementation in
> CayenneDataObject still exists (and still does nothing), but it
> appears the code to actually call it when the fetch is finished has
> been removed, so I get lots of NULL objects (I resolve a lot of things
> after a 'notification' object is read in).  If fetchFinished() is
> deprecated, shouldn't it still be called?
>
> Thanks,
>
> /dev/mrg
>
> PS. It did a lot of nice-looking SQL before failing, though.  :-)
>


Reply via email to