Yes I am using nested object contexts. The problem is that I am calling
some newObject() to create new relationships on the post add phase. How can
I do this safely when using nested ObjectContexts and CommitChanges? My
client wants that every commitchanges must be done to the DB but the
rollbackchanges must continue to be locally...

Regards
Bruno

On Thu, Jul 5, 2012 at 2:31 PM, Andrus Adamchik <and...@objectstyle.org>wrote:

> Any chance you are using nested ObjectContexts? It appears the callback
> happens during commit from child to parent context when a new object is
> created registered in parent.
>
> Andrus
>
> On Jul 5, 2012, at 4:03 PM, Bruno René Santos wrote:
>
> > Here it goes:
> >
> > MyClass.onPostAdd: 19
> > Hidden Source Calls
> > Method.invoke: 601
> > CallbackOnEntity.performCallback: 46
> > LifecycleCallbackEventHander.performCallbacks: 184
> > LifecycleCallbackEventHander.performCallbacks: 151
> > LifecycleCallbackRegistry..performCallbacks: 222
> > BaseContext.injectInitialValue: 665
> > DataContext.registerNewObject: 618
> > ChildDiffLoader.nodeCreated: 116
> > NodeCreateOperation.apply: 37
> > CompoundDiff.apply: 91
> > ObjectStoreGraphDiff.apply: 134
> > DataContext.onContextFlush: 770
> > BaseContext.onSync: 516
> > DataContext.flushToParent: 817
> > DataContext.commitChanges: 756
> >
> > On Thu, Jul 5, 2012 at 1:17 PM, Andrus Adamchik <and...@objectstyle.org
> >wrote:
> >
> >> I guess you had an attachment here that was stripped off by the list
> >> managing software. Can you post it as text?
> >>
> >> On Jul 5, 2012, at 11:43 AM, Bruno René Santos wrote:
> >>
> >>> Here goes the callstack for this problem when I call commitChanges()
> >>>
> >>> ---------- Forwarded message ----------
> >>> From: Bruno René Santos <brunor...@holos.pt>
> >>> Date: Thu, Jul 5, 2012 at 12:27 AM
> >>> Subject: onPostAdd is called on CommitChanges...
> >>> To: user@cayenne.apache.org
> >>>
> >>>
> >>> I am using Cayenne 3.1B1 and when I call commitChanges the callback
> >> postAdd on one of my objects is called? Anyone can guess why?
> >>>
> >>> Regards
> >>> Bruno
> >>>
> >>> --
> >>> Bruno René Santos | brunor...@holos.pt | 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: www.holos.pt
> >>>
> >>> 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
> >>>
> >>>
> >>>
> >>> --
> >>> Bruno René Santos | brunor...@holos.pt | 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: www.holos.pt
> >>>
> >>> 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
> >>
> >>
> >>
> >
> >
> > --
> > Bruno René Santos | brunor...@holos.pt | 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: www.holos.pt
> >
> > 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
>
>
>


-- 
Bruno René Santos | brunor...@holos.pt | 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: www.holos.pt

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

Reply via email to