John Siracusa <[EMAIL PROTECTED]> writes:
> On 12/27/05 8:27 AM, John Siracusa wrote:
>> On 12/27/05 8:22 AM, John Siracusa wrote:
>>> [a bunch of stuff that's not applicable to your situation]

[...]

> Earlier, I suggested renaming your db columns, but that's actually a pretty
> extreme solution.  

Meanwhile, changing the column names to match the Rose::DB::Object
conventions has resolved the problem, so things work nicely now.

I can now manage the relationships nicely, including creating and
destroying the linkages, and walking through the tree to reach the root,
with trivial extensions to the base class.  


The one surprise that I have run into thus far is an odd caching
effect.  I have deliberately derived my classes from 'Rose::DB::Object',
rather than the cached variant, to try and discourage caching while I
play with stuff.

So, it came as something of a surprise to me that my 'many to many'
relationship was caching:

The code (in my test suite) ran basically like this:

Create this tree structure in the table, using the 'foo' and 'fooparent'
data structure from before.

 1 -- 2 -- 3
   -- 4 -- 5

Then, I created a fooparent record linking 5 to 2, so that 5 would have
two parents, 4 and 2.  That was directly created, not through the
relationship class. 

Then, I tested that I had two parents ... and got one, 4, just like in
the previous testing.

Reloading 5 from the database causes the test to pass, leading me to
conclude that the 'many to many' relationship must be cached somewhere.

Is this correct, or is there something more complex going on?  I don't
think there is, as I checked the database manually and the linkage was
surely there in the table.

   Daniel



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
Rose-db-object mailing list
Rose-db-object@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rose-db-object

Reply via email to