[RDBO] ANNOUNCE: This mailing list is moving to Google

2008-02-25 Thread John Siracusa
As part of the migration from SourceForge to Google Code, The Rose::DB::Object mailing list is moving to a new address. All members of the old list (that is, the one you're reading right now) will be automatically unsubscribed and the list will (effectively) be closed some time this week. I've se

Re: [RDBO] Migrating the wiki to Google Code

2008-02-23 Thread John Siracusa
On Sat, Feb 23, 2008 at 8:08 PM, Derek Watson <[EMAIL PROTECTED]> wrote: > Please add [EMAIL PROTECTED] to the group! Done. -John - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio

[RDBO] ANNOUNCE: This mailing list is moving to Google

2008-02-23 Thread John Siracusa
As part of the migration from SourceForge to Google Code, The Rose::DB::Object mailing list is moving to a new address. All members of the old list (that is, the one you're reading right now) will be automatically unsubscribed and the list will (effectively) be closed some time next week. I'm goi

[RDBO] Migrating the wiki to Google Code

2008-02-22 Thread John Siracusa
The next step in the migration process from SourceForge to google Code is to move the wiki. I'm doing it slowly. If anyone else wants to help, just post your Google Account email address and I'll add you to the project. (Only project members can post to the wiki, which I hope will make it a lot

[RDBO] SVN moved to Google Code

2008-02-22 Thread John Siracusa
As the first step in the process of moving Rose from SourceForge to Google Code, the official SVN repository has moved to Google: https://rose.googlecode.com/svn/trunk You can find checkout instructions here: http://code.google.com/p/rose/source/checkout I've updated the wiki with the n

Re: [RDBO] Hardcoded Carp::croak vs error_mode

2008-02-21 Thread John Siracusa
On Thu, Feb 21, 2008 at 11:49 AM, John Ingram <[EMAIL PROTECTED]> wrote: > Well that's a different matter. I had tried that a while back and > found that the result was the same, which was what caused me to go > back to the default overflow behavior. Now that you refer me to that > spot in th

Re: [RDBO] Hardcoded Carp::croak vs error_mode

2008-02-21 Thread John Siracusa
On Thu, Feb 21, 2008 at 7:11 AM, John Ingram <[EMAIL PROTECTED]> wrote: > The situation that I'm facing right now is when I set the value of a > column to one longer than the column length, either through > instantiation or the column's generated method: > > my $user = Foo::User->new( username

Re: [RDBO] Hardcoded Carp::croak vs error_mode

2008-02-20 Thread John Siracusa
On Wed, Feb 20, 2008 at 6:44 PM, John Ingram <[EMAIL PROTECTED]> wrote: > In the following packages: > > Rose::DB::Object::MakeMethods > Rose::DB::Object::MakeMethods::Generic > Rose::DB::Object::MakeMethods::DateTime > > ...I was surprised to find that $self->meta->handle_error is not being >

[RDBO] RFC: Moving from SourceForge to Google Code

2008-02-19 Thread John Siracusa
I've been considering moving the Rose project from SourceForge.net to code.google.com. My reasons: * I'm tried of wrangling with the wiki. With much more limited editing access, Google's wiki seems more bot-spam resistant. * SF.net always seems slow to me. Google's site seems faster. That's ab

Re: [RDBO] ANNOUNCE: Rose::DB::Object 0.767 released

2008-02-17 Thread John Siracusa
On Feb 17, 2008 1:57 PM, Sam Tregar <[EMAIL PROTECTED]> wrote: > On Feb 15, 2008 4:56 PM, John Siracusa <[EMAIL PROTECTED]> wrote: > >* Added the forget_related() helper method. > > This wasn't added to the :all export set in Rose::DB::Object:::Helpers. >

Re: [RDBO] Manager quiet about bad syntax

2008-02-17 Thread John Siracusa
On Feb 17, 2008 2:04 PM, Sam Tregar <[EMAIL PROTECTED]> wrote: > Params::Validate is pretty fast, in my experience. Could I win you over > with a patch and some benchmarks showing no significant performance > degradation? Maybe, but as I've said I'm not really a fan of runtime parameter validatio

[RDBO] ANNOUNCE: Rose::DB::Object 0.767 released

2008-02-15 Thread John Siracusa
Another release forced out due to bugs in the test suite. As usual, a few small features tagged along. New Rose::DB version required. -John Rose::DB::Object 0.767 (02.15.2008) - John Siracusa <[EMAIL PROTECTED]> * Added the forget_related() helper method. * Enhanced and docu

Re: [RDBO] Manager quiet about bad syntax

2008-02-14 Thread John Siracusa
On Thu, Feb 14, 2008 at 6:14 PM, Sam Tregar <[EMAIL PROTECTED]> wrote: > Hey all. I'm working on adjusting to Rose from a long history with CDBI, so > I do this kind of thing a lot: > > $foos = My::Foo::Manager->get_foos(bar => "big"); > > When I really mean: > > $foos = My::Foo::Manager->get_

Re: [RDBO] using MySQL's FOUND_ROWS() feature with QueryBuilder

2008-02-14 Thread John Siracusa
On Thu, Feb 14, 2008 at 4:12 PM, Perrin Harkins <[EMAIL PROTECTED]> wrote: > On Thu, Feb 14, 2008 at 4:06 PM, Ken Prows <[EMAIL PROTECTED]> wrote: >> Sorry, I forgot to include the limit arg in my example. I do use limit so >> that I can page the data. I need to know the total matches so that I can

Re: [RDBO] Bizarre Side-Effect of Storable Use

2008-02-12 Thread John Siracusa
On Feb 12, 2008 4:35 PM, Sam Tregar <[EMAIL PROTECTED]> wrote: > Thanks, that should help. Any reason you didn't just bake this into a > default Storbable freeze hook? As you can see from the docs, there are many decisions to be made about what, exactly, gets frozen, and there's no good way to co

Re: [RDBO] Bizarre Side-Effect of Storable Use

2008-02-12 Thread John Siracusa
You need to strip() before freezing: http://search.cpan.org/dist/Rose-DB-Object/lib/Rose/DB/Object/Helpers.pm#strip Modifying your test: ... package My::Foo; use base 'My::DBObject'; use Rose::DB::Object::Helpers qw(strip); ... my $froze = freeze($foo->strip); -John ---

Re: [RDBO] Bizarre Side-Effect of Storable Use

2008-02-12 Thread John Siracusa
On Feb 12, 2008 3:26 PM, Sam Tregar <[EMAIL PROTECTED]> wrote: > Yes. I can whip up a simple test case if need be. Let me know if that > would help. Yes, that'd help because I can't reproduce it. I added a bit to t/db-object-helpers.t to try: $o = $class->new(id => 1)->load_or_save; e

Re: [RDBO] Bizarre Side-Effect of Storable Use

2008-02-12 Thread John Siracusa
On Feb 12, 2008 2:28 PM, Sam Tregar <[EMAIL PROTECTED]> wrote: > But if I pass the object through Storable: > > use Storable qw(freeze thaw); > my $foo = freeze($object); > my $obj = thaw($foo); > $obj->some_method_that_doesnt_exist("foo"); > > I get the completely nonsensical error

Re: [RDBO] Odd Autoinitialization

2008-02-11 Thread John Siracusa
On Feb 11, 2008 8:55 PM, Wiggins d'Anconia <[EMAIL PROTECTED]> wrote: > my $test = $user->profile->user_agreement_accepted_on; > warn "test: $test\n"; > unless (defined $test) { > ... > } > > Which results in 3 log lines, > > Use of uninitialized value in concatenation (.) or string at > /.../C

[RDBO] ANNOUNCE: Rose::DB::Object 0.7665 released

2008-02-08 Thread John Siracusa
ng for the ride. 0.7665 (02.08.2008) - John Siracusa <[EMAIL PROTECTED]> * Fixed a bug that prevented the convention manager's auto_table_name() method from honoring the tables_are_singular() attribute value. (Reported by Ben Tilly) * The new, more correct behavio

Re: [RDBO] ANNOUNCE: Rose::DB 0.739

2008-02-08 Thread John Siracusa
On Feb 8, 2008 2:44 PM, Perrin Harkins <[EMAIL PROTECTED]> wrote: > On Feb 8, 2008 1:43 PM, John Siracusa <[EMAIL PROTECTED]> wrote: > > * Caching of db objects during mod_perl server start-up is now turned > > off by default, with new API to turn it b

[RDBO] ANNOUNCE: Rose::DB 0.739

2008-02-08 Thread John Siracusa
That's right, Rose::DB, not Rose::DB::Object. This change is important enough to go out on its own instead of waiting to be tied to a Rose::DB::Object release. 0.739 (02.08.2008) - John Siracusa <[EMAIL PROTECTED]> * Caching of db objects during mod_perl server start-up is

Re: [RDBO] Having trouble making tables_are_singular work

2008-02-07 Thread John Siracusa
On 2/6/08 5:12 PM, Ben Tilly wrote: > Here is some non-working code: > > my $class = "ReportHistory::Installation"; > no strict 'refs'; > @{"$class\::ISA"} = 'ReportHistory::Object'; > > $class->meta->convention_manager->tables_are_singular(1); > $class->meta->auto_initialize(); > prin

Re: [RDBO] RDBO equivalent of Class::DBI's temp columns?

2008-02-06 Thread John Siracusa
On Feb 6, 2008 3:18 PM, Sam Tregar <[EMAIL PROTECTED]> wrote: > Hey all. I'm working on migrating a Class::DBI system to RDBO and I'm > wondering how to implement "temp" columns. In CDBI these are accessors that > behave like normal column accessors but don't store data in the database. > Weird,

[RDBO] ANNOUNCE: Rose::DB::Object 0.7664 released

2008-02-06 Thread John Siracusa
Corrected a bad skip count that caused 0.7663 to appear to fail one of its tests, and added a small fix and a small feature. 0.7664 (02.06.2008) - John Siracusa <[EMAIL PROTECTED]> * Fixed a bug that caused boolean columns to be incorrectly marked as modified. (Reported by Gr

Re: [RDBO] RDBO and computed columns

2008-02-05 Thread John Siracusa
On Feb 5, 2008 5:16 PM, Grzegorz Nosek <[EMAIL PROTECTED]> wrote: > Hmm, I might be missing something, but inside the > sql_qualify_columns_on_load method you're using $_[1] after shifting > $self off the argument array, so to set the value to true, I must pass > two arguments to the method Too sl

Re: [RDBO] RDBO and computed columns

2008-02-05 Thread John Siracusa
On Feb 5, 2008 4:06 PM, Grzegorz Nosek <[EMAIL PROTECTED]> wrote: > t/db-objectok 1/566# Looks like you planned 566 > tests but only ran 562. Whoops, that should be fixed now. > sql_qualify_columns_on_load is on by default. Actually, it looks > hardcoded to one ($self->{..

Re: [RDBO] ANNOUNCE: Rose::DB::Object 0.7663 released

2008-02-05 Thread John Siracusa
On Feb 5, 2008 3:25 AM, Michael Lackhoff <[EMAIL PROTECTED]> wrote: > I get this test failure with 0.7663: Yeah, there's a bad skip count in one of the tests. I've revoked 0.7663. Expect 0.7664 soon(ish) :) -John - This SF

Re: [RDBO] RDBO and computed columns

2008-02-04 Thread John Siracusa
On Feb 4, 2008 3:51 PM, Grzegorz Nosek <[EMAIL PROTECTED]> wrote: > Test case attached. It's weird. Help! ;) Not so weird: it was a simple bug in the boolean method maker. It's fixed in SVN now. I'll work on the column name qualification option. -John --

Re: [RDBO] RDBO and computed columns

2008-02-04 Thread John Siracusa
On Feb 4, 2008 4:05 PM, John Siracusa <[EMAIL PROTECTED]> wrote: > On Feb 4, 2008 3:51 PM, Grzegorz Nosek <[EMAIL PROTECTED]> wrote: > > Functions taking rows as arguments may be used like extra table columns > > only when qualified with a table alias. > >

Re: [RDBO] RDBO and computed columns

2008-02-04 Thread John Siracusa
On Feb 4, 2008 3:51 PM, Grzegorz Nosek <[EMAIL PROTECTED]> wrote: > Functions taking rows as arguments may be used like extra table columns > only when qualified with a table alias. Can you use an alternate "normal" function call form as well? SELECT id, ..., is_even(...) FROM test; I'm not

[RDBO] ANNOUNCE: Rose::DB::Object 0.7663 released

2008-02-04 Thread John Siracusa
More bug fixes that I didn't want to wait until the next major release. -John 0.7663 (02.04.2008) - John Siracusa <[EMAIL PROTECTED]> * Fixed a bug that caused delete_on_save method creation for foreign keys to fail in some circumstances. (Reported by Justin Ellison)

Re: [RDBO] RDBO and computed columns

2008-02-03 Thread John Siracusa
On Feb 3, 2008 5:07 PM, Grzegorz Nosek <[EMAIL PROTECTED]> wrote: > __PACKAGE__ > ->meta->column('is_even') > ->add_trigger('on_set', > sub { > unset_column_value_modified( $_[0], 'is_even' ) > }); > > R::DB::O::Util is imported earlier with :columns

Re: [RDBO] RDBO and computed columns

2008-02-03 Thread John Siracusa
On Feb 3, 2008 3:59 PM, Grzegorz Nosek <[EMAIL PROTECTED]> wrote: > However, the problem arises after calling: > > my ($a_foo) = @{ Foo::Manager->get_objects( query => [ id => 5, is_even => 0 > ] ) }; > $a_foo->v2( 5 ); > $a_foo->save( changes_only => 1 ); > > The is_even condition is a result of

Re: [RDBO] Stale results from relationship accessors

2008-02-01 Thread John Siracusa
On Feb 1, 2008 4:49 PM, Sam Tregar <[EMAIL PROTECTED]> wrote: > But without the reload subscribed_lists() keeps returning the old list. Is > there a way to tip off Rose that any cached lists for a particular > relationship are stale? Or something I'm doing wrong? All get_set* relationship access

Re: [RDBO] Rose::DB::Sybase implementation help

2008-02-01 Thread John Siracusa
On Feb 1, 2008 3:46 PM, Ted Zlatanov <[EMAIL PROTECTED]> wrote: > I have most of the Sybase basic stuff (driver load, etc.) working for > Rose::DB, but it's pretty hacky. I'd like to make it a proper > environment, with Loader support and so on. What do I need to > implement and where? I tried t

Re: [RDBO] Loader failure on MySQL foreign key

2008-02-01 Thread John Siracusa
On Feb 1, 2008 3:37 PM, Justin Ellison <[EMAIL PROTECTED]> wrote: > I was just tinkering with the loader, and might have found a bug. This should be fixed in SVN now. It was actually a method-maker bug, not a Loader bug. The Loader just happened to trigger it. Try it and let me know. I'll prob

Re: [RDBO] Problem using check_in with a varchar column

2008-01-31 Thread John Siracusa
On Jan 31, 2008 3:44 PM, Sam Tregar <[EMAIL PROTECTED]> wrote: > $meta->column(status => {type => 'varchar', >default => 'normal', > length => 32, >check_in => ['good', 'normal', >

Re: [RDBO] Candidate for RDBO?

2008-01-31 Thread John Siracusa
On Jan 30, 2008 9:23 PM, Fred Cox <[EMAIL PROTECTED]> wrote: > I've got a Postgresql DBI select: > > SELECT COUNT(*) AS voters, SUM(liked) AS liked, SUM(liked) / CAST( COUNT(*) AS > real ) AS ratio FROM review_votes WHERE reviewid=? > > that works well, but I wasn't sure whether it would be practic

[RDBO] ANNOUNCE: Rose::DB::Object 0.7662 released

2008-01-30 Thread John Siracusa
On Jan 29, 2008 9:25 PM, John Siracusa <[EMAIL PROTECTED]> wrote: > On Jan 29, 2008 5:28 PM, Justin Ellison <[EMAIL PROTECTED]> wrote: > > Not really a bug, but aren't you now burning extra CPU cycles on line > > 166 of RDBO::Cached? As far as I can tell, removing

Re: [RDBO] Sharing a DBI connection with Class::DBI

2008-01-29 Thread John Siracusa
On 1/29/08, Sam Tregar <[EMAIL PROTECTED]> wrote: > Do you happen to know if RDBO will tolerate a > DBIx::ContextualFetch based DBI handle? It should, and if it doesn't, I can probably make it do so with some minor edits. Give of a try and let me know. -John -

Re: [RDBO] Sharing a DBI connection with Class::DBI

2008-01-29 Thread John Siracusa
On Jan 29, 2008 9:57 PM, Sam Tregar <[EMAIL PROTECTED]> wrote: > On Jan 29, 2008 9:55 PM, Peter Karman <[EMAIL PROTECTED]> wrote: > > just a naive guess here, but if you were using DBI->connect_cached as the > > underlying connect method, wouldn't DBI handle the sharing for you? > > > > No, I'm pre

Re: [RDBO] Sharing a DBI connection with Class::DBI

2008-01-29 Thread John Siracusa
On Jan 29, 2008 9:52 PM, Sam Tregar <[EMAIL PROTECTED]> wrote: > Hey all. I'm getting started with Rose::DB::Object. My problem is I need > to inter-operate with a large pre-existing Class::DBI code-base. I'd like > to setup Rose to be able to share the same DBI connection that Class::DBI > uses

Re: [RDBO] Anyone done more advanced caching with rdbo?

2008-01-29 Thread John Siracusa
On Jan 29, 2008 6:52 PM, Justin Ellison <[EMAIL PROTECTED]> wrote: > Anyways, I'm in the process of writing a My::DB::CHIObject that mimics > and replaces RDBO::Cached and uses the CHI CPAN module. I'd be happy to roll this into the RDBO distribution as Rose::DB::Object::Cached::CHI. Let me know

Re: [RDBO] ANNOUNCE: Rose::DB::Object 0.7661 released

2008-01-29 Thread John Siracusa
On Jan 29, 2008 5:28 PM, Justin Ellison <[EMAIL PROTECTED]> wrote: > Not really a bug, but aren't you now burning extra CPU cycles on line > 166 of RDBO::Cached? As far as I can tell, removing the line doesn't > change the logic any. Whoops, copy-and-paste-o. Fixed in SVN. Maybe I'll release it

[RDBO] ANNOUNCE: Rose::DB::Object 0.7661 released

2008-01-29 Thread John Siracusa
Important fix for a bug that could prevent Manager classes from loading, plus one other small change. 0.7661 (01.29.2008) - John Siracusa <[EMAIL PROTECTED]> * Fixed method clash detection in Rose::DB::Object::Manager. * Streamlined caching implementation in Rose::DB::Object::

Re: [RDBO] Too Many connections

2008-01-25 Thread John Siracusa
your common base class up-front, as described above) or just pass in a "db" parameter to every Manager call. -John >> -Original Message- >> From: [EMAIL PROTECTED] >> [mailto:[EMAIL PROTECTED] On >> Behalf Of John Siracusa >> Sent: Thursday, January

Re: [RDBO] insert speed questions with RDBO

2008-01-23 Thread John Siracusa
On Jan 23, 2008 2:07 PM, Ted Zlatanov <[EMAIL PROTECTED]> wrote: > I found one of the problems is that you forcibly set RaiseError to 1 in > a lot of places, in Rose::DB and Rose::DB::Object. Why override the > connect_options? > > My code is working with do_transaction for now, but begin_work/com

Re: [RDBO] inheriting from RBDO::Cached vs. RDBO question

2008-01-23 Thread John Siracusa
On Jan 23, 2008 10:55 AM, Ted Zlatanov <[EMAIL PROTECTED]> wrote: > On Tue, 22 Jan 2008 17:17:18 -0500 "John Siracusa" <[EMAIL PROTECTED]> wrote: > JS> Anyway, when building a single super-base class, I don't think it's > JS> particularly ugly to set

Re: [RDBO] insert speed questions with RDBO

2008-01-22 Thread John Siracusa
On Jan 22, 2008 11:42 AM, Ted Zlatanov <[EMAIL PROTECTED]> wrote: > I'd like to try without autocommit; I tried the built-in RDBO > transactions but those didn't work well for me. begin_work was fine, > but if an error happened anywhere in the transaction, rollback() didn't > do anything and the D

Re: [RDBO] inheriting from RBDO::Cached vs. RDBO question

2008-01-22 Thread John Siracusa
On Jan 22, 2008 11:28 AM, Ted Zlatanov <[EMAIL PROTECTED]> wrote: > On Mon, 21 Jan 2008 13:24:49 -0500 "John Siracusa" <[EMAIL PROTECTED]> wrote: > JS> When I need a mix-in, I just "make one" by manually importing methods > JS> as needed. Writing

Re: [RDBO] inheriting from RBDO::Cached vs. RDBO question

2008-01-21 Thread John Siracusa
On Jan 21, 2008 8:34 AM, Ted Zlatanov <[EMAIL PROTECTED]> wrote: > I have some existing RDBO classes, all inheriting from a common > BaseObject parent. If I want some of them to be selectively cached, > currently I have to create a BaseObject::Cached that inherits from > RDBO::Cached (I do this wi

Re: [RDBO] Problem using primary key generator

2008-01-21 Thread John Siracusa
On Jan 21, 2008 8:49 AM, Bianka Martinovic <[EMAIL PROTECTED]> wrote: > When I look at the load()ed data, all seems fine. But later on, after > > $row->init( %$data ); > > where $data contains something like > > { > 'CMP_NETWORK' => { > 'NICADDRESS' => 'a01010101011' > }, >

Re: [RDBO] Problem using primary key generator

2008-01-18 Thread John Siracusa
On Jan 16, 2008 11:40 AM, Bianka Martinovic <[EMAIL PROTECTED]> wrote: > my $row = $schema->new( > db => $dbh, > %{ > $self->_prepare_data( $schema, { $self- > >tableset( 'idfield' ) => $attrs{'dn'} } ) >

Re: [RDBO] Too Many connections

2008-01-11 Thread John Siracusa
On Jan 11, 2008 1:10 PM, Ted Zlatanov <[EMAIL PROTECTED]> wrote: > I think the automatic class builder should have a required option to set > the default explicitly (it didn't, last time I looked). That would > ensure the developer thought about it even in the path of least > resistance. Wat woul

Re: [RDBO] Too Many connections

2008-01-11 Thread John Siracusa
On Jan 11, 2008 4:43 AM, James Masters <[EMAIL PROTECTED]> wrote: > In my naivety, it seems to me that conceptually a script would normally have > a single shared connection for all it's calls. Both from a tidiness point > of view and also because I guess it would be better performing not to keep

Re: [RDBO] Too Many connections

2008-01-10 Thread John Siracusa
On 1/10/08 5:30 PM, James Masters wrote: > Looking into this, I seem to simply be doing the following in a "for" loop > more than 100 times: > > my $shipobj = MGORD::Shipment->new(shipid => $shipid)->load(with =>['items', > 'costs', 'problems', 'predictedcosts', 'toaddress', 'fromaddress']); > >

Re: [RDBO] Manager queries with secondary table and "or"

2008-01-10 Thread John Siracusa
On 1/10/08 8:09 PM, John Siracusa wrote: > Ah, yes, you're behind the times :) You should upgrade to the latest > versions: Rose::DB 0.737 and Rose::DB::Object 0.766. Relevant to your problem > is this item from the change list for 0.765: > > * Fixed a bug that preven

Re: [RDBO] Manager queries with secondary table and "or"

2008-01-10 Thread John Siracusa
On 1/10/08 5:46 PM, James Masters wrote: > I'm on Rose::DB - 0.734, Rose::DB::Object - 0.764. Am I behind the times or > is this a red herring? Ah, yes, you're behind the times :) You should upgrade to the latest versions: Rose::DB 0.737 and Rose::DB::Object 0.766. Relevant to your problem is t

Re: [RDBO] Manager queries with secondary table and "or"

2008-01-10 Thread John Siracusa
On Jan 10, 2008 1:36 PM, James Masters <[EMAIL PROTECTED]> wrote: > I believe that I have a $spec{require_objects} = ['destaddress', ...] and > this is working otherwise > > > push @query, ('destaddress.primecontact' => {like => '%smith%'}); > > wouldn't work. [...] > > Anyway, your email implies

Re: [RDBO] Database Permissions when inserting (relationships).

2008-01-10 Thread John Siracusa
On Jan 10, 2008 10:01 AM, Curon Davies <[EMAIL PROTECTED]> wrote: > Hi John. Thanks for your help on this. Unfortunately that still > doesn't quite work. If we do: > > $product = My::DB::Product->new(name => $^T); > $product->add_prices( > { price => 3.60, region => 'uk' }, > { price

Re: [RDBO] Manager queries with secondary table and "or"

2008-01-10 Thread John Siracusa
On 1/10/08 8:19 AM, James Masters wrote: > Have a bit of trouble with a Manager query. Trying to keep it short and > sweet, I am searching a table "orders" which has a onetoone relationship > called destaddress. The first 3 queries here work: > > push @query, ('custlastname' => {like => '%smith%'

Re: [RDBO] Database Permissions when inserting (relationships).

2008-01-10 Thread John Siracusa
On Jan 10, 2008 5:47 AM, Curon Davies <[EMAIL PROTECTED]> wrote: > Thanks for that suggestion, something that I didn't think about. The > add_ prefix doesn't look that nice in the constructor. Then don't put it in the constructor call :) $product = My::DB::Product->new(name => $^T); $product->add

Re: [RDBO] Database Permissions when inserting (relationships).

2008-01-09 Thread John Siracusa
On Jan 9, 2008 2:05 PM, Curon Davies <[EMAIL PROTECTED]> wrote: > The file works fine if the User (in this case 'rose_test') has DELETE > permission the on 'price' table, but fails otherwise. From my > prospective this should definitely not be the case, as the only action > performed here is insert

Re: [RDBO] Proper usage of query_args?

2008-01-08 Thread John Siracusa
On Jan 8, 2008 6:21 PM, Justin Ellison <[EMAIL PROTECTED]> wrote: > my $oa = $sku->object_attributes(query_args => ['attribute.atr_nm' => >$attributeName ], > )->[0]; If your relationship description was accu

Re: [RDBO] insert speed questions with RDBO

2008-01-05 Thread John Siracusa
On Jan 5, 2008 1:25 PM, Ted Zlatanov <[EMAIL PROTECTED]> wrote: > I realize much of this question belongs to database-specific domains, > but here goes: I want RDBO insert operations to be faster. I need to > load thousands of records per second into a database. The first thing to investigate is

Re: [RDBO] Cross Schema Relationships

2008-01-03 Thread John Siracusa
On 1/3/08 11:14 AM, John Siracusa wrote: >> Because my schema name can change based upon domain and type (and I want >> to keep everything in My::DB), I did the following in my Inventory >> class: >> schema => My::DB->new_or_cached(type => 'custom'

Re: [RDBO] Cross Schema Relationships

2008-01-03 Thread John Siracusa
On Jan 3, 2008 10:41 AM, Justin Ellison <[EMAIL PROTECTED]> wrote: > Thanks for the reply John - see inline: >> but then override the schema in the inventory class: >> >>> package My::Inventory; >>> >>> use base qw(Rose::DB::Object); >>> >>> __PACKAGE__->meta->setup( >>> table => 'invento

Re: [RDBO] Cross Schema Relationships

2008-01-02 Thread John Siracusa
On 1/2/08 5:45 PM, Justin Ellison wrote: > We have SKU's, and each row in the SKU table might or might not have a > corresponding entry in the INVENTORY table. The gotcha here is that the > INVENTORY table lives in a different schema than does the SKU table. > Now, I can get at the inventory "indi

Re: [RDBO] rose-db-object

2007-12-27 Thread John Siracusa
Sorry about that, guys. I mis-clicked in the admin interface when trying to discard this list spam. -John - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdm

Re: [RDBO] how to pluralize properly with Rose::DB::Object::Loader?

2007-12-21 Thread John Siracusa
On 12/21/07 8:39 PM, Adam Prime wrote: > sub init_convention_manager { > my $self = shift; > > my $cm = $self->SUPER::init_convention_manager(@_); > > $cm->singular_to_plural_function(\&Lingua::EN::Inflect::Number::to_PL); > $cm->plural_to_singular_function(\&Lingua::EN::Infle

Re: [RDBO] On load/insert/update/delete triggers?

2007-12-21 Thread John Siracusa
On 12/18/07 1:38 AM, Danny Liang wrote: > Is it possible to add triggers/coderef callbacks to > load/insert/update/delete methods for objects and get_* methods for > object manager classes similar to the way adding trigger to columns > (i.e. on_set, on_save, etc.)? There are no convenience methods

Re: [RDBO] matching databases with class hierarchies

2007-12-21 Thread John Siracusa
On 12/21/07 3:43 PM, Ted Zlatanov wrote: > I've set up all the right things in a Rose::DB class to support this. > Now I find myself with the need for four class hierarchies to handle > slightly different things in those four environments. Instead, I'm > wondering if I can have: > > DB/auto/prod/

Re: [RDBO] how to pluralize properly with Rose::DB::Object::Loader?

2007-12-21 Thread John Siracusa
On 12/21/07 4:21 PM, Ted Zlatanov wrote: > On Fri, 21 Dec 2007 15:59:58 -0500 Hans Dieter Pearcey <[EMAIL PROTECTED]> > wrote: > HDP> On Fri, Dec 21, 2007 at 02:56:07PM -0600, Ted Zlatanov wrote: >>> I couldn't find an example in the docs of how to set up >>> Rose::DB::Object::Loader with a proper

Re: [RDBO] good way to handle empty fields?

2007-12-15 Thread John Siracusa
On Dec 15, 2007 10:43 AM, Michael Lackhoff <[EMAIL PROTECTED]> wrote: > I guess, what you are talking about is done here: > $form->init_fields_with_cgi($self->query). What is $self in that line? -John - SF.Net email is spon

Re: [RDBO] good way to handle empty fields?

2007-12-14 Thread John Siracusa
On Dec 14, 2007 2:07 AM, Michael Lackhoff <[EMAIL PROTECTED]> wrote: > On 13.12.2007 14:03 John Siracusa wrote: > > On Dec 13, 2007 4:24 AM, Michael Lackhoff <[EMAIL PROTECTED]> wrote: > >> When I create a record with such a field, it is usually NULL but > >&

Re: [RDBO] Rose::DB array column bug

2007-12-13 Thread John Siracusa
On Dec 13, 2007 11:58 AM, Derek Watson <[EMAIL PROTECTED]> wrote: > Is there a reason why I can't set the first value of an array to NULL? I > want to store this {NULL, 1, 2, 3} by way of an RDBO array column but I > think the following function from Rose::DB 0.737 is preventing me from doing > so:

[RDBO] ANNOUNCE: Rose::DB::Object 0.766 released

2007-12-13 Thread John Siracusa
connection sharing. Files uploaded to CPAN and SF.net. Change logs appear below. Many thanks to all that contributed to this release. -John Rose::DB::Object: 0.766 (12.13.2007) - John Siracusa <[EMAIL PROTECTED]> * Added the unique_key_by_name() metadata method. * Added t

Re: [RDBO] good way to handle empty fields?

2007-12-13 Thread John Siracusa
On Dec 13, 2007 4:24 AM, Michael Lackhoff <[EMAIL PROTECTED]> wrote: > When I create a record with such a field, it is usually NULL but > after some editing with the help of RHTMLO the empty field value could > become '' when saved. I believe the latest release of Rose::HTML::Objects fixed this bu

Re: [RDBO] Remote DB connection over SSL to MySQL DB using Rose::DB

2007-12-12 Thread John Siracusa
On Sep 3, 2007 9:57 PM, Kurt Hansen <[EMAIL PROTECTED]> wrote: > John Siracusa wrote: > > On 9/3/07 12:31 PM, Kurt Hansen wrote: > > > >> However, I did not try the "connect_options" method based on your > >> "inlined into the DSN" commen

Re: [RDBO] help specifying a default datetime with SQLite and RDBO::Loader

2007-12-12 Thread John Siracusa
On Aug 7, 2007 4:12 PM, George Hartzell <[EMAIL PROTECTED]> wrote: > The following little fragment of sql does what I'd like it to do, > inserts the current timestamp into the created_date column. > > create table mooses ( > id integer primary key autoincrement, > name text, >

Re: [RDBO] Still fighting with transactions

2007-12-12 Thread John Siracusa
On Aug 15, 2007 3:49 PM, Tim Bunce <[EMAIL PROTECTED]> wrote: > On Wed, Aug 15, 2007 at 01:06:01PM -0500, Graham Barr wrote: > > > > Rose::DB does not know that the $dbh it get back from connect is not a > > newly connected handle. As a result is still goes ahead and calls init_dbh > > which will s

Re: [RDBO] ideas from Cayenne

2007-12-12 Thread John Siracusa
On Dec 12, 2007 10:31 AM, Ted Zlatanov <[EMAIL PROTECTED]> wrote: > FWIW I'd use POD markup to separate custom code from auto-generated > code. It's safe, has markup properties, and can contain a comment about > its purpose. I'm more inclined to use separate .pm files, if only to keep version con

Re: [RDBO] sqlite serial column type

2007-12-12 Thread John Siracusa
On Dec 12, 2007 9:48 AM, Peter Karman <[EMAIL PROTECTED]> wrote: > I don't see this in Changes in current RDBO svn. Any chance it could be > included in the next release? It's in SVN now. Thanks for the reminder. -John - S

Re: [RDBO] ideas from Cayenne

2007-12-12 Thread John Siracusa
On Dec 12, 2007 8:45 AM, Ted Zlatanov <[EMAIL PROTECTED]> wrote: > I played with the Cayenne Java ORM last week. I didn't like it much > (it's very inferior to RDBO, especially in auto-generating from the > schema), but one idea that caught my eye was the 'auto' hierarchy. > Basically you get a hi

Re: [RDBO] Last chance to suggest a better name for undef_sets_null

2007-12-12 Thread John Siracusa
On Dec 12, 2007 8:43 AM, John Siracusa <[EMAIL PROTECTED]> wrote: > Undef is always treated as null. The distinction in this case is that > explicitly setting the column to undef overrides the default value. Okay, now I have a new favorite: undef_overrides_default That's pret

Re: [RDBO] Last chance to suggest a better name for undef_sets_null

2007-12-12 Thread John Siracusa
On Dec 12, 2007 8:34 AM, Ted Zlatanov <[EMAIL PROTECTED]> wrote: > On Tue, 11 Dec 2007 12:10:00 -0500 "John Siracusa" <[EMAIL PROTECTED]> wrote: > JS> The undef_sets_null feature that alters the behavior of default > JS> columns values will almost certainly g

Re: [RDBO] Lazy Loading and Oracle?

2007-12-11 Thread John Siracusa
On Dec 11, 2007 12:35 PM, Justin Ellison <[EMAIL PROTECTED]> wrote: > I was wondering if load_on_demand and Oracle was working on .765? Can you post a self-contained example script that reproduces the problem? I don't have an Oracle database readily available to test against, but lazy loading sho

[RDBO] Last chance to suggest a better name for undef_sets_null

2007-12-11 Thread John Siracusa
The undef_sets_null feature that alters the behavior of default columns values will almost certainly go out in the next release (which is coming soon). It may or may not be public (depending on if I have time to do docs and add support for it to the rest of the column types), but the code will be

Re: [RDBO] unique_keys problem

2007-12-11 Thread John Siracusa
On Dec 11, 2007 10:49 AM, <[EMAIL PROTECTED]> wrote: > Will do. It might be worth noting in the loader documentation that > mysql does this, and how it affects loader, if it isn't already there > (it's entirely possible i missed it). I added a brief "gotchas" section to the Loader docs in SVN.

Re: [RDBO] unique_keys problem

2007-12-11 Thread John Siracusa
On Dec 11, 2007 8:57 AM, Adam Prime <[EMAIL PROTECTED]> wrote: > Now that i've slept i'm wondering if the underlying problem might be > related to the way that defaults are handled in RDBO. That's one thing > that differs between the tables used in the original tests and the table > in the test i

Re: [RDBO] another small suggestion for enchancement

2007-11-28 Thread John Siracusa
On Nov 28, 2007 2:30 PM, maxim <[EMAIL PROTECTED]> wrote: > is it possible to overload some unary operators for > Rose::DB::Object::Iterator objects. > Like: >$iterator .= $another_iterator; >$iterator += $another_iterator; Maybe, but I certainly don't want to do it :) There's been at le

Re: [RDBO] suggestions for enchancement

2007-11-27 Thread John Siracusa
On Nov 27, 2007 9:29 AM, Peter Karman <[EMAIL PROTECTED]> wrote: > fwiw, the DBIC folks have been discussing this very topic lately: > > http://lists.scsys.co.uk/pipermail/dbix-class/2007-November/005320.html I know. I'm on that list too :) -John

Re: [RDBO] suggestions for enchancement

2007-11-27 Thread John Siracusa
On Nov 27, 2007, at 12:50 AM, Ron Savage wrote: > On Tue, 2007-11-27 at 00:15 -0500, John Siracusa wrote: >> I think we need a mutable object representation of SQL first, the the > > You mean like SQL::Abstract? No, definitely not like SQL::Abstract :) SQLA provides a very l

Re: [RDBO] suggestions for enchancement

2007-11-26 Thread John Siracusa
On Nov 26, 2007, at 5:29 PM, maxim wrote: It would be nice to have abstraction layer for SQL query itself. Yeah, no kidding :) I've got ideas for one but so far not enough time to dedicate to it. Something like: my $query = Rose::DB::TableName::Manager->getSelect(); $query->someField->setCond

Re: [RDBO] suggestions for enchancement

2007-11-26 Thread John Siracusa
On Nov 26, 2007, at 5:29 PM, maxim wrote: > It would be nice to have abstraction layer for SQL query itself. Yeah, no kidding :) I've got ideas for one but so far not enough time to dedicate to it. > Something like: > > my $query = Rose::DB::TableName::Manager->getSelect(); > $query->someField

Re: [RDBO] Can't test out RDBO v0.765

2007-11-24 Thread John Siracusa
On 11/24/07 6:56 PM, Bob McClure wrote: > I am having problems getting RDBO v0.765 to test out. This is a > Fedora Core 6 installation with perl v5.8.8, Rose::DB v0.736, > sqlite-3.3.6-2 (from RPM), DBD::SQLite v1.14, DBI v1.52. RDBO v0.760 > tested and installed fine. DBD::SQLite 1.13 and 1.14

Re: [RDBO] Wanted: Perl programmers (Boston, MA)

2007-11-19 Thread John Siracusa
On Nov 19, 2007 10:23 AM, Perrin Harkins <[EMAIL PROTECTED]> wrote: > When is the Rose web framework coming to CPAN? I'm ready for it. Not any time soon, I'm sure. What I'm using at work is more like a prototype. -John - T

Re: [RDBO] meta / setup design

2007-11-16 Thread John Siracusa
On 11/16/07 5:41 PM, Jonathan Vanasco wrote: > Would you mind elaborating on how __PACKAGE__->meta and ->setup work? Maybe a week from now. I'll be away all next week. While I'm gone, check out the source :) Here's the 5 second version: The meta object is class data, one object per RDBO-derived

Re: [RDBO] Wanted: Perl programmers (Boston, MA)

2007-11-16 Thread John Siracusa
On 11/16/07 5:38 PM, Jonathan Vanasco wrote: > "This position requires does require occasionally lifting up to 20 > (twenty) pounds" > > I don't even know where to begin on that one... Apparently it's some sort of ADA requirement. (Or so says HR...) -John

  1   2   3   4   5   6   7   8   9   10   >