Great. I'll try to modify the CommitChanges and CommitChangesToParent in
order to create a very short lived context to where I copy all
modifiedObjects and deletedObjects in order to commit them. But what
about the commit order on the DB? the change graph is followed on the
new context? The problem here is that I have a team of 10 people
developing on top of my app and I wanted to minimize the changes on the
application in order to migrate to different read and write contexts.
Bruno
Em 24-01-2011 11:14, Andrus Adamchik escreveu:
On Jan 24, 2011, at 1:04 PM, Bruno René Santos wrote:
So the best way to do this is to keep my shared DataContext for reading and
when I need to change something I create a new DataContext, pass the object
read to this new context (using for instants an ObjectIdQuery) and commit on
this new Context.
Correct. Or you can use ObjectContext.localObject(object.getObjectId(), null)
to get a copy of an object in another context.
To refresh the read-only Context with the changes I will need to perform a new
query?
Actually Cayenne should refresh it for you after peer context commit.
Andrus
--
Bruno René Santos | [email protected] <mailto:[email protected]> |
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