[RDBO] Customising R:D:O:Loader generated methods

2007-02-21 Thread Adrian Howard
Hi, I'm moderately new to R:D:O - so I just want to sanity check that the following is reasonable / idiomatic. I've got a whole mess-o-tables that (by and large) Rose::DB::Object::Loader deals with splendidly. However, there are a few columns where I would like to do a little client-side

Re: [RDBO] Customising R:D:O:Loader generated methods

2007-02-21 Thread Randal L. Schwartz
Adrian == Adrian Howard [EMAIL PROTECTED] writes: Adrian I've got a whole mess-o-tables that (by and large) Adrian Rose::DB::Object::Loader deals with splendidly. However, there are a Adrian few columns where I would like to do a little client-side stuff Adrian before I update a column in

Re: [RDBO] Customising R:D:O:Loader generated methods

2007-02-21 Thread Adrian Howard
On 21 Feb 2007, at 13:51, Randal L. Schwartz wrote: Adrian == Adrian Howard [EMAIL PROTECTED] writes: Adrian I've got a whole mess-o-tables that (by and large) Adrian Rose::DB::Object::Loader deals with splendidly. However, there are a Adrian few columns where I would like to do a little

Re: [RDBO] Customising R:D:O:Loader generated methods

2007-02-21 Thread John Siracusa
On 2/21/07, Adrian Howard [EMAIL PROTECTED] wrote: Rose::DB::Object::Loader-new( db = MyApp::DB-new, class_prefix = 'MyApp' )-make_classes( pre_init_hook = sub { my $meta = shift; $meta-column( 'some_column' )-alias( '_some_column' )

Re: [RDBO] Customising R:D:O:Loader generated methods

2007-02-21 Thread Adrian Howard
On 21 Feb 2007, at 14:40, John Siracusa wrote: [snip] That's reasonable. I've done similar things in generated and manually created classes. [snip] Super :) As I understand it triggers happen after the object is updated in memory. I want to shim stuff in before this (so I can preserve

Re: [RDBO] Customising R:D:O:Loader generated methods

2007-02-21 Thread Jonathan Vanasco
On Feb 21, 2007, at 6:10 AM, Adrian Howard wrote: Reasonable? Is there a better way (for some definition of better)? personally, i use wrappers for all my rdb objects my 'page objects' can only write to 'data objects' the data objects handle loading / unloading rose objects as internal

Re: [RDBO] Customising R:D:O:Loader generated methods

2007-02-21 Thread Ted Zlatanov
On Wed, 21 Feb 2007 09:40:53 -0500 John Siracusa [EMAIL PROTECTED] wrote: JS You're right that the on_set trigger happens after the column value JS has been set. I could probably stand to add a few more trigger events JS (e.g., before_set) but I'm wary of trigger-itis gumming up the works. JS