Re: No access to getObjectStore().getFlattenedInserts() / getFlattenedDeletes()

From: Mike Kienenberger (mkienen..mail.com)
Date: Sat Dec 31 2005 - 19:31:17 EST


I don't have time to fully-process your response tonight, but I'll
comment on this part:

On 12/31/05, Andrus Adamchik <andru..bjectstyle.org> wrote:
> I agree and realize that you need a solution now. And I think you
> don't need a patch to use your approach. Subclassing would be enough.
> The trick is to put your subclass in org.objectstyle.cayenne.access
> package (inside your application source tree of course). The fields
> you need to access are not private, they are just not public, so by
> doing that you'll get full access to these methods:

Yes, and, indeed, this was my first step.

I created a FlattenedAccessingDataContext class and factory subclass
that looks almost identical to what you suggest.

The problem is that the FlattenedRelationshipUpdate class is final and
not public. So I had a list of non-class-castable data objects that
I couldn't work with :)

I could probably have used the same trick to have performed all of my
audit processing in an org.objectstyle.cayenne.access class (or in my
subclass of DataContext), but it was getting a bit ugly to do it that
way.

However, it's probably time to revisit that idea :)

Thanks for reminding me of this possibility.

-Mike



This archive was generated by hypermail 2.0.0 : Sat Dec 31 2005 - 19:31:19 EST