cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bruno René Santos <>
Subject Re: DataContexts mixed
Date Mon, 02 Apr 2012 09:08:33 GMT
Hello Aristedes,

I have just found out the problem.... I had two DataObjects, one inherited
from other but with no other difference. So Cayenne got confused and gave
me versions of the same object on the Parent object and also in the Child
Object on different contexts. The child was from the context I have just
committed (the child one) the parent was on the current context. So when I
defined a qualifier for the child, really differentianting from the parent,
everything was resolved.


On Sat, Mar 31, 2012 at 2:19 AM, Aristedes Maniatis <>wrote:

> On 31/03/12 3:06 AM, Bruno René Santos wrote:
>> Hello all,
>> I am using now Cayenne 3.1M4 Snapshot and first let me just say that its
>> performance is much better than 3.0.1 (How did you do it? just curious)
>> but
>> I am having a strange problem.
>> I am creating a web application with popups as item details where I use
>> child contexts in order to able to rollback changes on these popups
>> without
>> ruining the level below the popup. One of the quirks we have, by client
>> request, is that any commit changes on any popup saves directly to the DB
>> but we still need to mantain the local roolback on each popup.
> I suspect that Cayenne child nested contexts are not what you want to be
> using there. You probably just want another plain vanilla context, but once
> you commit you might want to copy any objects you just committed into the
> "parent" context (if they are referred to there).
> I can see that your code is going to get very messy if the "parent" object
> is new and not yet committed to the database, but you open the popup and
> want to commit those to the database with a join to the parent. Ugh.
> Ari
> --
> -------------------------->
> Aristedes Maniatis
> GPG fingerprint CBFB 84B4 738D 4E87 5E5C  5EFA EF6A 7D2E 3E49 102A

Bruno René Santos | | Gestor de Projectos | Analista |
Programador | Investigador

Holos - Soluções Avançadas em Tecnologias de Informação S.A.
Parque de Ciência e Tecnologia de Almada/Setúbal . Edifício Madan Parque
Rua dos Inventores . Quinta da Torre . 2825 - 182 Caparica . Portugal
Phone: +351 210 438 686 . Fax: +351 210 438 687 . Web:

This email and any files transmitted with it are confidential and intended
solely for the use of the individual or entity to whom they are addressed.
If you are not the intended recipient or the person responsible for
delivering the email to the intended recipient, be advised that you have
received this email in error and that any use, dissemination, forwarding,
printing, or copying of this email is strictly prohibited. If you have
received this email in error please notify Bruno René Santos by telephone
on +351 210 438 686

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