On Oct 13, 2006, at 16:11, John Siracusa wrote: > On 10/13/06 7:03 PM, Ask Bjørn Hansen wrote: >> I keep making variations of this mistake, >> >> Model->delete_stuff >> (where => [ foo_id => $l->id, >> bar_id => [ keys %delete_bars ], >> ], >> db => $db); >> >> ... with an empty %delete_bars hash. >> >> I could use an option so it instead of deleting everything in >> "stuffs" with foo_id=$l->id would croak or give a warming. > > What would such an option be called, and how would you want to > enable it?
Well, I think it should be the default... ;-) We are setting some other defaults with something like package My::DB::Object::Metadata::Base; use base qw(Rose::DB::Object::Metadata); sub new { shift->SUPER::new( default_update_changes_only => 1, default_insert_changes_only => 1, [....] @_ ); } I'm not entirely clear on how everything fits together yet, but setting the option like that (but on the Manager class) would work for me. I'm not sure what it should be called. In a way it's a little like the mysql command line client option "safe-updates". - ask -- http://www.askbjoernhansen.com/ ------------------------------------------------------------------------- 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