Re: [RDBO] limit and offset with one-to-many relationship

2005-10-06 Thread John Siracusa
On 10/6/05, Uwe Voelker [EMAIL PROTECTED] wrote: Just for me to make it clear: If I run the same query first with require_objects and then with with_objects the number of (primary) objects returned by require_objects is always smaller or equal to with_objects? Because require_objects skips

Re: [RDBO] Distinct and fetch_only manager params

2005-10-07 Thread John Siracusa
On 10/7/05 10:30 AM, Uwe Voelker wrote: Allow the name of the relation too. For the pod example this would be 'prices' because: Product---(prices)--Price. (Unfortunately the Price table is 'prices' too, so this is a bad example.) But by allowing this the user could completely leave out the

Re: [RDBO] Distinct and fetch_only manager params

2005-10-10 Thread John Siracusa
On 10/10/05 5:41 AM, Uwe Voelker wrote: Cool. Now only 'sort_by' is missing. What about this: 1. if it's a scalar, use it as it is (use as sql snippet) 2. if it's a arrayref expand the column as for the 'query' parameter Did you try it? :) I already do expansion (and sometimes compression to

[RDBO] New rules for sort_by manager param

2005-10-12 Thread John Siracusa
Unprefixed simple column names are now assumed to belong to t1. I don't do any fancy parsing, so column names that appear inside complex expressions will still have to be prefixed with an explicit tN, foreign key, or relationship name. In CVS now. -John

Re: [RDBO] New rules for sort_by manager param

2005-10-13 Thread John Siracusa
On 10/13/05, Uwe Voelker [EMAIL PROTECTED] wrote: What about a new release? Or do you want to finish the tutorial first? I'll probably release 0.077 this weekend, without the tutorial. -John --- This SF.Net email is sponsored by: Power

Re: [RDBO] OUTER JOIN and ISNULL

2005-10-14 Thread John Siracusa
On 10/14/05 7:35 AM, Uwe Voelker wrote: SELECT MD.* FROM MD LEFT OUTER JOIN MDV ON MD.ID=MDV.MD WHERE ISNULL(MDV.MD) How do I do this in Rose? Step 1: sync from CVS :) Step 2: $mds = MD::Mgr-get_mds(distinct = 1, with_objects = [ 'mdvs' ],

Re: [RDBO] OUTER JOIN and ISNULL

2005-10-14 Thread John Siracusa
On 10/14/05, Uwe Voelker [EMAIL PROTECTED] wrote: SELECT DISTINCT t1.ID AS t1_ID FROM MD t1 LEFT OUTER JOIN MDV t2 ON(t1.ID = t2.MD) WHERE t2.MD IS NULL AND ((t1.ID = t2.MD) OR (t2.MD IS NULL)) The last line is not neccessary. Does it come from the 'with_objects'? But is

Re: [RDBO] Introducing the convention manager

2005-10-19 Thread John Siracusa
On 10/18/05, John Siracusa [EMAIL PROTECTED] wrote: So while you can reduce, say, the vendor class to this: package My::Vendor; use base 'My::Object'; __PACKAGE__-meta-auto_initialize; and it works fine, once you start stripping down the classes that participate in the product

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

2005-10-24 Thread John Siracusa
0.078 (10.24.2005) - John Siracusa [EMAIL PROTECTED] * Added page and per_page manager parameters for the truly lazy. * Fixed a bug caused by a conflict between the convention manager and the legacy foreign key name generator. -John

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

2005-10-25 Thread John Siracusa
0.079 (10.25.2005) - John Siracusa [EMAIL PROTECTED] * Fixed bugs that caused auto-inited many-to-many relationships to be inadequately fleshed-out under some circumstances. This version requires the also-freshly-released Rose::DB version 0.031. -John

Re: [RDBO] Support for views

2005-10-28 Thread John Siracusa
On 10/28/05 6:31 AM, Sean Davis wrote: On 10/27/05 4:34 PM, John Siracusa [EMAIL PROTECTED] wrote: On 10/27/05, Sean Davis [EMAIL PROTECTED] wrote: Is there support for views in RDBO (as in views in the database acting as tables, not as in fake views done in perl)? I don't see any

Re: [RDBO] inheritance support?

2005-11-12 Thread John Siracusa
I've used most of the approaches you describe, albeit it without always knowing their formal names. Some are better supported than RDBO than others. I'll try to handicap the field for you. 1. Table per class (aka union mapping aka filtered mapping) a single table with pkey corresponding to

Re: [RDBO] inheritance support?

2005-11-12 Thread John Siracusa
On 11/12/05 7:46 PM, Mark D. Anderson wrote: I misspoke, there does seem to be one CPAN object-relational package that has some documention and support for inheritance mapping: Tangram. The Tangram docs have an interesting statement on the disadvantages of filtered mapping This mapping is

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

2005-11-14 Thread John Siracusa
This is a triple release because there are bug fixes in two prerequisite modules. Here are all the release notes. Rose::DB::Object: 0.080 (11.14.2005) - John Siracusa [EMAIL PROTECTED] * Added column triggers for get, set, load, save, inflate, and deflate. * Added support for new

[RDBO] ANNOUNCE: Rose::DB::Object 0.081 released (with tutorial!)

2005-11-15 Thread John Siracusa
0.081 (11.15.2005) - John Siracusa [EMAIL PROTECTED] * Tutorial added. Yay :) -John --- This SF.Net email is sponsored by the JBoss Inc. Get Certified Today Register for a JBoss Training Course. Free Certification Exam for All

[RDBO] Rose::DB::Object::Loader

2005-11-19 Thread John Siracusa
There's a loader lurking in CVS if anyone wants to try it out. I haven't tested it with Informix yet, but it seems to work in Pg and MySQL. -John --- This SF.Net email is sponsored by the JBoss Inc. Get Certified Today Register for a JBoss

Re: [RDBO] Loader and manager class methods

2005-11-28 Thread John Siracusa
On 11/28/05, Sean Davis [EMAIL PROTECTED] wrote: I have a loader that loads a class My::DB::GMain associated with table g_main and seems to load My::DB::GMain::Manager. However, when I make this call: my @gmain = My::DB::GMain::Manager-get_gmains(query=[gene_id=672]); I get: Can't

Re: [RDBO] Loader and manager class methods

2005-11-28 Thread John Siracusa
The next release will define a new convention manager method: --- =item Btable_to_manager_base_name TABLE Given a table name, return a base name suitable for use as the value of the Cbase_name parameter to LRose::DB::Object::Manager's make_manager_methods() method. The default implementation

[RDBO] New benchmark results posted

2005-11-30 Thread John Siracusa
I've updated the benchmarks with results form the latest versions of the ORM modules: http://rose.sourceforge.net/wiki/index.php/RDBO/Benchmark Class Version - --- Class::DBI v3.0.12 Class::DBI::Sweet 0.05 DBIx::Class0.04 Rose::DB::Object

Re: [RDBO] ARRAY column types in Rose::DB

2005-12-01 Thread John Siracusa
On 12/1/05 7:17 PM, Torsten Seemann wrote: Does the generic code store them in a string of the same forma the Pg uses to set them, ie. '{1,foo,-3,bar bie,1.61818}' ? Yes, although that's technically a private implementation detail :) What happens if someone manually shifted an element onto

Re: [RDBO] Any chance of support for split read/write servers?

2005-12-04 Thread John Siracusa
On 12/4/05 7:36 PM, John Siracusa wrote: sub save { my $self = shift; my $db = $self-db; if($db-type ne 'master') { $self-db(My::DB-new('master')); } # XXX: also propagate the new $db to all the sub-objects here $self-SUPER::save(@_); } Oh, and if you want

Re: [RDBO] Any chance of support for split read/write servers?

2005-12-04 Thread John Siracusa
On 12/4/05 8:58 PM, Michael Alan Dorman wrote: Hmm. The method you outlined in your message of swapping DB handles dynamically didn't seem all that arduous. Perhaps just the tiniest bit of infrastructure could help. I guess I'm thinking along the lines of a hook for each operation where

Re: [RDBO] Scaffolding from RDBO

2005-12-13 Thread John Siracusa
On 12/13/05 8:13 AM, Sean Davis wrote: Thanks for the pointers. Your thought process was exactly what I was hoping to see And one more thing regarding multiple objects in a single form. That's fine too. Just iterate over each object and make the corresponding fields, maybe prefixing the

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

2005-12-16 Thread John Siracusa
Another double release: new version of Rose::DB (0.55) is required to support RDBO 0.58. The RDBO changes are: 0.58 (12.16.2005) - John Siracusa [EMAIL PROTECTED] * Added auto-detection of multiple sequence-based primary key columns and primary keys with one or more non-sequence

Re: [RDBO] Self-referential many-to-many relationships.

2005-12-27 Thread John Siracusa
On 12/26/05 10:20 PM, Daniel Pittman wrote: The error I get on trying to load the object is: Cannot create method FooParent::child - method already exists at /usr/share/perl5/Rose/DB/Object/Metadata/MethodMaker.pm line 379 [...] If anyone can point me to where I have gone wrong, or even

Re: [RDBO] Self-referential many-to-many relationships.

2005-12-27 Thread John Siracusa
On 12/27/05 8:27 AM, John Siracusa wrote: On 12/27/05 8:22 AM, John Siracusa wrote: [a bunch of stuff that's not applicable to your situation] Actually, I was mostly right earlier. (No, really this time! :) You have a conflict in your FooParent class between the foreign key and column names

Re: [RDBO] Manipulating `bitfield'

2006-01-02 Thread John Siracusa
On 1/2/06, Svilen Ivanov [EMAIL PROTECTED] wrote: Am I missing something obvious? I can provide self-contained test upon request. I don't think you're missing anything obvious, but please do send or post a self-contained test case and I'll investigate. -John

Re: [RDBO] Loader make_modules problem?

2006-01-04 Thread John Siracusa
On 1/4/06, Sean Davis [EMAIL PROTECTED] wrote: The resulting modules contain references to some modules that do not exist, it seems. For example, the Dog::DB::Dog module looks like: package Dog::DB::Dog; use Dog::DB::DB::Object::Base1; [...] And Dog::DB::DB::Object::Base1 isn't actually

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

2006-01-06 Thread John Siracusa
(01.06.2006) - John Siracusa [EMAIL PROTECTED] * Fixed a make_modules() bug that caused incorrect init_db() methods to be created in some cases. (Reported by Sean Davis) Rose::DB: 0.59 (01.06.2006) - John Siracusa [EMAIL PROTECTED] * The type and domain parameters to register_db() now

[RDBO] Re: [RHTMLO] Example code using DateTime fields with DB::Object date fields

2006-01-08 Thread John Siracusa
On 1/6/06 6:17 PM, Sean Davis wrote: I'm sorry to keep littering the lists. I have a form that has a DateTime field and a DB::Object that has a timestamp in it. I have a page on which I can enter the date along with other information. I submit this page and get the error: Caught

[RDBO] Re: [RHTMLO] Error handling on validate()

2006-01-09 Thread John Siracusa
(Sent to the RDBO list too because this is mostly an RDBO issue.) On 1/9/06 7:11 AM, Sean Davis wrote: In a simple form, I have a text field with length = 10. When I call validate() with an input to that field longer than 10, I get a fatal error. Caught exception Dog::DB::Dog: Value for

Re: [RDBO] Problems with foreign keys/relationships

2006-01-09 Thread John Siracusa
On 1/9/06, Scott Karns [EMAIL PROTECTED] wrote: Unfortunately, I now encounter the following warning and error: WARNING: Fetching sub-objects via more than one one to many relationship in a single query may produce many redundant rows, and the query may be slow. If you're sure you want to do

Re: [RDBO] Adding new column types

2006-01-11 Thread John Siracusa
On 1/11/06 9:16 AM, Scott Karns wrote: My current problem is that the database I'm working with contains two column types that are specific to postgres and don't seem to be supported by RDBO. The first I alluded to in an earlier message, the 'OID' column type that I am using to store what

Re: [RDBO] Catalyst model

2006-01-12 Thread John Siracusa
On 1/12/06, Sean Davis [EMAIL PROTECTED] wrote: I thought about the NEXT call (and even tried to modify the code to use NEXT, unsuccessfully), but I hadn't thought of the obvious point that Matt brought to my attention. When Catalyst starts, it calls new on all its components. Since the

Re: [RDBO] class cache expiry

2006-01-13 Thread John Siracusa
On 1/13/06, Carl Franks [EMAIL PROTECTED] wrote: The RDBO-Metadata docs reads: clear_object_cache Clear the memory cache for all objects of the Rose::DB::Object::Cached-derived class associated with this metadata object. Is it possible to clear the cache for all objects of a particular

Re: [RDBO] Q: State of Oracle support

2006-01-24 Thread John Siracusa
On 1/24/06 2:29 AM, Ron Savage wrote: What is the state? Is there any unshipped Oracle code available to be worked on? Is it a matter of converting *::Pg.pm, say, to *::Oracle.pm, for starters? At the moment I have a great deal of time available to do the typing, if the answer to the

Re: [RDBO] Bitfield problem - again

2006-01-24 Thread John Siracusa
On 1/24/06, Rob Kinyon [EMAIL PROTECTED] wrote: Ahhh ... there's a solution here. *grins* I provided a patch to DBD::mysql to do param type guessing using the undocumented mysql_unsafe_bind_type_guessing attribute Is that a connect option or a $dbh/$sth attribute? Can you give me an example

Re: [RDBO] Bitfield problem - again

2006-01-24 Thread John Siracusa
On 1/24/06, Rob Kinyon [EMAIL PROTECTED] wrote: It's a $dbh attribute. $dbh-{mysql_unsafe_bind_type_guessing} = 1; The reason it's considered 'unsafe' is that, theoretically, it's a place where SQL Injection -could- occur. However, it's extremely unlikely, given the strictness of the

Re: [RDBO] Bitfield problem - again

2006-01-24 Thread John Siracusa
On 1/24/06, Rob Kinyon [EMAIL PROTECTED] wrote: The reason I wrote the patch is so that I would use indices for numeric columns. If MySQL has to convert the value from a string to a number, it doesn't use an index. You might want to consider that when dealing with stuff. That shouldn't be an

Re: [RDBO] Q: State of Oracle support

2006-01-24 Thread John Siracusa
On 1/24/06, Rob Kinyon [EMAIL PROTECTED] wrote: Most popular is a difficult term. DBD::Oracle supports back to Oracle 7, after a fashion. 9.2 has been out for about 5-6 years and in my consulting career, I've never encountered anything before 9.2 (except in extreme legacy cases where I once

Re: [RDBO] Bitfield problem - again

2006-01-24 Thread John Siracusa
On 1/24/06, Rob Kinyon [EMAIL PROTECTED] wrote: According to the DBI docs under the description of the execute() method, it says: If any arguments are given, then Cexecute will effectively call L/bind_param for each value before executing the statement. ...the key word being effectively.

Re: [RDBO] Q: State of Oracle support

2006-01-24 Thread John Siracusa
On 1/24/06, Rob Kinyon [EMAIL PROTECTED] wrote: Heh. It's a little more complicated than that. You have to create a BEFORE INSERT trigger to read the next value from the sequence and set the ID to it. Well, whatever gymnastics the db owner has to go through to set up the tables in the first

Re: [RDBO] Q: State of Oracle support

2006-01-24 Thread John Siracusa
On 1/24/06, Rob Kinyon [EMAIL PROTECTED] wrote: Are we going to do this? If we are, I'll bug some friends of mine. That probably depends on whether or not someone in we has an Oracle server to play with. I'm game if/when I get access to an Oracle database. I hear there's a personal server

Re: [RDBO] Q: State of Oracle support

2006-01-25 Thread John Siracusa
On 1/25/06, Todd Hepler [EMAIL PROTECTED] wrote: DBI needs a constraint_info() or unique_info() or somesuch, IMHO. Yeah, another API for DBD authors not to implement. (not that I'm bitter... ;) -John --- This SF.net email is sponsored by:

Re: [RDBO] finding rows in A using keyword table AK?

2006-01-28 Thread John Siracusa
On 1/28/06 3:30 PM, Mark D. Anderson wrote: So then we'd have something like: my $foo_keyword_rows = MyPackage::FooKeyword-get_foo_keywords(query = [keyword = 'tra']); my $matching_foo_rows = [map {$_-foo()} @$foo_keyword_rows]; this is dumb because I'm not fetching them with a

Re: [RDBO] Doubt regarding proper module usage

2006-01-31 Thread John Siracusa
On 1/31/06, Nilson Santos Figueiredo Junior [EMAIL PROTECTED] wrote: I was trying to perform some fairly simple benchmarks comparing Rose::DB::Object, Class::DBI and an in-house solution and came up with some disappointing results from Rose::DB::Object. I'd like to know if there's something I

Re: [RDBO] Doubt regarding proper module usage

2006-01-31 Thread John Siracusa
On 1/31/06, Nilson Santos Figueiredo Junior [EMAIL PROTECTED] wrote: Anyway, I re-run the tests with the changes you mentioned and, unfortunately, only CDBI performance improved. Now CDBI is slightly faster than RDBO, even with RDBO prefetching the objects and CDBI doing no prefetching. The

Re: [RDBO] Doubt regarding proper module usage

2006-01-31 Thread John Siracusa
Oh, and I forgot one more RDBO speed tip. Throw a prepare_cached = 1 parameter in that Manager call. The Manager does not use prepare_cached() by default. If you know you're going to be repeating the same query many times, you should enable it, either per-call using the prepare_cached param, or

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

2006-02-03 Thread John Siracusa
The change list pretty much says it all. New Rose::DB (0.63) required. 0.66 (02.02.2006) - John Siracusa [EMAIL PROTECTED] * Disabled implicit primary table sort clause in the Manager when only fetching rows from a single table. * Allow multiple pre_init_hook()s in the loader

Re: [RDBO] Scaffoldings Accessories

2006-02-08 Thread John Siracusa
Sorry about that...I didn't have the list configured to only accept email from subscribers. (I thought that was the default!) It's fixed now. -John --- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for

Re: [RDBO] Scaffoldings Accessories

2006-02-08 Thread John Siracusa
On 2/8/06, Bernhard Graf [EMAIL PROTECTED] wrote: At least they tried to find context related lists - scaffolding was subject of discussion on this list before. ;-) Yeah, the subject line had me fooled for a second... -John --- This SF.net

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

2006-02-08 Thread John Siracusa
0.67 (02.07.2006) - John Siracusa [EMAIL PROTECTED] * Added the ability to directly set attributes in map records when saving the parent object. (Suggested by Bruno Czekay) * Slightly rearranged and added to the tutorial. There's a new Rose::DB release too, but it's not required

Re: [RDBO] Issues with Apache::Reload

2006-02-10 Thread John Siracusa
On 2/10/06, Bruno Czekay [EMAIL PROTECTED] wrote: It looks like Apache::Reload 'undefines' all reloaded classes, but since Manager classes aren't explicitly reloaded as .pm files, they cannot be undefined - nor overriden. The fastest solution is to declare every module supposed to be reloaded

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

2006-02-16 Thread John Siracusa
/project/showfiles.php?group_id=147570 -John 0.681 (02.16.2006) - John Siracusa [EMAIL PROTECTED] * Removed debugging trigger accidentally left in the 0.68 release. 0.68 (02.16.2006) - John Siracusa [EMAIL PROTECTED] * Added support for literal query values using scalar references

Re: [RDBO] multi level relationships?

2006-02-20 Thread John Siracusa
On 2/20/06 4:49 AM, Michael Lackhoff wrote: I have three tables in a relationship like 'cities', 'states' and 'countries'. Now I would like to say something like print $city-country-name; Given classes like this: package MyApp::State; ... __PACKAGE__-meta-relationships (

Re: [RDBO] cannot find sets that are clearly there

2006-02-20 Thread John Siracusa
On 2/20/06 3:08 PM, Michael Lackhoff wrote: # but now lets look at it the other way round: print PVonline::Praxen::Manager-get_praxen_count( query = [organisation_id = 1] # same result with this line: # query = [organisation_id = $id] ); # prints 0 !?! Try adding this before

[RDBO] Object data as hash ref (was: cannot find sets that are clearly there)

2006-02-21 Thread John Siracusa
On 2/21/06 3:00 PM, Michael Lackhoff wrote: My new project is a web based application with many forms that represent more or less a database table each and I have to write many forms to edit or add records. I use CGI-Application with a Plugin that makes it very easy to fill a form. This

Re: [RDBO] Q: State of Oracle support

2006-02-23 Thread John Siracusa
On 2/23/06 6:23 PM, Ron Savage wrote: o Rose::DB::Pg calls DateTime::Infinite::Past etc, so shouldn't it 'use' DateTime? Yeah, it should. (Well, DateTime::Infinite actually.) It gets away with not calling it because it uses Rose::DB which uses Rose::DateTime::Util which uses

[RDBO] Moving to Subversion

2006-02-24 Thread John Siracusa
SourceForge finally supports Subversion, so I'm migrating the existing CVS tree to SVN. SF.net says it'll take a day or so. -John --- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into

Re: [RDBO] Object data as hash ref (was: cannot find sets that are clearly there)

2006-02-27 Thread John Siracusa
On 2/27/06 7:28 AM, Michael Lackhoff wrote: Try something like this instead: if(UNIVERSAL::isa($val, 'DateTime')) { $hash{$field} = $val-sprintf('%m.%d.%Y'); } Thanks, this looks better and it works if I change it to: $val-strftime('%d.%m.%Y'); Er, yeah, sorry about

Re: [RDBO] Object data as hash ref (was: cannot find sets that are clearly there)

2006-02-27 Thread John Siracusa
On 2/27/06, Rob Kinyon [EMAIL PROTECTED] wrote: On 2/27/06, John Siracusa [EMAIL PROTECTED] wrote: Will calling it with zero args or just one arg suffice? Or do those actions alone cause mutations? No, which is how I was able to assert that you use param() as readonly. Only by passing

Re: [RDBO] Rose::DB V 0.65 t/list-tables.t

2006-02-27 Thread John Siracusa
On 2/27/06 8:05 PM, Ron Savage wrote: Line 263 says: die MySQL version too old unless($version =~ /^4\./); Now that MYSQL V 5 is supported, I think that check needs to be fixed. Drat, thought I got all those. Fixed in SVN now. Thanks. -John

Re: [RDBO] Rose::DB V 0.65 t/list-tables.t

2006-02-27 Thread John Siracusa
On 2/27/06 10:13 PM, Rob Kinyon wrote: On 2/27/06, John Siracusa [EMAIL PROTECTED] wrote: On 2/27/06 8:05 PM, Ron Savage wrote: Line 263 says: die MySQL version too old unless($version =~ /^4\./); Now that MYSQL V 5 is supported, I think that check needs to be fixed. Drat, thought I

Re: [RDBO] Object data as hash ref (was: cannot find sets that are clearly there)

2006-02-28 Thread John Siracusa
On 2/28/06 2:24 AM, [EMAIL PROTECTED] wrote: On 27 Feb 2006 at 11:20, John Siracusa wrote: Yeah, I'll spell it out in the docs. Basically, all I need to for consumption by Rose::HTML::Form is build is a structure like this: Perhaps I misunderstood something here but I thought we are talking

[RDBO] Oracle username vs. schema

2006-02-28 Thread John Siracusa
Ron Savage is working on Oracle support for Rose::DB. He's currently implicitly setting the schema() to the username(), but I'm not sure that's such a great idea. Where we run into problems is in the list_tables() method where the schema arg apparently can't be left blank:

Re: [RDBO] Object data as hash ref (was: cannot find sets that are clearly there)

2006-02-28 Thread John Siracusa
On 2/28/06 8:38 AM, Michael Lackhoff wrote: which could already be written as: $form = MyPersonForm-new; # $form isa Rose::HTML::Form $form-params($cgi-Vars); $form-init_fields; $person = $form-person_from_form; which isn't longer or less clear than the new params_from_cgi(),

Re: [RDBO] Oracle username vs. schema

2006-02-28 Thread John Siracusa
On 2/28/06 9:46 AM, Rob Kinyon wrote: Schema should default to username, but should be overridable. In other words, set it as normal, but in the intializer, set it to username if unset. Okay, but what about the list_tables() situation? Should it pass the schema value or wildcard with %?

Re: [RDBO] Oracle username vs. schema

2006-02-28 Thread John Siracusa
On 2/28/06 10:58 AM, Rob Kinyon wrote: On 2/28/06, John Siracusa [EMAIL PROTECTED] wrote: Okay, but what about the list_tables() situation? Should it pass the schema value or wildcard with %? Are you looking for all tables with that name in any schema that your user has access

Re: [RDBO] Oracle username vs. schema

2006-02-28 Thread John Siracusa
On 2/28/06 8:14 PM, Ron Savage wrote: o If I want to set the schema I can do that in the call to Rose::DB-register_db, just as I can with driver, database, etc, although I have not yet found a Rose doc indicating this was possible http://search.cpan.org/dist/Rose-DB/lib/Rose/DB.pm#register_db

Re: [RDBO] Oracle username vs. schema

2006-02-28 Thread John Siracusa
On 2/28/06 9:37 PM, Ron Savage wrote: The only call to primary_key_info I found is in Rose::DB::Object::Metadata::Auto, which will presumably just work, since it ultimately calls $db-schema, and the new docs will have told the user to set schema appropriately for Oracle, right? I really don't

Re: [RDBO] Docs for Metadata

2006-02-28 Thread John Siracusa
On 2/28/06 11:34 PM, Ron Savage wrote: When it says: Here's a complete example... how exactly do I tell the code to connect to a registry entry so as to read the metadata from the database? Er, tell what code? The loader? A call to auto_initialize() from within a class? Something else?

Re: [RDBO] Oracle username vs. schema

2006-02-28 Thread John Siracusa
On 3/1/06 12:03 AM, Ron Savage wrote: I would not want code inside Rose to say the schema param to primary_key_info (or any method, actually) comes from $self - schema || $self - username. What about another vendor where it has to be undef, and schema is undef, and username is set, as usually

Re: [RDBO] Docs for Metadata

2006-03-01 Thread John Siracusa
On 3/1/06 12:47 AM, Ron Savage wrote: On Wed, 01 Mar 2006 00:05:02 -0500, John Siracusa wrote: On 2/28/06 11:34 PM, Ron Savage wrote: When it says: Here's a complete example... how exactly do I tell the code to connect to a registry entry so as to read the metadata from the database? Er

Re: [RDBO] Oracle username vs. schema

2006-03-01 Thread John Siracusa
On 3/1/06 12:52 AM, Ron Savage wrote: On Wed, 01 Mar 2006 00:23:28 -0500, John Siracusa wrote: Should it be a fatal error on the call to register_db if schema doesn't match username when the driver is Oracle? Might as well be fatal, if that's what it's going to take to get all this to work

Re: [RDBO] Q: State of Oracle support

2006-03-01 Thread John Siracusa
On 3/1/06 6:34 PM, Ron Savage wrote: I've gained 'create view' privilege since I sent you that code, and have activated the commented-out references to views in list-tables.t, and those aspects of the tests now pass also. Great :) Are you set up with SVN yet? -John

Re: [RDBO] Rose::DB::Object::Metadata::Auto V 0.66 via Rose::DB::Object V 0.681

2006-03-01 Thread John Siracusa
On 3/1/06 10:44 PM, Ron Savage wrote: Pursuant to my attempts to generate Perl code under Oracle, I had to make a number of patches to this module. Ah, I didn't know you were editing Rose::DB::Object modules yet. I'll add them to the Oracle branch. Having just taken a casual look at your

Re: [RDBO] Rose::DB::Object::Metadata::Auto V 0.66 via Rose::DB::Object V 0.681

2006-03-01 Thread John Siracusa
On 3/2/06 12:41 AM, Ron Savage wrote: I wasn't intending to work on it. I just wanted to fiddle it to see what happened with my source code generator. Ah, okay. I added it to the branch anyway, though. At the very least, it'll give me good practice doing merges in SVN :) For the record,

Re: [RDBO] Various typos in the source

2006-03-02 Thread John Siracusa
On 3/2/06 10:14 PM, Ron Savage wrote: Both Rose::DB::Object::Metadata::Auto and Rose::DB::Object::Metadata::Auto::MySQL are missing an 'l' from: no primary key coumns found Thanks, fixed. (It was in Informix and SQLite too. Copy/paste...) -John

Re: [RDBO] Catalyst::Model::RDBO ?

2006-03-08 Thread John Siracusa
On 3/8/06 6:06 PM, Nilson Santos Figueiredo Junior wrote: Today I was wandering... is there anyone implementing a Catalyst model based on Rose::DB::Object? I think this would be something nice to have, both for Rose::DB::Object and Catalyst. This might be a nice project for someone to play

Re: [RDBO] Catalyst::Model::RDBO ?

2006-03-08 Thread John Siracusa
On 3/8/06 10:11 PM, Nilson Santos Figueiredo Junior wrote: It's usually simple glue code and without it, things get less coherent. You get one nice thing, though: $c-model('Artist') (where $c is the Catalyst context object) returns the appropriate object for the Artist model. What's the

Re: [RDBO] Catalyst::Model::RDBO ?

2006-03-08 Thread John Siracusa
On 3/8/06 11:27 PM, Nilson Santos Figueiredo Junior wrote: On 3/9/06, John Siracusa [EMAIL PROTECTED] wrote: Well, anyone could read the Rose::DB and RDBO tutorials and have all the information they need, I think. If this is really true, I think I'll try to tackle this on my own. But I

[RDBO] Helper methods

2006-03-09 Thread John Siracusa
I'm adding a Rose::DB::Object::Helpers module to house all of the extra methods that people might want, but that I don't want crowding Rose::DB::Object itself. Example usage: package MyDBObject; use base 'Rose::DB::Object'; use Rose::DB::Object::Helpers qw(load_or_insert

Re: [RDBO] sorted relationship output?

2006-03-14 Thread John Siracusa
On 3/14/06 8:12 AM, Uwe Voelker wrote: Can you think of a good way to pass custom manager_args to individual calls to a relationship accessor? Maybe a new read-only accessor type where arguments can't possible be meant to set values? Is it possible to make a second accessor for the same

Re: [RDBO] Problem with many to many mapping table

2006-03-15 Thread John Siracusa
On 3/15/06, Michael Lackhoff [EMAIL PROTECTED] wrote: Now everything seems broken: First I got some test failures in db-object-loader-5 I installed anyway but before made a backup.copy of the Rose/DB/Object directory. Now I always get an error message: Cannot create method

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

2006-03-16 Thread John Siracusa
This update fixes a significant bug and is recommended for all users. 0.691 (03.16.2006) - John Siracusa [EMAIL PROTECTED] * Fixed a bug that prevented the Manager from correctly handling many-to-one relationships in some situations. (Reported by Michael Lackhoff) Files sent

Re: [RDBO] Reusing Rose::DB::Objects

2006-03-22 Thread John Siracusa
On 3/22/06, Sean Davis [EMAIL PROTECTED] wrote: I would like to do a large amount of read-parse-store operations. In short, I have a large text file with one record per line. To speed things up, I have seen others reuse objects rather than allocating new ones for each record. Can I safely

Re: [RDBO] Postgres and bytea columns

2006-03-22 Thread John Siracusa
On 3/22/06 8:38 PM, Daniel Pittman wrote: Daniel Pittman [EMAIL PROTECTED] writes: Sean Davis [EMAIL PROTECTED] writes: Just tried it and Base64 encoding works fine. I can presumably inflate and deflate within my RDBO class. Thanks for the idea. Presumably that works because nothing in

Re: [RDBO] Postgres and bytea columns

2006-03-22 Thread John Siracusa
On 3/22/06 8:48 PM, John Siracusa wrote: Looking here: http://www.postgresql.org/docs/8.1/interactive/datatype-binary.html it seems that there's already an ASCII-ified format for bytea columns. Furthermore, bytea data seems to round-trip just fine without any fancy DBI stuff: # Insert

Re: [RDBO] Postgres and bytea columns

2006-03-22 Thread John Siracusa
On 3/22/06 9:43 PM, Sean Davis wrote: No error. I just got truncated insertion (presumably from a \000?). Ah, yeah, it does seem to truncate on null bytes: my $o1 = Foo-new(b = \001\000\003); $o1-save; my $o2 = Foo-new(id = $o1-id); $o2-load; print unpack('H*', $o1-b), \n; #

Re: [RDBO] negative relationships?

2006-03-24 Thread John Siracusa
On 3/24/06, Michael Lackhoff [EMAIL PROTECTED] wrote: Say, I have two tables: vendors and products. Now I want a list of all the vendors that have no products yet. This can be seen from the products table if there are no records with the vendor_id of the vendor in question. Is this possible

Re: [RDBO] negative relationships?

2006-03-24 Thread John Siracusa
Ha, Cees is a faster typist I guess... :) -John --- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group

Re: [RDBO] negative relationships?

2006-03-25 Thread John Siracusa
On 3/25/06 10:44 AM, Michael Lackhoff wrote: $subselect = 'NOT EXISTS (SELECT * FROM products p WHERE p.vendor_id = id)'; $vendors = Vendor::Manager-get_vendors(clauses = [ $subselect ]); This doesn't work for me (result list is empty but should have two entries). If I

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

2006-04-05 Thread John Siracusa
On 4/5/06 1:54 AM, Lucian Dragus wrote: Thanks for this new release :) Unfortuantely, the ._* files are present in Rose-DB-Object-0.70, too :( Blah, sorry. Version 0.701 released to CPAN and SF.net. http://sourceforge.net/project/showfiles.php?group_id=147570 -John

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

2006-04-08 Thread John Siracusa
On 4/8/06 9:02 AM, Michael Lackhoff wrote: At last I tried to install the new versions. I get this Test result (with 0.521): C:\Perl\bin\perl.exe -MExtUtils::Command::MM -e test_harness(0, 'bl ib\lib', 'blib\arch') t\basic.t t\locale.t t\parser.t t\pod.t t\basic.ok 4442/5522The

Re: [RDBO] Appending new object in one-to-many relation

2006-04-13 Thread John Siracusa
After digging a little bit, I saw that when updating vendor, it first deletes all products for this vendor and tries to add the new ones. So far, so good. But all the objects retrieved using products() method are in state in_db which means that they will be updated (using SQL UPDATE) instead

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

2006-04-14 Thread John Siracusa
(04.14.2006) - John Siracusa [EMAIL PROTECTED] * Correctly clear the in the database state flag when a speculative load fails because the object was not found. (Reported indirectly by Svilen Ivanov) * Changed how multi-table queries are formulated for SQLite in order to make

Re: [RDBO] Problem with many to many relationship under mod_perl (solved)

2006-05-01 Thread John Siracusa
On 5/1/06 3:06 AM, Michael Lackhoff wrote: So the bottom line is that there was a recent bugfix that is important for many to many relationships. I don't remember that one, but there have been so many updates that I've kind of lost track. Anyway, I'm glad the current version works correctly :)

Re: [RDBO] cached objects

2006-05-01 Thread John Siracusa
On 5/1/06, Guillermo Roditi [EMAIL PROTECTED] wrote: Is there any reason why I wouldn't want to use Rose::DB::Object::Cached for everything instead of just using Rose::DB:: Object as a base for my database table classes? I think the description section from the POD contains some very good

Re: [RDBO] How to negate a many to many relationship?

2006-05-03 Thread John Siracusa
On 5/3/06, Michael Lackhoff [EMAIL PROTECTED] wrote: groups = { type = 'many to many', map_class = 'Groupmappings', }, but how can I negate this, so I get all the groups, the user is not a member of? You're going to have to do a Manager query (wrapped in a method,

Re: [RDBO] Re: Fail on load on record retrieved by Manager

2006-05-03 Thread John Siracusa
On 5/3/06, Guillermo Roditi [EMAIL PROTECTED] wrote: another question though. any reason why there is no 'time' type for columns? Because I haven't gotten around to it yet :) -John --- Using Tomcat but need to do more? Need to support web

  1   2   3   4   5   6   7   >