[Glorp-development] 'Dirty' queries

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[Glorp-development] 'Dirty' queries

Mark Plas
Hi,

This mail is part of a set of glorp questions I have (see some other
mails I've sent recently).

The topic I would like to address here is:

Glorp doesn't take into account the changes that are made to objects in
the session when performing a query. Or, more correctly, it takes them
into account only partially: only the end result of the query gets
filtered if objects in it would already be deleted and in some cases
objects will get added to the result of a query (for 1-to-many
relationships I guess).
I have done some experiments, not related to glorp, in which I flush
(part of) the changes made to objects to the database - without
committing. Then I perform a query, and then I rollback the changes on
the database. This seems to work ok (on Oracle).
My question: Do you think it would be difficult to put this kind of
behavior in Glorp? Perhaps via an extra parameter on a Query object to
tell Glorp to temporarily flush its changes.

Thanks,
Mark