[RDBO] 4 key map table advice sought

2007-04-16 Thread Jonathan Vanasco
I have a 4 key map table , and its confusing me how to do this in rose. Rose Tutorial: Products id , name Colors id , name Product2Color product_id , color_id My Setup Adds in a 'user' fkey + time to track the assignment of

Re: [RDBO] 4 key map table advice sought

2007-04-16 Thread John Siracusa
On 4/16/07 10:02 AM, Jonathan Vanasco wrote: MyRose::Object::Product relationships = [ colors = { type= 'many to many', map_class = 'MyRose::Object:: Product2Color', map_from = 'product_id', map_to = 'color_id',

Re: [RDBO] dbh caching

2007-04-16 Thread Perrin Harkins
On 4/16/07, Tim Bunce [EMAIL PROTECTED] wrote: If there's an exception, I believe DBI issues a rollback automatically, Nope. Yes, I was looking at the DESTROY code, not the error handling code. I was talking to Bill about this off-list and he showed me a case where my strategy fails. It

Re: [RDBO] Column is not null

2007-04-16 Thread John Siracusa
On 4/16/07 10:26 AM, Ovid wrote: I can't find this in the docs, but I'm wondering how I go about an 'is not null' search. query = [ '!install_vlan' = undef ], http://search.cpan.org/dist/Rose-DB-Object/lib/Rose/DB/Object/QueryBuilder.p m#query The example below should work too, but

Re: [RDBO] Read-only objects

2007-04-16 Thread Jonathan Vanasco
On Apr 6, 2007, at 12:04 PM, Ovid wrote: On a side note, the code you posted for making things 'read only' seemed a bit complicated for me. I simply do something similar to this: package My::DataCentre; use base 'My::Rose::DB::Object'; sub meta_class {

Re: [RDBO] Read-only objects

2007-04-16 Thread Ovid
--- Jonathan Vanasco [EMAIL PROTECTED] wrote: I think you *should* be able to just: a- create a view that selects from the db and returns the same cols Except that this has the same problem as a database handle with only SELECT permissions: the actual failure could occur far away from

[RDBO] object caching functionality

2007-04-16 Thread Jonathan Vanasco
I'm going to need to cache my objects into memcached , and looking for options. the quickdirty way would be to just use storable. i think cache::memcached should be able to bring back the entire object structure -- including nested objects has anyone done this? pros / cons ? my other

Re: [RDBO] object caching functionality

2007-04-16 Thread John Siracusa
On 4/16/07 12:07 PM, Jonathan Vanasco wrote: i'm thinking of the following naming scheme: Helpers::object_as_yaml Helpers::init_with_yaml_object ( using the term 'object' as it is a deep 'loaded related' object, not a flat column/pairs ) How about object_tree instead of just object to

Re: [RDBO] object caching functionality

2007-04-16 Thread John Siracusa
On 4/16/07 12:22 PM, John Siracusa wrote: How about object_tree instead of just object to better indicate that input/output isn't just a long object: ^ Er, lone -John - This SF.net email is