I also use the localObjects() approach [also inherited from using
WebObjects], and was going to post the same suggestion.
Another approach might be to simply copy the form values into a temporary
object, and not assign them to an actual DataObject until you're going to
commitChanges() on it.
-Mike
Andrus Adamchik <andru..bjectstyle.org> wrote:
> You can do this in Cayenne, it'll work. There is a "localObjects()"
> method on a DataContext. Still this approach seems wasteful in both EOF
> and Cayenne, as *Context is optimized for use as a local object cache.
>
> (OT: bbum made a big point of how slow this is in EOF during a WO
> performance optimization session at WWDC this year).
>
> Andrus
>
>
> On Jul 14, 2004, at 10:45 AM, wojingo wrote:
> > Hi,
> >
> > I have been lurking on the list for awhile and havent actually coded
> > anything using Cayenne yet, so forgive my ignorance. :)
> >
> > The approach I have used sucessfully in WO is to have an EditingContext
> > per WOComponent this means that I usually fetch the objects the page
> > needs into its editing context. When I have objects in different
> > editing
> > contexts that I need to use in a relation I used the localInstance of
> > object method to pull the object into the relevant editing context.
> >
> > Can I use the same approach in Cayenne?
> > Is there an equivalent method of localInstance of object?
> >
> > I guess its time for me to dive in and actually write something using
> > Cayenne!
> >
> > regards
> > -
> > shaun
>
This archive was generated by hypermail 2.0.0 : Wed Jul 14 2004 - 15:14:14 EDT