----- Original Message -----
From: "Andrus Adamchik" <andru..bjectstyle.org>
To: <cayenne-deve..bjectstyle.org>
Sent: Thursday, December 23, 2004 4:33 AM
Subject: Re: Safer version of IncrementalFaultList.DataRowListHelper
>Hi Derek,
>> Basically I can end up with full data row maps (not just idmaps)
>> in some of the entries in my version of the IncrementalFaultList.
>Is this because of some of your customizations? Could you explain?
Yes. I have changed IncrementalFaultList to allow me to "revert" the current
batch to ids after the next batch is loaded. This allows me to run through
large lists of items without blowing out the memory (and not holding nasty
amounts of locks for a long time). What I found (from memory) was that the
map used to pre-fill the first batch was a full data row, not the short id
field only map that is used for the successive batches. The prefill takes
this full data row map and creates the objects for the first batch. But
after I reverted the first batch to data rows, the next time I accessed the
first batch again it could not replace the (full) data row with the data
objects as the id map did not equal the full data row map. Why would I worry
about this? Well, for one thing, we have a commercial reporting tool that,
in some cases, will iterate through a list of objects for each column (we
are trying to avoid layouts that "provoke" this behaviour, but ...).
>Anyway, the code looks ok. Please submit it in a patch format via JIRA, so
>that we don't forget. I'll review and commit it after the holidays. If you
>can come up with some junit tests for this addition, please post them too.
I'm embarrassed to admit that I didn't know that there was a specific patch
"format" till today (I'm a "double-click to install" kinda guy). After I
Googled I found that there is a Windows version, which I have now
downloaded. I will try to get my head around it, but this close to Christmas
there are a few other things that have to be done (and down this end of the
world it's then the big summer break :-). I suspect that a straight diff on
the file/class is not what you'd want anyway, as it contains my other
changes relating to the above functionality. That means I'll need to set up
a fresh environment and add just the DataRowListHelper changes - sigh. May
not be able to get time/opportunity do this for a few weeks :-(
BTW: I have had some interesting experiences in trying to get a subclass of
DataContext working (i.e. part of trying to move my changes out of the
Cayenne code base and into our code base so we can use the standard Cayenne
distribution). It works, but I had to go through a few unexpected loops. If
you are interested I could look at summarising and posting it - but again,
it may have to wait till I get back from holiday (I am not taking my laptop
away with me - family wont let me ;-).
Regards
Derek
This archive was generated by hypermail 2.0.0 : Wed Dec 22 2004 - 17:13:36 EST