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
memory/cpu-wise.

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

mrg


On Thu, Apr 20, 2017 at 7:12 AM, Markus Reich <[email protected]>
wrote:

> 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
>

Reply via email to