[RDBO] Nested objects and Weaken

2008-02-01 Thread Bill Moseley
ay if a zip file contains another zip file). What's making my head hurt is I suspect that the clone will cause circular links and prevent the destruction of the object. Is there a better way to approach this -- or a way to weaken just

Re: [RDBO] form validation and RDBO

2007-10-23 Thread Bill Moseley
ot; for picking error codes such that the don't get repeated? And when a new validation error id is added into the code does the programmer also update one of the language templates -- and then notifies the language team? -- Bill Moseley [EMAIL PROTECTED] -

Re: [RDBO] form validation and RDBO

2007-10-23 Thread Bill Moseley
On Tue, Oct 23, 2007 at 02:12:08PM -0400, Christopher H. Laco wrote: > Bill Moseley wrote: > [snip] > > Yep, although I prefer to use English as the key to the language files > > instead of an ID. Easier to understand when looking at specific > > validation code. I can

Re: [RDBO] form validation and RDBO

2007-10-23 Thread Bill Moseley
ably a better approach. > So, in the end, all the actual message text ends up not in the Perl > code or the templates, but in the big localized strings file or > whatever you're using for managing your localiz

Re: [RDBO] form validation and RDBO

2007-10-23 Thread Bill Moseley
els in the html templates. I started using YAML files to define the fields and labels, but then I ended up with more places to define things than I felt was reasonable. -- Bill Moseley [EMAIL PROTECTED] - This SF.net email is s

Re: [RDBO] Still fighting with transactions

2007-08-14 Thread Bill Moseley
back. >From the docs: There's also a method ("do_transaction") that will execute arbitrary code within a single transaction, automatically handling rollback on failure and commit on success. You can do that with mod_perl as Perrin explained. But that depends on you working with

Re: [RDBO] Still fighting with transactions

2007-08-14 Thread Bill Moseley
uot;; > $db->commit; > > But when I run this script the two records are saved to the database and > not rolled back. Have you also looked at Roes::DB's do_transaction() ? -- Bill Moseley [EMAIL PROTECTED] --

Re: [RDBO] dbh caching

2007-04-19 Thread Bill Moseley
object_class => 'A' ); print "Fetched all with manager\n"; show_dbh( $_ ) for @$all; my $all = Rose::DB::Object::Manager->get_objects( object_class => 'A' ); print "Fetched all with second time manager\n"; show_dbh( $_ ) for @$all; $o = undef;

Re: [RDBO] dbh caching

2007-04-19 Thread Bill Moseley
reate a new database object. return $DB = iPDemo::RDB->new(dbh => $dbh); } $ perl test_rdbo.pl creating new object Fetch all rows id=1 Full name 'Initial User' dbh = DBI::db=HASH(0x8ddfbd4) id=2 Full name 'Bill moseley' dbh = DBI::db=HASH(0x8ddfb

Re: [RDBO] dbh caching

2007-04-19 Thread Bill Moseley
On Thu, Apr 19, 2007 at 10:35:16AM -0400, John Siracusa wrote: > On 4/18/07, Bill Moseley <[EMAIL PROTECTED]> wrote: > > This works fine in my base class: > > > > sub init_db { our $DBH =|| App::RDB->new } > > > > I've got the same $dbh for the li

Re: [RDBO] dbh caching

2007-04-18 Thread Bill Moseley
=> $dbh ); } Where @params does not change between calls. I then get a new $dbh. for new RDBO objects. So, I'm not seeing how to correctly do this. Thanks, -- Bill Moseley [EMAIL PROTECTED] - This SF.net em

Re: [RDBO] using functions

2007-04-14 Thread Bill Moseley
mail) = lower(?) How about: $users = UserAccount->get_objects_from_sql( args => [ $email ], sql => 'SELECT * FROM useraccount WHERE lower(email) = lower(?)', ); -- Bill Moseley [EMAIL PROTECTED] --

Re: [RDBO] dbh caching

2007-04-14 Thread Bill Moseley
s_thrown ) { $c->log_excption; $c->status( 500 ); } else { $c->run_delayed_subs; } [...] } Just need to be careful that nobody catches the exception before hand and doesn't also clear the delayed subs. Not very likely in Catalyst since the contr

Re: [RDBO] Status of Aggregates?

2007-04-13 Thread Bill Moseley
On Fri, Apr 13, 2007 at 07:40:04PM -0700, Bill Moseley wrote: > This is still the current situation?: > > http://www.dev411.com/blog/2006/05/31/rose-db-object-aggregates > > i.e. Run you own SQL directly with DBI or use Views and a create a > table (and manager) class for e

[RDBO] Status of Aggregates?

2007-04-13 Thread Bill Moseley
This is still the current situation?: http://www.dev411.com/blog/2006/05/31/rose-db-object-aggregates i.e. Run you own SQL directly with DBI or use Views and a create a table (and manager) class for each one? -- Bill Moseley [EMAIL PROTECTED

Re: [RDBO] dbh caching

2007-04-13 Thread Bill Moseley
On Fri, Apr 13, 2007 at 02:28:59PM -0400, Perrin Harkins wrote: > On 4/13/07, Bill Moseley <[EMAIL PROTECTED]> wrote: > > So, for example, in Catalyst in an end() (or something at the end) you > > would look for errors and then do a rollback, otherwise commit? And > >

Re: [RDBO] dbh caching

2007-04-12 Thread Bill Moseley
On Thu, Apr 12, 2007 at 11:59:55PM -0400, Perrin Harkins wrote: > On 4/12/07, Bill Moseley <[EMAIL PROTECTED]> wrote: > > Speaking of transactions -- anyone ever asked for nested transaction > > support? > > We had a semi-long discussion about that a few weeks back,

Re: [RDBO] dbh caching

2007-04-12 Thread Bill Moseley
Ok, I'll give that a try. I don't want to use Apache::DBI because the I have a few other RDBO concepts I'm grappling with. But those can wait. -- Bill Moseley [EMAIL PROTECTED] - Take Surveys. Earn Cash. Inf

[RDBO] dbh caching

2007-04-12 Thread Bill Moseley
above, but I'm wondering if there's a specific reason or if that's just a by-product of using RDB. Humbly yours, -- Bill Moseley [EMAIL PROTECTED] - Take Surveys. Earn Cash. Influence the Future of IT Join Sourc