> I'm trying to alter the behaviour of specific auto-generated RDBO > method. For example I have Product and I want to make the `photo' > method to store the passed file name on file system.
I've implemented this by telling RDBO to give my DB accessor/mutator a different name. __PACKAGE__->meta->setup( table => 'whatever', columns => [ id => { type => 'integer', not_null => 1, sequence => 'id_seq' }, entered => { type => 'timestamp', default => 'now', not_null => 1 }, title => { type => 'text', not_null => 1 }, image => { type => 'text', methods => { get_set => '_image' } }, ], pk_columns => [ 'id' ], ); sub image { my $self = shift; ## if they didn't pass us any more @_, then just give them the data return $self->_image unless @_; my $data = shift; return $self->_image(undef) unless $data; ## do whatever you want to $data here return $self->_image($data); } I'm not sure if this is the recommended way to do things or not. TIMTOWTDI I'm sure. regards, Danial ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ Rose-db-object mailing list Rose-db-object@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rose-db-object