[Dbix-class] DBIx::Class::Index::Simple

2008-04-01 Thread Peter Rabbitson
an +explicit inherited method call to your version: + +sub sqlt_deploy_hook { +my ($self, $sqlt_table) = @_; + +do your stuff + +$self-next::method ($sqlt_table); #call sqlt_deploy_hook from Index::Simple +} + +=head1 AUTHORS + +Peter Rabbitson, [EMAIL PROTECTED] + +=head1

Re: [Dbix-class] DBIx::Class::Index::Simple

2008-04-02 Thread Peter Rabbitson
Jonathan Rockway wrote: * On Tue, Apr 01 2008, Peter Rabbitson wrote: __PACKAGE__-add_columns( id = { data_type = 'integer', is_auto_increment = 1 }, starts_at = { data_type = 'datetime' }, - created_on = { data_type = 'timestamp' } + created_on = { data_type = 'timestamp', index_as

Re: [Dbix-class] DBIx::Class::Index::Simple

2008-04-02 Thread Peter Rabbitson
Mark Lawrence wrote: On Tue Apr 01, 2008 at 08:35:38PM -0500, Jonathan Rockway wrote: * On Tue, Apr 01 2008, Peter Rabbitson wrote: __PACKAGE__-add_columns( id = { data_type = 'integer', is_auto_increment = 1 }, starts_at = { data_type = 'datetime' }, - created_on = { data_type

Re: [Dbix-class] DBIx::Class::Index::Simple

2008-04-02 Thread Peter Rabbitson
Mark Lawrence wrote: On Wed Apr 02, 2008 at 08:50:02AM +0200, Peter Rabbitson wrote: Mark Lawrence wrote: On Tue Apr 01, 2008 at 08:35:38PM -0500, Jonathan Rockway wrote: * On Tue, Apr 01 2008, Peter Rabbitson wrote: __PACKAGE__-add_columns( id = { data_type = 'integer', is_auto_increment

Re: [Dbix-class] Another bug in the SQLT parser

2008-04-04 Thread Peter Rabbitson
There seems to be an additional problem, which lies in the MySQL producer itself (maybe others too). Keeping it in the thread as it is from the same department. Example (a crude linked list): __PACKAGE__-add_columns ( id = { data_type = 'BIGINT', is_auto_increment = 1,

[Dbix-class] Prefetch multi bug (test included)

2008-04-18 Thread Peter Rabbitson
When specifying a prefetch which first converges to a belongs_to and then fans out to multiple has_many's, the collapse code does not work. Attached is a test against 08 trunk. Index: t/76joins.t === --- t/76joins.t (revision 4274)

Re: [Dbix-class] Path roundup, mark II

2008-04-23 Thread Peter Rabbitson
Matt S Trout wrote: Anything left or do we start cutting 08100 dev releases? (the single accessor doesn't return undef test patch doesn't count unless somebody produces one that doesn't break the rest of the test suite, it's a silly bug but I'm not delaying for it) There was some crazyness

Re: [Dbix-class] Path roundup, mark II

2008-04-25 Thread Peter Rabbitson
Matt S Trout wrote: On Wed, Apr 23, 2008 at 10:20:16PM +0200, Peter Rabbitson wrote: Matt S Trout wrote: Anything left or do we start cutting 08100 dev releases? (the single accessor doesn't return undef test patch doesn't count unless somebody produces one that doesn't break the rest

Re: [Dbix-class] get_column auto-inflate

2008-07-20 Thread Peter Rabbitson
Todd Rinaldo wrote: Hi, Hi, I'd like a get_columns in ResultSetRow that actually inflates columns by default. Is there an easy way to pull this off? http://search.cpan.org/~ash/DBIx-Class-0.08010/lib/DBIx/Class/Row.pm#get_inflated_columns maybe? :)

[Dbix-class] Two patches for 08 trunk

2008-08-21 Thread Peter Rabbitson
Hi, Attached please find two patchsets for review. I understand that a release is literally knocking on the door, so if anything here looks iffy, feel free to defer it until after the release. Any suggestions/criticism welcome. dbic_cascades.diff introduces two new relationship attributes. From

Re: [Dbix-class] multiple has_many rels in prefetch not supported in 0.081?

2008-08-22 Thread Peter Rabbitson
Moritz Onken wrote: Hi, I installed the latest svn revision of DBIx-Class-0.08099_04 and my code fails serval times because I prefetch multiple has_many rels. This was no problem with 0.08010. Why did you change this behaviour? I didn't read anything about this on thsi list. I have to

Re: [Dbix-class] Feature proposal for DBIx::Class::Storage::DBI::connect_info

2008-08-26 Thread Peter Rabbitson
Oleg Kostyuk wrote: Hello all. Pass one hashref to connect_info is more clean and self-documented, so I created patch to allow this. With this patch, for example, we can say in Catalyst-based application config something like this: Model::DB schema_class App::DB connect_info

Re: [Dbix-class] install test failures

2008-10-07 Thread Peter Rabbitson
Dave Howorth wrote: Dave Howorth wrote: Can anybody help me track down my test failures, please? Hopefully it's me being silly but if not, I'd like to make an RT report before release. OK, I've tracked down the problem with t/61findnot.t and raised an RT report for it. The issue is that

Re: [Dbix-class] install test failures

2008-10-07 Thread Peter Rabbitson
Dave Howorth wrote: Peter Rabbitson wrote: Dave Howorth wrote: This doesn't solve my issue with t/81transactions.t. I'll look at that now. About t/81transactions - does this happen on trunk with no midifications? What is your `env | grep DBICTEST` if any? Yes, it happens on trunk

Re: [Dbix-class] install test failures

2008-10-07 Thread Peter Rabbitson
Can you update to the latest trunk, and see if the same stuff comes back? There were many changes to the test suite today. ___ List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class IRC: irc.perl.org#dbix-class SVN:

Re: [Dbix-class] install test failures

2008-10-07 Thread Peter Rabbitson
Dave Howorth wrote: Dave Howorth wrote: The test uses this regex: qr/No such column made_up_column .*? at .*?81transactions.t line \d+/, I'm not clear why it needs to use such a complicated regex instead of just qr/No such column made_up_column/ ? I also don't understand why it doesn't

Re: [Dbix-class] Patch roundup time, again.

2008-10-08 Thread Peter Rabbitson
Matt S Trout wrote: Diffs against sqlite.sql are irrelevant - the only reason it's in svn at all is for the (now vanishingly small) number of people patching DBIC who don't have SQL::Translator. Might actually just have Makefile.PL create it and drop the damn thing from svn entirely -

Re: [Dbix-class] multiple has_many rels in prefetch not supported in 0.081?

2008-10-10 Thread Peter Rabbitson
Moritz Onken wrote: After talking to mst, the exception was degraded to a warn. Patch attached. Why lose the verbosity of the warning? How about: carp ( Prefetching multiple has_many rels ${last} and ${pre} .(length($as_prefix) ? at the same level (${as_prefix}) :

Re: [Dbix-class] t/92storage_on_connect_do.t

2008-10-10 Thread Peter Rabbitson
Dave Howorth wrote: Dave Howorth wrote: And that brings us to the last oddity, which appears to be the cause of my problem, but again my brain is struggling with why the test doesn't fail for everybody? ... So is the test wrong, or the module, or is my brain fried? Can anybody please

Re: [Dbix-class] Unexpected duplicate-key error from find_or_create

2008-10-12 Thread Peter Rabbitson
Lee Goddard wrote: I do not often find myself using DBIx::Class, so please forgive any naivety or silliness in my question, but I would appreciate your help. my $o = $schema-resultset( $field )-find_or_create( value = $val ); The above code has been working well over a variety of

Re: [Dbix-class] multiple has_many rels in prefetch not supported in 0.081?

2008-10-12 Thread Peter Rabbitson
Moritz Onken wrote: After talking to mst, the exception was degraded to a warn. Patch attached. Applied to trunk after augmenting warning text and adjusting necessary tests. ___ List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class

Re: [Dbix-class] Feature proposal for DBIx::Class::Storage::DBI::connect_info

2008-10-14 Thread Peter Rabbitson
Oleg Kostyuk wrote: New patch in attachment. Feel free to correct my bad English in POD. Hope I do all well, and this version will be more acceptable than previous ;) Not acceptable without tests. Please write some, and it will be applied. Cheers Peter

Re: [Dbix-class] Q: Differing column names in DBIC and SQL

2008-10-21 Thread Peter Rabbitson
Bernhard Graf wrote: One common practice to avoid problems with reserved words in column (or table) names is to prefix every name with an underscore. Is there an elegant and working way in DBIC to accomplish this? I already tried __PACKAGE__-add_columns( user = { data_type =

Re: [Dbix-class] Q: Differing column names in DBIC and SQL

2008-10-21 Thread Peter Rabbitson
Bernhard Graf wrote: Peter Rabbitson wrote: Do not mutilate column names, but instead use your tools the way they were intended to be: http://search.cpan.org/~ash/DBIx-Class-0.08010/lib/DBIx/Class/Storage /DBI.pm#quote_char I know these options, but - their values depend

Re: [Dbix-class] bug in delete_all: CascadeActions::delete removes parent before children

2008-10-24 Thread Peter Rabbitson
Noel Burton-Krahn wrote: DBIx's cascading delete_all (in DBIx::Class::ResultSet) it broken, because it deletes the parent table before it deletes the children. The database will throw a referential integrity exception when the parent is deleted before the children.I've attached a test

Re: [Dbix-class] bug in delete_all: CascadeActions::delete removes parent before children

2008-10-27 Thread Peter Rabbitson
Noel Burton-Krahn wrote: On Sun, Oct 26, 2008 at 1:19 AM, Peter Rabbitson [EMAIL PROTECTED] wrote: 1) You call delete_all 2) You traverse the entire relationship chain, and start calling delete on the resulting three backwards, depth first. 3) By the time you get to the main row that you

Re: [Dbix-class] '+select'/'+as' is broken when chaining resultsets

2008-10-27 Thread Peter Rabbitson
BUCHMULLER Norbert wrote: I just suspect that my thread was ignored by accident. Indeed it was. The functionality patch looks good in itself. However I am not sure that the tests changes are appropriate. The test name is 88result_set_column which implies calling methods on a resultset. Yet

Re: [Dbix-class] '+select'/'+as' is broken when chaining resultsets

2008-10-28 Thread Peter Rabbitson
BUCHMULLER Norbert wrote: On Tue, 28 Oct 2008 13:26:52 +0100 BUCHMULLER Norbert [EMAIL PROTECTED] wrote: Sorry, I sent it too early by accident. Regarding 1.: I think that should be OK. These tests go into t/76retrieve.t (new file) Done (see the new patch). like the other tests in

Re: [Dbix-class] '+select'/'+as' is broken when chaining resultsets

2008-10-30 Thread Peter Rabbitson
BUCHMULLER Norbert wrote: On Tue, 28 Oct 2008 14:00:01 +0100 Peter Rabbitson [EMAIL PROTECTED] wrote: You are missing the point - this .t file does _not_ test search attributes. It tests ResultsetColumn functionality. We are discussing the merits of the issues you brought up on IRC. OK

Re: [Dbix-class] Feature proposal for DBIx::Class::Storage::DBI::connect_info

2008-10-30 Thread Peter Rabbitson
Oleg Kostyuk wrote: 2008/10/14 Peter Rabbitson [EMAIL PROTECTED]: Not acceptable without tests. Please write some, and it will be applied. New patch with tests in attachment. Feel free to correct my bad English in POD. Please check revision 5022. Your patch was not applied, but the review

Re: [Dbix-class] SQL::Abstract 1.x subqueries patch

2008-10-31 Thread Peter Rabbitson
BUCHMULLER Norbert wrote: Hi, do you still accept patches for SQL::Abstract 1.x, or should I wait for 2.0 to come out instead? (BTW, what's the proposed time frame for that?) There is a mostly-working-1.x-rc at http://dev.catalyst.perl.org/repos/bast/SQL-Abstract/1.x/branches/1.50_RC.

Re: [Dbix-class] update on DBIC / SQLA1.50 tests

2008-11-06 Thread Peter Rabbitson
Dami Laurent (PJ) wrote: For info : the latest revision of SQLA1.50 (http://dev.catalyst.perl.org/svnweb/bast/browse/SQL-Abstract/1.x/branch es/1.50_RC/) together with the DBIC patch from mendel (http://scsys.co.uk:8001/20236) fixes most problems. Still have to look at failures in

Re: [Dbix-class] update on DBIC / SQLA1.50 tests

2008-11-06 Thread Peter Rabbitson
Dami Laurent (PJ) wrote: Seem to be Win32 problems about files : not ok 5 - old storage does not exist # TODO design change required # Failed (TODO) test 'old storage does not exist' # at t/96file_column.t line 54. ok 8 - new content matches Can't remove file

Re: [Dbix-class] SQLA1.50 tests / t/96file_column.t

2008-11-06 Thread Peter Rabbitson
Dami Laurent (PJ) wrote: -Message d'origine- De : Peter Rabbitson [mailto:[EMAIL PROTECTED] Envoyé : jeudi, 6. novembre 2008 10:50 À : Class user and developer list Objet : Re: [Dbix-class] update on DBIC / SQLA1.50 tests Dami Laurent (PJ) wrote: Seem to be Win32 problems

Re: [Dbix-class] Class::Accessor::Grouped - how to use it?

2008-11-10 Thread Peter Rabbitson
q wrote: Hi, it's probably an awful question, but I could not figure out the rationale behind the module Class::Accessor::Grouped. The concept of accessors I know of, but I do not understand what this group thing is all about. Does anybody know where I can find more information regarding

Re: [Dbix-class] tinyint and enum mapping

2008-11-20 Thread Peter Rabbitson
jackal wrote: I'll think about it. It may be better to create a new module, which adds this functionality for (Inflate|Modify)Column... Please by all means share your design decisions with us before writing such a module. It would be a shame to not be able to merge this functionality

Re: [Dbix-class] convention for naming primary keys to avoid ambiguousselects

2008-11-25 Thread Peter Rabbitson
David Schmidt wrote: On Tue, Nov 25, 2008 at 5:31 PM, Octavian Rasnita [EMAIL PROTECTED] wrote: From: David Schmidt [EMAIL PROTECTED] Hello List, I used to have an id INTEGER PRIMARY KEY column in every table. Now I am using DBIC and repeatedly run into this kind of error. SELECT me.id,

Re: [Dbix-class] convention for naming primary keys to avoidambiguousselects

2008-11-25 Thread Peter Rabbitson
Octavian Rasnita wrote: From: Noel Burton-Krahn [EMAIL PROTECTED] This is a reasonable query: load a person with address by the person's id. The 'id' column is unambiguous in the search call. However, DBIx generates ambiguous SQL: DBIx::Class::ResultSet::count(): DBI Exception:

Re: [Dbix-class] Re: Join behavior in prefetch vs join

2009-01-16 Thread Peter Rabbitson
Nilson Santos Figueiredo Junior wrote: On Fri, Jan 9, 2009 at 3:09 PM, Nilson Santos Figueiredo Junior aci...@gmail.com wrote: So - is prefetch really expected to work like that? I can explain better if this message isn't clear enough and a test case if it seems to be a bug. Just an

Re: [Dbix-class] Cross product joins

2009-01-16 Thread Peter Rabbitson
Gavin Carr wrote: On Sun, Jan 11, 2009 at 09:47:17PM +1100, Gavin Carr wrote: generates a hanging ON clause: ERROR: syntax error at or near WHERE at character 239 [for Statement SELECT [...] FROM store s JOIN postcode p ON WHERE ( p.postcode = ? ) with ParamValues: 1='12345']

Re: [Dbix-class] -deply doesn't honour qoute_char

2009-01-16 Thread Peter Rabbitson
on...@houseofdesign.de wrote: Hi, I noticed that $schema-deploy doesn't seem to use the value of quote_char to quote the output. The create table commands are not quoted (neither the table name nor the columns). After deploying, all selects use quoting correctly. I am using SQLite.

Re: [Dbix-class] -deply doesn't honour qoute_char

2009-01-16 Thread Peter Rabbitson
on...@houseofdesign.de wrote: On Fri, 16 Jan 2009 10:52:05 +0100, Peter Rabbitson rabbit+l...@rabbit.us wrote: on...@houseofdesign.de wrote: Hi, I noticed that $schema-deploy doesn't seem to use the value of quote_char to quote the output. The create table commands are not quoted (neither

Re: [Dbix-class] -deply doesn't honour qoute_char

2009-01-16 Thread Peter Rabbitson
on...@houseofdesign.de wrote: On Fri, 16 Jan 2009 11:53:42 +0100, Peter Rabbitson rabbit+l...@rabbit.us wrote: on...@houseofdesign.de wrote: On Fri, 16 Jan 2009 10:52:05 +0100, Peter Rabbitson rabbit+l...@rabbit.us wrote: on...@houseofdesign.de wrote: I am using SQLite. Hmmm... I use

Re: [Dbix-class] -deply doesn't honour qoute_char

2009-01-16 Thread Peter Rabbitson
on...@houseofdesign.de wrote: Patches to lib/SQL/Translator/Producer/SQLite.pm welcome :P Again, as file, previous mail had some additional line breaks Patch seems reasonable. Please provide a diff including tests against current trunk[1]. Fix the currently failing tests in

Re: [Dbix-class] Bug in DBIx::Class::ResultSource::remove_columns ?

2009-01-16 Thread Peter Rabbitson
Oleg Pronin wrote: Maybe i misunderstood something but i suppose there is a bug in remove_columns. DB14 x $this-columns 0 'id' ... 16 'logo_small'

Re: [Dbix-class] test failure in /81transactions.t

2009-01-20 Thread Peter Rabbitson
Brad Bowman wrote: Hello, I'm trying to upgrade to perl 5.10 on windows xp in order to fix up the DBIC speed issues with the perl 5.8.8 that was installed there. DBIx::Class failed a test during the install. cpan install DBIx::Class t/81transactions...1/67

Re: [Dbix-class] Problem with column more than 80 chars long with MSSQL

2009-01-20 Thread Peter Rabbitson
Chris Burch wrote: Hello, I've just started using Catalyst, and therefore DBIx::Class, and I am running into a problem I hope someone can help me with. I am connecting from an Ubuntu server (specs below) via unixODBC to a MSSQL 2000 database. Everything works fine until my comment field

Re: [Dbix-class] Bug in DBIx::Class::ResultSource::remove_columns ?

2009-01-20 Thread Peter Rabbitson
Oleg Pronin wrote: unixdiff for DBIx-Class-0.08099_05 attached 2009/1/16 Ash Berlin ash_c...@firemirror.com mailto:ash_c...@firemirror.com On 16 Jan 2009, at 16:35, Oleg Pronin wrote: The patch does not change the functionality of 'remove_columns', just bugfix, so

Re: [Dbix-class] Class::C3::Componentised bug (was deployment bug with DBIC running from PAR)

2009-01-28 Thread Peter Rabbitson
Toby Corkindale wrote: I need to stop replying to myself :( I'd say the problem lies this block of code: # Look through the @INC path to find the file foreach ( @try_first, @INC ) { my $full = $_/$filename; next unless -e $full; return $UNIX ? $full :

Re: [Dbix-class] Development version and DB2

2009-01-28 Thread Peter Rabbitson
Andreas Mock wrote: Hi all, I'm new to DBIx::Class and took the current development version as I saw that there a some topics fixed since the last stable build. I ran the test scripts against a DB2 V9.1. While all tests seem fine (if DB2 tests are skipped) I get an error when I want to

Re: [Dbix-class] how to determine column is inflatable?

2009-01-30 Thread Peter Rabbitson
Carl Franks wrote: 2009/1/29 Ash Berlin ash_c...@firemirror.com: On 29 Jan 2009, at 22:03, Carl Franks wrote: Is it okay to use $result_source-column_info('name')-{_inflate_info} to test whether a column is inflatable / deflatable? It seems a bit too reliant on internals, to me. Or should

Re: [Dbix-class] -deply doesn't honour qoute_char

2009-02-02 Thread Peter Rabbitson
Moritz Onken wrote: Am 17.01.2009 um 06:35 schrieb Ashley: http://www.mail-archive.com/dbix-class@lists.scsys.co.uk/msg02450.html What am I, chopped Warnock? :( Producer::PG and Produver::SQLite have very much in common. Du you think it make sense to subclass from Postgres and

Re: [Dbix-class] Finding by primary key and might_have

2009-02-02 Thread Peter Rabbitson
Zbigniew Lukasiak wrote: One more thing - this test fails: ok( $schema-resultset('CD')-find( { cdid = 1, liner_notes = { 'notes' = 'test note changed' }, }, { key = 'primary' } ), 'CD found' ); The

Re: [Dbix-class] Last stable version of DBIx::Class and DB2 V9.1

2009-02-03 Thread Peter Rabbitson
Andreas Mock wrote: Hi Peter, -Ursprüngliche Nachricht- Von: Peter Rabbitson rabbit+d...@rabbit.us Gesendet: 02.02.09 21:41:21 An: DBIx::Class user and developer list dbix-class@lists.scsys.co.uk Betreff: Re: [Dbix-class] Last stable version of DBIx::Class and DB2 V9.1 Sorry

Re: [Dbix-class] CDBICompat NumExplodingSheep

2009-02-03 Thread Peter Rabbitson
in the loop. == Peter Rabbitson wrote: Haven't seen you on IRC for a while, figured I'll try here. We got a bugreport[1] against the compat layer some time ago. I applied his indeed failing tests[2], and TODOified[3] them. If you can

Re: [Dbix-class] Class::C3::Componentised bug (was deployment bug with DBIC running from PAR)

2009-02-04 Thread Peter Rabbitson
Toby Corkindale wrote: Peter Rabbitson wrote: Toby Corkindale wrote: I need to stop replying to myself :( I'd say the problem lies this block of code: # Look through the @INC path to find the file foreach ( @try_first, @INC ) { my $full = $_/$filename; next unless -e

Re: [Dbix-class] Class::C3::Componentised bug (was deployment bug with DBIC running from PAR)

2009-02-04 Thread Peter Rabbitson
Toby Corkindale wrote: Peter Rabbitson wrote: Toby Corkindale wrote: Peter Rabbitson wrote: Toby Corkindale wrote: I need to stop replying to myself :( I'd say the problem lies this block of code: # Look through the @INC path to find the file foreach ( @try_first, @INC ) { my

Re: [Dbix-class] no warnings 'DBIx::Class::Relationship::ManyToMany'; breaks on overridden many_to_many

2009-02-04 Thread Peter Rabbitson
Guillermo Roditi wrote: This doesn't work with IntrospectableM2M. If you are using both of them you'll get the following error: DBIx::Class::Schema::throw_exception(): Unknown warnings category 'DBIx::Class::Relationship::ManyToMany' This is true for any component that overrides

[Dbix-class] Call for testers

2009-02-09 Thread Peter Rabbitson
Greetings, In order to resolve a cpan dependency deadlock, we prepared a forward-compatible version of DBIC 0.08011. Keep in mind that this is _not_ the long awaited 0.08100 release, so do not expect any new features. In fact it strives to be bug-for-bug compatible with 0.08010, so we can

Re: [Dbix-class] Call for testers

2009-02-09 Thread Peter Rabbitson
Will Hawes wrote: 2009/2/9 Peter Rabbitson rabbit+d...@rabbit.us: Greetings, Please download, test and report back at your convenience: http://rabbit.us/diff/DBIx-Class-0.08011.tar.gz D:\Setup\DBIx-Class-0.08011prove t snip D:\Setup\DBIx-Class-0.08011prove -v t\81transactions.t t

[Dbix-class] 81transactions.t fixed

2009-02-09 Thread Peter Rabbitson
Will Hawes wrote: t/81transactions.t 255 6528063 18 55-63 (1 subtest UNEXPECTEDLY SUCCEEDED), 37 tests and 4 subtests skipped. Failed 1/107 test scripts. 9/2071 subtests failed. Files=107, Tests=2071, 76 wallclock secs ( 0.00 cusr + 0.00 csys = 0.00 CPU) Failed 1/107 test programs.

Re: [Dbix-class] Searching - two criteria for the same field

2009-02-10 Thread Peter Rabbitson
Gerg Coates wrote: I need to do a search on a resultset that is filtered by two values on the same field. I tried code like this, but it doesn't seem to be working: my $t = $schema-resultset('Table')-search( { 'glr_date' = { '=', $beg_date }, 'glr_date' = { '', $end_date } }

Re: [Dbix-class] DBIC test fails on solaris

2009-02-10 Thread Peter Rabbitson
Dermot wrote: Hi, I am getting the following test errors when I try to install on OpenSolaris t/32connect_code_ref...DBI::db=HASH(0x88d5a80)-disconnect invalidates 22 active statement handles (either destroy statement handles or call finish on them before

Re: [Dbix-class] SQL::Abstract 1.50

2009-02-13 Thread Peter Rabbitson
Zbigniew Lukasiak wrote: Hi, The 0.08011 release of DBIC, introduced for compatibility with the new SQL::Abstract, is now on CPAN. What is now holding the SQL::Abstract release? The first release candidate is already on CPAN. http://search.cpan.org/~mstrout/SQL-Abstract-1.49_01/ Get it

Re: [Dbix-class] Is there a way setup a DBIC schema, result and resultset classes in one file?

2009-02-25 Thread Peter Rabbitson
Zbigniew Lukasiak wrote: Hi there, There is a question at PerlMonks about that: http://perlmonks.org/?node_id=746160 and I have to add that this is something I've been frequently pondering myself when sending DBIC examples. I don't see what the problem is. His error comes most likely

[Dbix-class] Announcing 0.08099_07 (0.08100_RC1)

2009-02-27 Thread Peter Rabbitson
Ladies and Gentlemen, The DBIx::Class team is pleased to announce the availability of our first RC. The 08100 release cycle took much longer than anticipated, but it was definitely worth it. All known regressions have been eliminated and a feature freeze is in effect (baring some regressions

Re: [Dbix-class] DBIx::Class::ResultSet::next(): No such relationship ....

2009-02-27 Thread Peter Rabbitson
ivan wrote: error: DBIx::Class::ResultSet::next(): No such relationship pr_areas Code: - my $area_model = $c - model(VertelkaFirmArea); my $areas = $area_model - search ( { 'firm_id'

Re: [Dbix-class] Avoiding foreign key constraint on a relationship

2009-03-01 Thread Peter Rabbitson
W Snyder wrote: One of my DBIx::Class table classes has: __PACKAGE__-table(adjacents); __PACKAGE__-add_columns( child_id = { ... }, parent_id = { ... }, ); __PACKAGE__-set_primary_key(child_id); __PACKAGE__-base_has_one(parent_string = 'X::Schema::String',

Re: [Dbix-class] Set a resultset_class for a result_class from within a component loaded by the result_class

2009-03-05 Thread Peter Rabbitson
David Ihnen wrote: For these purposes I found this sneaky little ResultSetManager extension. You put ResultSetManager in your load_components and you put your custom plugin for resultset into a load_resultset_components call. An example from one of my classes. Isn't ResultSetManager

Re: [Dbix-class] Set a resultset_class for a result_class from within a component loaded by the result_class

2009-03-05 Thread Peter Rabbitson
kevin montuori wrote: PR == Peter Rabbitson rabbit+d...@rabbit.us writes: You put ResultSetManager in your load_components and you put your custom plugin for resultset into a load_resultset_components call. An example from one of my classes. PR Isn't ResultSetManager deprecated

Re: [Dbix-class] Set a resultset_class for a result_class from within a component loaded by the result_class

2009-03-05 Thread Peter Rabbitson
kevin montuori wrote: PR == Peter Rabbitson rabbit+d...@rabbit.us writes: You put ResultSetManager in your load_components and you put your custom plugin for resultset into a load_resultset_components call. An example from one of my classes. PR Isn't ResultSetManager deprecated

Re: [Dbix-class] InflateColumn::DateTime, inheritance, and insert/delete problems

2009-03-11 Thread Peter Rabbitson
Steve Caldwell wrote: Consider the following script: #!/usr/bin/perl use strict; use warnings; # mysql # create database foo; # create table foo.tblfoo ( # fooid integer not null auto_increment, # mydate datetime, # primary key (fooid) # ); # grant all

Re: [Dbix-class] Patch submission: Relationship Accessor for null pattern compatibility

2009-03-11 Thread Peter Rabbitson
David Ihnen wrote: When working with the null pattern classes from Mr. Rabbitson, I discovered this slight ommission that results in getting an undefined, when you're actually wanting a null. That is, even when something is not true, I still want it! It should be entirely backwards

Re: [Dbix-class] Incorrect SQL being generated after DBIC library upgrade

2009-03-19 Thread Peter Rabbitson
demerphq wrote: 2009/3/19 Peter Rabbitson rabbit+d...@rabbit.us: [...] Reading your example again I noticed you are actually getting what you asked for. Consider (if we assume -and in a hashref is OK) FWIW I agree with the OP. And the docs state that -and in a hashref is legal as far

Re: [Dbix-class] Incorrect SQL being generated after DBIC library upgrade

2009-03-20 Thread Peter Rabbitson
demerphq wrote: 2009/3/20 Dami Laurent (PJ) laurent.d...@justice.ge.ch: Hi all, I am responsible for those changes in -and/-or behaviour between 1.24 and 1.50. The point is: it was impossible to keep 1.24 behaviour on every detail, because 1.24 had several internal inconsistencies, and

Re: [Dbix-class] Incorrect SQL being generated after DBIC library upgrade

2009-03-20 Thread Peter Rabbitson
demerphq wrote: 2009/3/19 Peter Rabbitson rabbit+d...@rabbit.us: demerphq wrote: 2009/3/19 Peter Rabbitson rabbit+d...@rabbit.us: [...] Reading your example again I noticed you are actually getting what you asked for. Consider (if we assume -and in a hashref is OK) FWIW I agree

[Dbix-class] ANNOUNCE: 0.08099_08 (0.08100_RC2)

2009-03-29 Thread Peter Rabbitson
Greetings, The DBIx::Class team is pleased to announce the availability of our second RC. Not much has changed since RC1, but all the dependencies are now obtainable from CPAN. Just like the last RC this release is deemed safe for moderate use, and many members of the dev team already use it in

Re: [Dbix-class] ANNOUNCE: 0.08099_08 (0.08100_RC2)

2009-04-04 Thread Peter Rabbitson
On Sat, Apr 04, 2009 at 03:55:45PM +0200, Andreas Mock wrote: -Urspr?ngliche Nachricht- Von: Peter Rabbitson rabbit+d...@rabbit.us Gesendet: 30.03.09 01:50:32 An: DBIx::Class user and developer list dbix-class@lists.scsys.co.uk Betreff: [Dbix-class] ANNOUNCE: 0.08099_08

Re: [Dbix-class] ANNOUNCE: 0.08099_08 (0.08100_RC2)

2009-04-05 Thread Peter Rabbitson
On Sun, Apr 05, 2009 at 11:55:56AM +0200, Andreas Mock wrote: -Urspr?ngliche Nachricht- Von: Peter Rabbitson rabbit+d...@rabbit.us Gesendet: 05.04.09 02:52:53 An: DBIx::Class user and developer list dbix-class@lists.scsys.co.uk Betreff: Re: [Dbix-class] ANNOUNCE: 0.08099_08

Re: [Dbix-class] Removing quote chars from HAVING terms?

2009-04-15 Thread Peter Rabbitson
Ben Vinnerd wrote: Ben Vinnerd wrote: Have you tried... having = \count(me.[sectionid]) = $section_ct, You would also have to make sure $section_ct is properly quoted of course :) No you wouldn't. Instead you would do: having = \count(me.[sectionid]) = ?, bind = [ $section_ct ], Now

Re: [Dbix-class] Insert or Update (was ANNOUNCE: 0.08099_08)

2009-04-15 Thread Peter Rabbitson
Tim Bunce wrote: On Mon, Apr 13, 2009 at 11:20:41AM +0100, Peter Corlett wrote: On 13 Apr 2009, at 09:35, Tim Bunce wrote: [...] If you use SELECT FOR UPDATE then savepoints aren't required for a safe implementation, right? No. Critically though, if the SELECT does not return any rows,

Re: [Dbix-class] ANNOUNCE: 0.08099_08 (0.08100_RC2)

2009-04-15 Thread Peter Rabbitson
BUCHMULLER Norbert wrote: On Sun, 5 Apr 2009 08:00:19 -0400 Peter Rabbitson wrote: Currently SQLA::Test does not suppress its diag() output even when within a TODO block, thus you are seeing the mismatch, but it is not counted towards failed tests. Patches to _sql_differ_diag

Re: [Dbix-class] Resultset accessors for lazy people, and compile-time checking.

2009-04-15 Thread Peter Rabbitson
Toby Corkindale wrote: Hi, Another task I commonly do in DBIC is to access resultsets from the $schema object, eg: $schema-resultset('MyObject')-find(1); Sometimes I make a mistake, and write: $schema-resultset('MyObjcet')-find(1); However that compiles just fine, and won't get picked

Re: [Dbix-class] Removing quote chars from HAVING terms?

2009-04-15 Thread Peter Rabbitson
Chris Burch wrote: Peter Rabbitson rabbit+d...@rabbit.us 4/15/2009 3:37 AM Ben Vinnerd wrote: Ben Vinnerd wrote: Have you tried... having = \count(me.[sectionid]) = $section_ct, You would also have to make sure $section_ct is properly quoted of course :) No you wouldn't. Instead you

Re: [Dbix-class] DBIx::Class 0.08100 released to CPAN

2009-04-22 Thread Peter Rabbitson
David Ihnen wrote: Matt S Trout wrote: On Tue, Apr 21, 2009 at 10:59:48AM -0700, David Ihnen wrote: Which is why: -create_related('ivr_holiday', { holiday = date, description = $description }); is called. but does not create an error on groups when

Re: [Dbix-class] Can I get help composing a query?

2009-04-24 Thread Peter Rabbitson
Dennis Daupert wrote: I am not terribly good at sql, or I'd show what I'm trying to do that way. I have these three tables: docs, files, doc_files. docs has titles and summaries; files has file system paths, filenames. Users upload multiple edited copies of files, so there are multiple,

Re: [Dbix-class] ResultSet columns attribute broken?

2009-04-29 Thread Peter Rabbitson
Bernhard Graf wrote: can you try svn trunk? (http://dev.catalyst.perl.org/repos/bast/DBIx-Class/0.08/trunk/) same thing. I think Justin nailed it last night. Please try current trunk. Thanks ___ List:

Re: [Dbix-class] ResultSet columns attribute broken?

2009-04-29 Thread Peter Rabbitson
Bernhard Graf wrote: Note: This Email was send by Peter as PM, but I suppose this happend by accident, therefore I post my answer to the list. No, my testing yesterday was already with the nailed revision (6002). last night is a variable notion :) Please test r6015 or later. 6017: Well,

Re: [Dbix-class] ResultSet columns attribute broken?

2009-04-30 Thread Peter Rabbitson
Bernhard Graf wrote: Peter Rabbitson wrote: Yes because you are looking at TODO tests, don't worry about those. I was actually asking if your live development code works, not the test suite. Once we confirm that we have fixed your problem we will release another DBIC version. Ah, ok

Re: [Dbix-class] dirty-flag on inflated columns

2009-05-05 Thread Peter Rabbitson
Morgon Hed wrote: You're going to need 08100+ for that method. Thanks. Any idea about when this will be become available on CPAN ? About 3 weeks ago? ___ List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class IRC:

Re: [Dbix-class] register_source() regression in 0.08102

2009-05-08 Thread Peter Rabbitson
Ian Wells wrote: 2009/5/7 Ronald J Kimball rkimball+dbixcl...@pangeamedia.com: What is the correct way to implement this with 0.08102? I'm skeptical about register_extra_source(), because I'm not registering an additional source for UserSession; I'm registering a new source for

Re: [Dbix-class] dirty-flag on inflated columns

2009-05-11 Thread Peter Rabbitson
Matt S Trout wrote: On Tue, May 05, 2009 at 08:37:37AM -0700, Morgon Hed wrote: Ok - I've updated to 0.08102 and now I have a make_column_dirty but it does not seem to work. Here is what I do for trying it out: I have a class SMU::Wrapper that simply wraps some xml, it has an accessor

Re: [Dbix-class] Getting a' count' value

2009-05-14 Thread Peter Rabbitson
Emmanuel Quevillon wrote: Hi, Sorry if my question looks stupid, but I'd like to retrieve the value of a count returned by an SQL query. I tried different things but it always return 1 Here is the way I'd like it to work: ... acc = $g-name(), num = $c-model('Table')-search({'id' =

Re: [Dbix-class] Problem with populate() and commits?

2009-05-15 Thread Peter Rabbitson
Chris Cole wrote: Hi, Given this schema: package DB::Schema::Species; use strict; use warnings; use base 'DBIx::Class'; __PACKAGE__-load_components(Core); __PACKAGE__-table(species); __PACKAGE__-add_columns( species_id, { data_type = SMALLINT, default_value =

Re: [Dbix-class] Problem with populate() and commits?

2009-05-18 Thread Peter Rabbitson
Chris Cole wrote: Peter Rabbitson wrote: Chris Cole wrote: Hi, Given this schema: [snip] and this code: my $schema = DB::Schema-connect(stuff); my $species = $schema-resultset(Species); $species-populate([ { short_name = $shortName, full_name = $longName, common_name

Re: [Dbix-class] Problem with populate() and commits?

2009-05-18 Thread Peter Rabbitson
Chris Cole wrote: Peter Rabbitson wrote: Chris Cole wrote: To clarify. With autocommit 'off', this code: my $species = $schema-resultset(Species); $species-populate([ { short_name = $shortName, full_name = $longName, common_name = $commonName } ]); $species-update

Re: [Dbix-class] Problem with populate() and commits?

2009-05-18 Thread Peter Rabbitson
Chris Cole wrote: Peter Rabbitson wrote: Chris Cole wrote: my $new_album = $schema-resultset('Album')-create({ title = 'Wish You Were Here', artist = 'Pink Floyd' }); Now you can add data to the new record: $new_album-label('Capitol'); $new_album-year('1975

Re: [Dbix-class] 0.08103 - call for testers!

2009-05-20 Thread Peter Rabbitson
Jose Luis Martinez wrote: DBIx::Class::ResultSet::count(): DBI Exception: DBD::mysql::st execute failed: Duplicate column name 'subscriber_id' [for Statement SELECT COUNT( * ) FROM (SELECT me.subscriber_id, subscribers_data.subscriber_id, subscribers_data.c001 FROM subscribers me JOIN

Re: [Dbix-class] 0.08103 - subtle testing fail

2009-05-20 Thread Peter Rabbitson
David Ihnen wrote: fREW Schmidt wrote: On Mon, May 18, 2009 at 5:16 PM, Peter Rabbitson rabbit+d...@rabbit.us mailto:rabbit%2bd...@rabbit.us wrote: Greetings, The next release of DBIC will have a number of exciting improvements, among them proper -count -update and -delete

[Dbix-class] [ANNOUNCE] 0.08103 RC2 - call for testers!

2009-05-20 Thread Peter Rabbitson
Greetings, Here is the next iteration of the pre-103 release, with a number of bugfixes and sanifications. Get it while it's hot at[1] and report any trouble. Thanks! [1] http://rabbit.us/diff/DBIx-Class-0.08102_06.tar.gz ___ List:

  1   2   3   4   5   6   7   8   >