On 17/05/18 22:25, Matt S Trout wrote:
> Surely http://p3rl.org/DBIx::Class::ParameterizedJoinHack is exactly
> what's needed here - just use it on a belongs_to rel with a join_type of
> left so non-matching entries are still returned, then prefetch that rel?
>
> (ironic since I'm replying to the
Hello all,
Is it possible to create a relationship which has, along with the join
condition, an additional constraint where the value could somehow be passed
when the search() method is called?
What I would like to achieve (in sql) is this:
(it's a contrived example, but the structure matches
On 29/01/18 17:31, Andrew Beverley wrote:
> Something like (in Result::Town):
>
> __PACKAGE__->might_have(
> "town_people_mayor",
> "MyApp::Schema::Result::TownPeople",
> sub {
> my $args = shift;
> return {
> "$args->{foreign_alias}.town_id" => { -ident
Hi,
I have a many to many relationship over a joining table, eg.
towns -> town_people -> people
In some cases it is possible for there to be has_one relationships
between the two outer tables. It's a bit of a contrived example but lets
say a person can live in multiple towns but only one is her
On Wed, 2010-07-07 at 10:18 +0100, Chris Cole wrote:
I'm finding when restricting a search on the same column for multiple
criteria only one of them is being applied. e.g.
my $rs = $self-resultset('NgsMappings')-search(
{
'mp_start' = {'=', $start},
'mp_start' = {'',
May 2010, at 17:12, Stuart Dodds wrote:
This is more of a Catalyst/DBIx problem and i've probably got it wrong
and it should be in the DBIx mailing list, but i know most of you guys
here use both, so hopefully someone can help me out.
Yes, this should be on the DBIC mailing list, sorry.
Also
I had the exact same problem today.the only way I could fix it was
to remove the prefetch from the search.
-Original Message-
From: Paul Makepeace pa...@paulm.com
Reply-to: DBIx::Class user and developer list
dbix-class@lists.scsys.co.uk
To: DBIx::Class user and developer list
Is it possible to do a search on a field where it is not equal to a list
of values.
For example, the sql I would like to produce is as follows:
WHERE id NOT IN (?,?,?)
however doing:
-search({
id = { '!=', \...@id_list }
});
doesn't do the right thing as you get:
WHERE id != ? OR id != ?
On Mon, Jul 06, 2009 at 04:26:27PM +0200, Stuart Dodds wrote:
For example, the sql I would like to produce is as follows:
WHERE id NOT IN (?,?,?)
Assuming you use a recent version of SQL::Abstract, see:
http://search.cpan.org/~ribasushi/SQL-Abstract-1.56/lib/SQL/Abstract.pm