[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

[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

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] 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

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 used and

[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

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 validation.

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. Intentional? No, just an oversight (though

[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 documented

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] 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_foos(query =

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; eval {

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

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

[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 now turned

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 back on and do the necessary pre-fork

[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 Grzegorz

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, but

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

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] 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 slow

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. Can you use an alternate normal function call form

[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) * Fixed a bug

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 sure

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-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 my condition

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 But

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

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 accessors

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 practical to

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',

[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 the line doesn't change the logic any

[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::Cached

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 as

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 pretty sure DBI

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] 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 up your class hierarchy and then yank in a JS particular

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/commit

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 a helper for this isn't too hard. Look around JS line 560

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 DB

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] 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 would the

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 = 7.00,

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 that it

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

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 inserting

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 accurate,

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 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 = 'inventory', ...

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')-schema, It works, and seems to be okay - see any

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

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.

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:

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 properly

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] 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 after some editing with the help of RHTMLO

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 bug

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

2007-12-13 Thread John Siracusa
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 the ability to do unrestricted

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:

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 go out in the next release (which JS is coming

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 pretty long, but it'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

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 -

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 control

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 set all the

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] 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 comment and reading up on the Rose::DB and DBI docs. The SSL options DO need

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] 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. -John

[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] 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

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 least

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 limited set of features

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-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();

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();

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 are

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

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

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

2007-11-14 Thread John Siracusa
My employer is looking for developers. The job description is here: http://jobs.perl.org/job/7265 The short version is that we need good Perl programmers. We use mod_perl, Informix, MySQL, an MVC web application framework, and (of course :) Rose::DB::Object and Rose::HTML::Objects. We also

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

2007-11-14 Thread John Siracusa
On Nov 14, 2007 10:52 AM, Randal L. Schwartz [EMAIL PROTECTED] wrote: John == John Siracusa [EMAIL PROTECTED] writes: John My employer is looking for developers. The job description is here: John http://jobs.perl.org/job/7265 Or, it isn't. :) It is, really! :) (I see it, anyway) -John

[RDBO] Undef and default values - partial implementation

2007-11-14 Thread John Siracusa
I've started adding the undef sets null functionality. It's controlled through the new undef_sets_null boolean column attribute, which is false by default to maintain backwards compatibility. You can change the default at several higher levels as well: * For all columns of a particular column

[RDBO] ANNOUNCE: Rose::DB 0.736 released

2007-11-13 Thread John Siracusa
A rare Rose::DB release without a Rose::DB::Object release. I just want to get the caching stuff out there so people can try it. -John 0.736 (11.13.2007) - John Siracusa [EMAIL PROTECTED] * Added new_or_cached() method and associated caching framework. * Added dbi_connect() method

Re: [RDBO] 'Operation ne: no method found' in QueryBuilder::build_select

2007-10-30 Thread John Siracusa
On 10/29/07 8:09 PM, Ron Savage wrote: Jonathan Swartz wrote: We can't identify any recent changes to our code or to our Rose libraries that would have triggered this, so we're suspecting certain piece(s) of data in our database. I agree with your interpretation. Specifically, the bug has

Re: [RDBO] 'Operation ne: no method found' in QueryBuilder::build_select

2007-10-30 Thread John Siracusa
On 10/30/07, Jonathan Swartz [EMAIL PROTECTED] wrote: $column is a Rose::DB::Object::Metadata::Column::Timestamp, according to the error. The errors originate from all sorts of operations, but they always end in the exact error message above - it is always Timestamp. I can try loading

Re: [RDBO] 'Operation ne: no method found' in QueryBuilder::build_select

2007-10-29 Thread John Siracusa
On 10/29/07 7:41 PM, Jonathan Swartz wrote: A few days ago we started getting this error intermittently in QueryBuilder::build_select: error_log.2007-10-29:[Mon Oct 29 15:29:37 2007] [error] [client 69.26.166.38] Operation ne: no method found, left argument has no overloaded magic,

Re: [RDBO] Adding data to the mapping table in many-to-many

2007-10-28 Thread John Siracusa
On 10/28/07 9:03 PM, Arshavir Grigorian wrote: I have a many-to-many relationship. When I insert a new record in the mapping table, while also inserting a new record one of the end tables, I would like to set a certain value in the mapping table. Many-to-many relationships exist as a

Re: [RDBO] cached DBI handles

2007-10-27 Thread John Siracusa
Er, wasn't the original point of new_or_cached() to return a preexisting Rose::DB object, not a new Rose::DB object with a preexisting $dbh? Maybe I'm mis-remembering... -John - This SF.net email is sponsored by: Splunk

Re: [RDBO] cached DBI handles

2007-10-27 Thread John Siracusa
On 10/27/07, Peter Karman [EMAIL PROTECTED] wrote: I don't really see the point of caching Rose::DB objects myself. They're cheap to create, compared to DBI handles, and the only use I can see in caching them is to make use of the DBI handle they hold. In which case, why not just use the DBI

Re: [RDBO] cached DBI handles

2007-10-26 Thread John Siracusa
Here are my thoughts for revisions: * I'm not sure ping()ing belongs here at all, at least as an auto-called method. But if we do add it, we should use DBI's ping() method rather than trying to roll our own. (As an example, select 1 doesn't work in every database, and sometimes even when it

Re: [RDBO] Identity of Rose::DB::Object::Cached derived objects

2007-10-24 Thread John Siracusa
On 10/18/07 5:03 PM, Lamprecht wrote: while I'm doing my first steps into Rose::DB, I face the following problem: I am looking for a way to maintain identity of Rose::DB::Object instances, that share the same PK. ( Represent the same row ). I hoped deriving from Rose::DB::Object::Cached

Re: [RDBO] Primary and unique keys

2007-10-24 Thread John Siracusa
On 10/25/07 12:45 AM, Arshavir Grigorian wrote: In my class definition, I have primary_key_columns = [ 'pk' ], unique_key = [ 'pk', 'col2' ], Since, I am accessing the data more often using the 2 column match, does it make sense to trick Rose into thinking that my primary key is really a

Re: [RDBO] Primary and unique keys

2007-10-24 Thread John Siracusa
On 10/25/07 1:29 AM, Arshavir Grigorian wrote: Thanks. I guess I am not sure how the unique keys are named, http://search.cpan.org/~jsiracusa/Rose-DB-Object-0.765/lib/Rose/DB/Object/Me tadata/UniqueKey.pm name [NAME] Get or set the name of the unique key. This name should be unique among all

Re: [RDBO] form validation and RDBO

2007-10-23 Thread John Siracusa
On 10/23/07, Peter Karman [EMAIL PROTECTED] wrote: The other thing I haven't yet got to (but was hoping to work on today) is some ways to tie the validation pieces of RHTML and RDBO together so that the validation code can be defined in one place. As Cees noted earlier in this same thread, the

Re: [RDBO] form validation and RDBO

2007-10-23 Thread John Siracusa
On 10/23/07, Peter Karman [EMAIL PROTECTED] wrote: I keep the labels 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. Yes, that (labels in HTML) is what I do currently as well.

Re: [RDBO] Rose::DBx::TestDB

2007-10-23 Thread John Siracusa
On 10/23/07, Peter Karman [EMAIL PROTECTED] wrote: ** NOTE ** I know that there is an issue with some versions of DBD::SQLite. I cribbed the standard RDBO test code for evaluating the sqlite version. For the purposes of the module however, I didn't deem it a serious enough issue to croak if

Re: [RDBO] form validation and RDBO

2007-10-23 Thread John Siracusa
On 10/23/07, Bill Moseley [EMAIL PROTECTED] wrote: On Tue, Oct 23, 2007 at 01:27:17PM -0400, John Siracusa wrote: OTOH, the server often needs the labels in order to construct good error messages. An alternative is to pass error codes to the templates, but IME that tends to result

Re: [RDBO] form validation and RDBO

2007-10-23 Thread John Siracusa
On 10/23/07, Christopher H. Laco [EMAIL PROTECTED] wrote: Personally, I always use keys, and consider _AUTO and the exposure ERR_WRONG_PASSWORD an all out failure. I've always wanted to have a test module that scoured source for keys and ensured they were in all l18n files. My solution is to

Re: [RDBO] form validation and RDBO

2007-10-23 Thread John Siracusa
On 10/23/07, Bill Moseley [EMAIL PROTECTED] wrote: We have quite the existing translation system here at work (all our business is overseas and we do 16 different languages), and using English as the key is pretty much a non-starter in our system. (It also makes it a bit harder to change the

Re: [RDBO] Install Error

2007-10-15 Thread John Siracusa
On 10/13/07, Jonathan Vanasco [EMAIL PROTECTED] wrote: Anyone else get this when updating? t/setup...NOK 3/4 # Failed test 'ROSEDBRC 2' # in t/setup.t at line 22. # got: 'localhost' # expected: 'othervalue' No errors here. That test is tiny. You should be

  1   2   3   4   5   6   >