cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Gentry <>
Subject Re: Child Contexts
Date Tue, 21 Sep 2010 18:38:24 GMT
Hi Bruno,

The Child DataContext *might* share the same database connection as
the Parent DataContext.  In general, you don't care about this,
though.  The DataContext, on commitChanges(), will request a database
connection, use that connection for performing the commit, then return
the connection back to the pool.  It isn't required that the same
database connection be used between a performQuery() and a

If you do commitChanges() on a Child DataContext, it pushes the
changes to the Parent DataContext and to the database.  If you only
want the changes to go to the Parent DataContext and *not* the
database, use commitChangesToParent().


On Tue, Sep 21, 2010 at 2:22 PM,  <> wrote:
> Hello all,
> Do Child Contexts share the connection of a parent connection? When i do a
> commitChanges on the child the change is made on the database or in the
> parent? I have already read the Nested Contexts page on the User Guide but
> this detail was confusing for me.
> Thank you
> Bruno

View raw message