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

2008-01-24 Thread Ted Zlatanov
On Wed, 23 Jan 2008 13:01:21 -0500 John Siracusa [EMAIL PROTECTED] wrote: JS Yeah, [Class::C3] simplifies this situation greatly (at the cost of JS another dependency and possibly a new set of bugs/issues :) I really think you should put that in the RDBO::Cached docs, with caveats and all, but

Re: [RDBO] insert speed questions with RDBO

2008-01-23 Thread Ted Zlatanov
On Tue, 22 Jan 2008 20:09:55 -0500 John Siracusa [EMAIL PROTECTED] wrote: JS 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

Re: [RDBO] insert speed questions with RDBO

2008-01-22 Thread Ted Zlatanov
On Mon, 07 Jan 2008 12:34:16 -0600 Ted Zlatanov [EMAIL PROTECTED] wrote: TZ On Sat, 5 Jan 2008 15:27:34 -0500 John Siracusa [EMAIL PROTECTED] wrote: JS 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

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

2008-01-21 Thread Ted Zlatanov
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 with a copy+edit, see below), and then each of my classes can inherit from

Re: [RDBO] Too Many connections

2008-01-11 Thread Ted Zlatanov
On Fri, 11 Jan 2008 07:43:23 -0500 John Siracusa [EMAIL PROTECTED] wrote: JS That's why I think the default unshared behavior is the safest in JS that sharing now requires some action (and therefore some thought) on JS the part of the developer. The required action is simple (usually a JS line

Re: [RDBO] Too Many connections

2008-01-11 Thread Ted Zlatanov
On Fri, 11 Jan 2008 13:29:43 -0500 John Siracusa [EMAIL PROTECTED] wrote: JS 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

Re: [RDBO] insert speed questions with RDBO

2008-01-07 Thread Ted Zlatanov
On Sat, 05 Jan 2008 14:07:05 -0500 Adam Prime [EMAIL PROTECTED] wrote: AP Ted Zlatanov 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. I'm

Re: [RDBO] insert speed questions with RDBO

2008-01-07 Thread Ted Zlatanov
On Sat, 5 Jan 2008 15:27:34 -0500 John Siracusa [EMAIL PROTECTED] wrote: JS 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

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

2007-12-24 Thread Ted Zlatanov
On Fri, 21 Dec 2007 20:53:55 -0500 John Siracusa [EMAIL PROTECTED] wrote: JS 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);

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

2007-12-24 Thread Ted Zlatanov
On Fri, 21 Dec 2007 20:39:18 -0500 Adam Prime [EMAIL PROTECTED] wrote: AP I'm not sure if this will help, but i had a similar sort of problem with AP a table called 'Category'. this is my loader (which works). I can't AP remember where this is originally sourced from unfortunately (but i AP

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

2007-12-21 Thread Ted Zlatanov
I couldn't find an example in the docs of how to set up Rose::DB::Object::Loader with a properly pluralizing convention manager. I tried the following, but I keep getting a class called Currencie from a table called currencies for example. I must be missing something. Ted package

[RDBO] matching databases with class hierarchies

2007-12-21 Thread Ted Zlatanov
Let's say I have two DB domains: prod/dev and two DB types: a/b. All four combinations have 99% of the same data structure but need different login info and some slightly different fields (e.g. the table 'cats' in dev-a has an extra timestamp column). I've set up all the right things in a

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

2007-12-21 Thread Ted Zlatanov
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 pluralizing convention manager. I tried

[RDBO] ideas from Cayenne

2007-12-12 Thread Ted Zlatanov
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 hierarchy like this (naming simplified): cayenne.BaseObject parent of

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

2007-12-12 Thread Ted Zlatanov
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 soon). It may or may not be public (depending on if I have JS time

Re: [RDBO] ideas from Cayenne

2007-12-12 Thread Ted Zlatanov
On Wed, 12 Dec 2007 10:14:27 -0500 John Siracusa [EMAIL PROTECTED] wrote: JS The basic idea (safe repeated auto-generation with all JS customizations stored elsewhere) has been done several different JS ways in RDBO by others, and I've been meaning to formalize at least JS one way to do it. But

Re: [RDBO] Migration from legacy basic DBI to Rose?

2007-03-16 Thread Ted Zlatanov
On Fri, 16 Mar 2007 10:37:14 -0400 John Siracusa [EMAIL PROTECTED] wrote: Just wondering if there might already exist some way to easily convert the hierarchical hash to and from a Rose DB Object that corresponds to the hierarchical data in the Rose DB Object (that corresponds to the

Re: [RDBO] safe namespace for user data in rose objects ?

2007-03-01 Thread Ted Zlatanov
On Thu, 01 Mar 2007 11:01:05 -0800 merlyn@stonehenge.com (Randal L. Schwartz) wrote: Jonathan == Jonathan Vanasco [EMAIL PROTECTED] writes: Jonathan On Mar 1, 2007, at 11:30 AM, Ted Zlatanov wrote: Jonathan so i've been caching results internally on the object, as such: RLS You could use

Re: [RDBO] Customising R:D:O:Loader generated methods

2007-02-21 Thread Ted Zlatanov
On Wed, 21 Feb 2007 09:40:53 -0500 John Siracusa [EMAIL PROTECTED] wrote: JS You're right that the on_set trigger happens after the column value JS has been set. I could probably stand to add a few more trigger events JS (e.g., before_set) but I'm wary of trigger-itis gumming up the works. JS

Re: [RDBO] New Manager argument forms

2007-02-16 Thread Ted Zlatanov
On Fri, 16 Feb 2007 13:11:05 -0500 John Siracusa [EMAIL PROTECTED] wrote: JS How do people feel about the following shortcuts? Manager- get_objects([ a = 1, b = 2 ]); Manager- get_objects({ a = 1, b = 2 }); JS Both being equivalent to: Manager- get_objects(query = [ a = 1, b = 2 ]); JS This

Re: [RDBO] Deleting from a one-to-many

2007-02-06 Thread Ted Zlatanov
On Tue, 6 Feb 2007 13:19:37 -0500 John Siracusa [EMAIL PROTECTED] wrote: JS After doing that, you could set prices to undef to cause the JS collection to be re-fetched from the database on the next access: JS my($price) = grep { $_-region eq 'UK' } $p-prices; JS $price-delete; JS

Re: [RDBO] New find method type for one-to-many relationships

2007-01-31 Thread Ted Zlatanov
On 30 Jan 2007, [EMAIL PROTECTED] wrote: In SVN, I've just added a new method type to one-to-many relationships (no docs yet). Right now, I'm calling it find. It's for fetching related objects using ad-hoc queries instead of being constrained to the mapping defined in the relationship

Re: [RDBO] conditional relationships

2007-01-16 Thread Ted Zlatanov
On 16 Jan 2007, [EMAIL PROTECTED] wrote: On 1/15/07, Cory Bennett [EMAIL PROTECTED] wrote: Ahh, found the magic. In Rose::DB::Object::Metadata::Relationship::OneToMany I found the special (but buried) 'query_args' variable. So this will do what I want: relationships = [

Re: [RDBO] helper function request

2007-01-12 Thread Ted Zlatanov
On 11 Jan 2007, [EMAIL PROTECTED] wrote: On Jan 11, 2007, at 3:54 PM, John Siracusa wrote: If so, let's go with Debug instead of Debugging. I picked Debugging before because I didn't want any confusion with the various $Debug package variables, but if everything's going to be in

Re: [RDBO] Oracle progress

2006-12-06 Thread Ted Zlatanov
On 6 Dec 2006, [EMAIL PROTECTED] wrote: On 12/6/06, John Siracusa [EMAIL PROTECTED] wrote: On 12/6/06 12:44 AM, Clayton Scott wrote: 2. create a sequence called tablename_seq That's the crux of it. It looks like I'll have to just pick a naming scheme and say, If you deviate from this,

Re: [RDBO] YAML and JSON helpers

2006-07-10 Thread Ted Zlatanov
On 10 Jul 2006, [EMAIL PROTECTED] wrote: Any ideas on the format for these? For example, I've got a column_values_as_yaml() helper method like this: $o = My::Object-new(a = 1, b = 2, c = 3); print $o-column_values_as_yaml; which prints: a: 1 b: 2 c: 3 But then what should the

Re: [RDBO] YAML and JSON helpers

2006-07-10 Thread Ted Zlatanov
On 10 Jul 2006, [EMAIL PROTECTED] wrote: Hm, seems like people have different goals here. My goal was simply to be able to round-trip from Perl to YAML/JSON and then back to Perl. Ah, I understand. A simple hash makes more sense in that case, the way you had it originally. Ted

Re: [RDBO] [semi-OT] Adding version control to RDBO objects

2006-05-30 Thread Ted Zlatanov
On 29 May 2006, [EMAIL PROTECTED] wrote: On 5/29/06 6:21 AM, Svilen Ivanov wrote: I would like to extend RDBO to support versioning of properties for each instance. I've done this a few different ways in the past. The safest way, IME, is to let the database do almost all of the work, and

Re: [RDBO] Inheritance change_column()

2006-05-18 Thread Ted Zlatanov
On 10 May 2006, [EMAIL PROTECTED] wrote: Oh well, I think replace_column() is more clear anyway. I'll add it in the next version. replace still has connotations of a permanent change. Why not remap? Ted --- Using Tomcat but need to do