Octavian Rasnita wrote:
> So is it not possible to create the following query with DBIC?
>
> SELECT me.id, blogs.id, blog_comments.id
> FROM user me LEFT JOIN blog blogs ON blogs.user = me.id
> LEFT JOIN blog_comment blog_comments ON blog_comments.blog = blogs.id;
Yes, but if you want to spend you
From: "Carl Johnstone"
Octavian Rasnita wrote:
my $uuu = $schema->resultset('User')->search({},{
prefetch => {blogs => 'blog_comments'},
select => ['me.id'],
as => ['user_id'],
});
print $uuu->first->username;
I know, but I would like to prefetch only just a few columns from the
joined tables
Octavian Rasnita wrote:
> From: "iain"
>
>>
>>> my $uuu = $schema->resultset('User')->search({},{
>>> prefetch => {blogs => 'blog_comments'},
>>> select => ['me.id'],
>>> as => ['user_id'],
>>> });
>>>
>>> print $uuu->first->username;
>>>
>>> I think the single column that should be printed shoul
Octavian Rasnita wrote:
> my $uuu = $schema->resultset('User')->search({},{
> prefetch => {blogs => 'blog_comments'},
> select => ['me.id'],
> as => ['user_id'],
> });
>
> print $uuu->first->username;
>
> I know, but I would like to prefetch only just a few columns from the
> joined tables, not all
From: "iain"
my $uuu = $schema->resultset('User')->search({},{
prefetch => {blogs => 'blog_comments'},
select => ['me.id'],
as => ['user_id'],
});
print $uuu->first->username;
I think the single column that should be printed should be me.id, but
here is the generated SQL:
SELECT me.id, b
my $uuu = $schema->resultset('User')->search({},{
prefetch => {blogs => 'blog_comments'},
select => ['me.id'],
as => ['user_id'],
});
print $uuu->first->username;
I think the single column that should be printed should be me.id, but
here is the generated SQL:
SELECT me.id, blogs.id, blogs.u
From: "Ronald J Kimball"
Thomas L. Shinnick wrote:
I'm having some of the same questions regarding +select and +as . It
seems that using '+select' and '+as' does not stop other columns from
being returned. I'm using DBIC 0.08115.
What do you expect +select and +as to do??
+select
Ind
Thomas L. Shinnick wrote:
I'm having some of the same questions regarding +select and +as . It
seems that using '+select' and '+as' does not stop other columns from
being returned. I'm using DBIC 0.08115.
What do you expect +select and +as to do??
+select
Indicates additional columns t
Trying again to forward to DBIC list, which rejected my previous try
at forwarding with additions...
From: "Octavian Rasnita"
To: "The elegant MVC web framework"
Date: Sun, 17 Jan 2010 15:22:57 +0200
Subject: [Catalyst] Selecting from more tables (DBIC - bug?)
Hi,
Sorry for not writing to t