cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Gentry <>
Subject Re: Detached Cayenne Objects
Date Thu, 20 Apr 2017 11:27:41 GMT
Hi Markus,

As you have discovered, Cayenne objects need to be in a context when
relationships are involved.  I'm curious why you think creating a context
is very expensive, though?  It should actually be pretty cheap

As for copying objects, are you copying committed objects or copying
new/modified objects and you need the new values?


On Thu, Apr 20, 2017 at 7:12 AM, Markus Reich <>

> Hi,
> I have a very special problem :-/
> We want to use a cayenne object as detached object, for a simple object
> this works fine, as the attribute values are hosted in a value map, but we
> need a context when we want to use  the relations too :-/
> What would be the best approach?
> At the moment we create the object in a second context and copy the
> attributes / relations with reflection (deep copy) as we have a lot of this
> objects, creating context is very expensive and we want to reduce costs :-)
> br
> Markus

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message