[RDBO] Faking row level triggers

2007-02-17 Thread Ask Bjørn Hansen
Hi everyone, I needed to run a method after every save (I add stuff to a log table and want the code to automatically update an RRD table too). After unsuccessfully fiddling with column level triggers for a bit, I realized I could just override save: sub save { my $self = shift; my

Re: [RDBO] New Manager argument forms

2007-02-17 Thread Danial Pearce
> i thought > > get_objects( query=>{} ) > and > %args= ( query=> {} ) > get_objects( \%args ) > > acted the same Why would you think that? The first example is passing a hash, the second is passing a hashref. -- "When I was a kid I used to pray every night for a new bike

Re: [RDBO] New Manager argument forms

2007-02-17 Thread Jonathan Vanasco
On Feb 17, 2007, at 8:40 PM, John Siracusa wrote: > Right, there's no ambiguity because a hashref or arrayref has never > been a > valid top-level arg before. ah. ok. +1 then. i thought get_objects( query=>{} ) and %args= ( query=> {} ) get_objects( \%args ) acted t

Re: [RDBO] New Manager argument forms

2007-02-17 Thread John Siracusa
On 2/17/07 10:22 AM, Graham Barr wrote: > On Feb 16, 2007, at 7:26 PM, Jonathan Vanasco wrote: >> On Feb 16, 2007, at 1:11 PM, John Siracusa wrote: >>> Con: small additional overhead to check and coerce the args >> >> wouldn't that require all of these get_objects parameters to now >> become reser

Re: [RDBO] How to use Rose::DB::Object::{Loader, Helpers} at the same time?

2007-02-17 Thread John Siracusa
On 2/16/07 9:13 PM, George Hartzell wrote: > This question still stands, is there a standard way to use mixin > classes w/ Loader? The usual way is to create a common base class with all the helpers you want, then tell the loader to use that class as the base_class. http://search.cpan.org/dist/Ro

[RDBO] bug and/or sharp rusty edge in rdbo::Loader and/or relationships.

2007-02-17 Thread George Hartzell
Hi John (and everyone), I just figured out why I wasn't getting an automatically generated add_ method in one of my classes. It turned out that Loader wasn't generating the appropriate relationship. Long story short, I had a table named "set", and another named "set_member", one set can have ma

Re: [RDBO] New Manager argument forms

2007-02-17 Thread Graham Barr
On Feb 16, 2007, at 7:26 PM, Jonathan Vanasco wrote: > > On Feb 16, 2007, at 1:11 PM, John Siracusa wrote: > >> Con: small additional overhead to check and coerce the args > > wouldn't that require all of these get_objects parameters to now > become reserved words, unusable as column names ? ( w

Re: [RDBO] Only the first unique key is used for load?

2007-02-17 Thread Graham Barr
On Feb 13, 2007, at 9:18 AM, John Siracusa wrote: > On 2/13/07, Graham Barr <[EMAIL PROTECTED]> wrote: >> This could be done by adding a column_exists method to RDBO which >> would >> only return true if the named column had been loaded from the DB >> or set >> by calling the accessor method.