[Dbix-class] Get a list of parent objects based on child object
properties (possible n00bish question)
Heiko Gruner
Heiko.Gruner at GrunerIT.de
Wed Feb 4 20:19:20 GMT 2009
Hello,
i tried to hardcode values into a table relationship like below.
But i just received just errors like
"undef error - Invalid rel cond val"
I am desparatly looking for a solution ...
Please help ...
...
> Hm. What you would do in manual sql amount to defining a new relation,
> one called 'active_attributes' maybe. That has a compound join
> condition (aid = aid and active = 1)
>
> FROM projects p
> JOIN project_attributes pa ON (pa.pid = p.pid and pa.active = 1)
>
> Which I would *expect* to define as
>
> __PACKAGE__->has_many('active_attributes',
> 'DB::Schema::project_attribute', { 'foreign.pid' => 'self.pid',
> self.active => 1 });
>
...
regards
Heiko
---
(dbix::class / catalyst beginner)
More information about the DBIx-Class
mailing list