[Dbix-class] Finding in related rs ('s related rs ('s related ...

2009-05-13 Thread fREW Schmidt
Hello all! This is mostly a reason that DBIC is excellent; consider showing it to people who are die hard SQLers :-) So here is my table structure: User has many Roles (Role belongs to User) Role has many Permissions (Permission belongs to) Permissions has many Screens (Screens has many

[Dbix-class] possible bug in DBIx::Class::Row

2009-05-13 Thread Oleg Pronin
in DBIx::Class::Row::insert if(!$self-{_rel_in_storage}) { #heavy code } #insert code Example: $obj1 = $rs-new({...}); $obj2 = $obj1-new_related('abc', {..}); $obj1-insert; #ok #this cause 'heavy code' to execute because $self-{_rel_in_storage} is undefined although $obj1 has been

Re: [Dbix-class] New user with JOIN problem

2009-05-13 Thread Chris Cole
Matt S Trout wrote: On Tue, May 12, 2009 at 12:10:53PM +0100, Chris Cole wrote: CREATE TABLE `mirbase_hairpin_match` ( `query_id` varchar(255) NOT NULL default '', `miRNA_id` varchar(50) NOT NULL default '', `query_start` smallint(5) unsigned NOT NULL default '0', `match_start`

Re: [Dbix-class] New user with JOIN problem

2009-05-13 Thread Chris Cole
David Ihnen wrote: Chris Cole wrote: Ultimately, the SQL code I want to replicate is: SELECT miRNA_id, sum(abundance) as sum FROM mirbase_hairpin_match, seq_data WHERE query_id = id AND query_id LIKE 'mmuD%' GROUP BY miRNA_id I've tried breaking it down to a simpler SQL for testing:

Re: [Dbix-class] New user with JOIN problem

2009-05-13 Thread Chris Cole
Chris Cole wrote: David Ihnen wrote: Apologies. I used the DBIx::Class::Schema::Loader module to load the schema so I didn't have it explicitly. However, I got it to dump the schema to file. But I'm going to suspect that MirbaseHairpinMatch.pm MUST have a line something like this in it

Re: [Dbix-class] New user with JOIN problem

2009-05-13 Thread Matt S Trout
On Wed, May 13, 2009 at 04:16:33PM +0100, Chris Cole wrote: Chris Cole wrote: David Ihnen wrote: Apologies. I used the DBIx::Class::Schema::Loader module to load the schema so I didn't have it explicitly. However, I got it to dump the schema to file. But I'm going to suspect that

Re: [Dbix-class] possible bug in DBIx::Class::Row

2009-05-13 Thread Matt S Trout
On Wed, May 13, 2009 at 02:18:15PM +0400, Oleg Pronin wrote: in DBIx::Class::Row::insert if(!$self-{_rel_in_storage}) { #heavy code } #insert code Example: $obj1 = $rs-new({...}); $obj2 = $obj1-new_related('abc', {..}); $obj1-insert; #ok #this cause 'heavy code' to

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

2009-05-13 Thread Marc Mims
* Matt S Trout dbix-cl...@trout.me.uk [090513 09:29]: On Tue, May 12, 2009 at 01:51:00PM -0700, Marc Mims wrote: * Matt S Trout dbix-cl...@trout.me.uk [090512 11:34]: On Mon, May 11, 2009 at 12:14:07PM -0700, Marc Mims wrote: * Matt S Trout dbix-cl...@trout.me.uk [090511 10:29]: