Hi,
I am looking for some hints on a problem of hardcoding a relationship to
a multicolumn key in a different table:
My App Package is defined with a PK "appid".
It needs to get some entries from the Maps Package,
wheras the Maps table has a multicolumn key (fixedid and appid).
The appid columns of both tables would match 1:1.
But the "foreign.fixedid" needs to match '14'
(other Schema/Applications use other values of the fixedid in Maps).
How would i hardcode this value of "14" into this relationship ?
---------------------------------
__PACKAGE__->has_many( maps => 'Project::Schema::Maps',
{ 'foreign.fixedid' => 'self.workaroundid',
'foreign.appid' => 'self.appid'}, );
---
workaround: inserted an extra column "workaroundid" with identical data
values ('14') for the whole App table :-(
---------------------------------
replacing the 'self.fixedid' with constants (e.g. 14, '14', "14", ...)
only results in:
"undef error - Invalid rel cond val 14"
Any help appreciated!!!
regards
Heiko
_______________________________________________
List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class
IRC: irc.perl.org#dbix-class
SVN: http://dev.catalyst.perl.org/repos/bast/DBIx-Class/
Searchable Archive: http://www.grokbase.com/group/[email protected]