[Dbix-class] Deletion of related rows in MySQL

2013-04-09 Thread Konstantin A. Pustovalov
Hi list! I have a code which I have narrowed to http://paste.scsys.co.uk/240549 It does $schema-resultset-search_rs-search_related_rs-delete This happened to work with DBIC v 0.08196 but stopped after upgrade to recent version. Generated SQL on v0.08196: SELECT parts.num, parts.type,

Re: [Dbix-class] Deletion of related rows in MySQL

2013-04-09 Thread Peter Rabbitson
On Tue, Apr 09, 2013 at 12:35:04PM +0400, Konstantin A. Pustovalov wrote: Hi list! I have a code which I have narrowed to http://paste.scsys.co.uk/240549 It does $schema-resultset-search_rs-search_related_rs-delete This happened to work with DBIC v 0.08196 but stopped after upgrade to

Re: [Dbix-class] Deletion of related rows in MySQL

2013-04-09 Thread Konstantin A. Pustovalov
09.04.2013 12:51, Peter Rabbitson ?: On Tue, Apr 09, 2013 at 12:35:04PM +0400, Konstantin A. Pustovalov wrote: Hi list! I have a code which I have narrowed to http://paste.scsys.co.uk/240549 It does $schema-resultset-search_rs-search_related_rs-delete This happened to work with DBIC v

Re: [Dbix-class] Deletion of related rows in MySQL

2013-04-09 Thread Peter Rabbitson
On Tue, Apr 09, 2013 at 01:00:56PM +0400, Konstantin A. Pustovalov wrote: 09.04.2013 12:51, Peter Rabbitson ?: On Tue, Apr 09, 2013 at 12:35:04PM +0400, Konstantin A. Pustovalov wrote: Hi list! I have a code which I have narrowed to http://paste.scsys.co.uk/240549 It does

Re: [Dbix-class] Deletion of related rows in MySQL

2013-04-09 Thread Konstantin A. Pustovalov
09.04.2013 13:12, Peter Rabbitson пишет: On Tue, Apr 09, 2013 at 01:00:56PM +0400, Konstantin A. Pustovalov wrote: 09.04.2013 12:51, Peter Rabbitson ?: On Tue, Apr 09, 2013 at 12:35:04PM +0400, Konstantin A. Pustovalov wrote: Hi list! I have a code which I have narrowed to

[Dbix-class] Undetermined deployment statements

2013-04-09 Thread Konstantin A. Pustovalov
I have noticed strange behavior of $schema-deploy (actually my tests started to fail after DBIC upgrade). my $schema = Schema-connect( 'dbi:SQLite:dbmane=:memory:' ); $schema-deploy({ add_drop_table = 1 }); produces DROP TABLE some_table statements while my $schema = Schema-connect(

Re: [Dbix-class] Undetermined deployment statements

2013-04-09 Thread Peter Rabbitson
On Tue, Apr 09, 2013 at 02:19:02PM +0400, Konstantin A. Pustovalov wrote: I have noticed strange behavior of $schema-deploy (actually my tests started to fail after DBIC upgrade). You are on a roll today eh? :) Try this please: diff --git a/lib/DBIx/Class/Storage/DBI.pm

Re: [Dbix-class] Undetermined deployment statements

2013-04-09 Thread Konstantin A. Pustovalov
09.04.2013 14:31, Peter Rabbitson пишет: On Tue, Apr 09, 2013 at 02:19:02PM +0400, Konstantin A. Pustovalov wrote: I have noticed strange behavior of $schema-deploy (actually my tests started to fail after DBIC upgrade). You are on a roll today eh? :) indeed! Try this please: success

Re: [Dbix-class] the apparent complexity of it all

2013-04-09 Thread Jess Robinson
Hey, this is partly a response to this email, and partly to the one from March 24th (trying to catch up!) General thought though, if the issue (as it appeared to be) was that you hadn't seen/found Tutorial and SQLHackers, then wouldn't it be more useful to set about improving these and

Re: [Dbix-class] the apparent complexity of it all

2013-04-09 Thread Jess Robinson
On Thu, 04 Apr 2013 18:13:27 +0100, Brendan Byrd p...@resonatorsoft.org wrote: Sorry, realized that I wasn't on the plain ol' DBIC ML, so I didn't get this initially. Message threading might be odd here... On Thu Apr 4 10:04:06 GMT 2013, Peter Rabbitson wrote: Perhaps we should have a

Re: [Dbix-class] the apparent complexity of it all

2013-04-09 Thread Peter Rabbitson
On Tue, Apr 09, 2013 at 01:20:33PM +0100, Jess Robinson wrote: Not merged. While I like the idea, I am not sure if mentioning DBIC::Row DBIC::Rel::Base (which is about to go away soon... I hope... I really do) is a good idea. Especially given that we have

Re: [Dbix-class] the apparent complexity of it all

2013-04-09 Thread Peter Rabbitson
On Tue, Apr 09, 2013 at 01:20:33PM +0100, Jess Robinson wrote: First we need to figure out how to smack metacpan around the head for not displaying/acknowledging the existance of .pod-only docs.. It may just work with .pm files that only have POD in? Butchering dists to please the

[Dbix-class] select specific columns on resultset

2013-04-09 Thread max
Hi all, I'm new to DBIx, I'm trying to retrieve only a subset of columns from a result set: my @recs=$self-db-resultset($self-table)-search({},{columns = [qw/ id Name OperationId Name /],},)-all; but the result contains all the columns, I also tried with the select attribute with the same

Re: [Dbix-class] select specific columns on resultset

2013-04-09 Thread Peter Rabbitson
On Tue, Apr 09, 2013 at 03:19:07PM +0200, max wrote: Hi all, I'm new to DBIx, I'm trying to retrieve only a subset of columns from a result set: my @recs=$self-db-resultset($self-table)-search({},{columns = [qw/ id Name OperationId Name /],},)-all; The above looks correct but the

Re: [Dbix-class] select specific columns on resultset

2013-04-09 Thread Peter Rabbitson
On Tue, Apr 09, 2013 at 03:19:07PM +0200, max wrote: I'm new to DBIx, It is DBIx::Class (or DBIC for short). There are hundreds of unrelated modules in the DBIx:: namespace. Cheers ___ List:

Re: [Dbix-class] select specific columns on resultset

2013-04-09 Thread max
Thanks for the answer, this piece of code is inside a perl sub, I tried to extract the array elements as: foreach my $row (@recs) { my $id=$row-id; my $name=$row-Name; print MYFILE recs name: $name, id: $id\n\n; } and I can see the Name element for example. I tried to insert the DBIC_TRACE in

Re: [Dbix-class] select specific columns on resultset

2013-04-09 Thread Peter Rabbitson
On Tue, Apr 09, 2013 at 03:58:53PM +0200, max wrote: Thanks for the answer, this piece of code is inside a perl sub, I tried to extract the array elements as: foreach my $row (@recs) { my $id=$row-id; my $name=$row-Name; print MYFILE recs name: $name, id: $id\n\n; } and I can see the

Re: [Dbix-class] Deletion of related rows in MySQL

2013-04-09 Thread Peter Rabbitson
On Tue, Apr 09, 2013 at 12:35:04PM +0400, Konstantin A. Pustovalov wrote: Hi list! I have a code which I have narrowed to http://paste.scsys.co.uk/240549 It does $schema-resultset-search_rs-search_related_rs-delete This happened to work with DBIC v 0.08196 but stopped after upgrade to

Re: [Dbix-class] Undetermined deployment statements

2013-04-09 Thread Peter Rabbitson
On Tue, Apr 09, 2013 at 02:19:02PM +0400, Konstantin A. Pustovalov wrote: I have noticed strange behavior of $schema-deploy (actually my tests started to fail after DBIC upgrade). Fixed by https://github.com/dbsrgits/dbix-class/commit/3e33d1f3285 Will appear on CPAN as part of 0.08250 before