You are viewing a plain text version of this content. The canonical link for it is here.
Posted to embperl@perl.apache.org by Kaare Rasmussen <ka...@kakidata.dk> on 2003/04/08 12:46:17 UTC
Recordset: !Links doesn't work
This is taken almost exactly from perldoc DBIx::Recordset:
my $set = DBIx::Recordset -> Search (
{
('!DataSource' => $db,
'!Table' => 'lo_loan',
'!Links' => {
'-payment' => {
'!Table' => 'lo_paymentplan',
'!LinkedField' => 'lo_loan.loan_id',
'!MainField' => 'lo_paymentplan.loan_id'
}
}
)
}
);
but no "-payment" shows up in the resultset. Debug turned on shows that it can
see the !Links parameter, but it doesn't use it in the select statement.
--
Kaare Rasmussen --Linux, spil,-- Tlf: 3816 2582
Kaki Data tshirts, merchandize Fax: 3816 2501
Howitzvej 75 Åben 12.00-18.00 Email: kar@kakidata.dk
2000 Frederiksberg Lørdag 12.00-16.00 Web: www.suse.dk
---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org
Re: Recordset: !Links doesn't work
Posted by Kee Hinckley <na...@somewhere.com>.
At 6:38 PM +0200 4/8/03, Kaare Rasmussen wrote:
> > Did you try it without qualifying the table name? E.g.
>> '!LinkedField' => 'loan_id'?
>
>Sorry. Yes.
Beyond that about all I can say is that this form definitely does
work, if you can switch to it.
$DB->TableLink($USER_T, '-accounts', {
'!Table' => $ACCOUNT_T,
'!LinkedField' => 'user_id',
'!MainField' => 'id',
});
--
Kee Hinckley
http://www.messagefire.com/ Junk-Free Email Filtering
http://commons.somewhere.com/buzz/ Writings on Technology and Society
I'm not sure which upsets me more: that people are so unwilling to accept
responsibility for their own actions, or that they are so eager to regulate
everyone else's.
---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org
Re: Recordset: !Links doesn't work
Posted by Kaare Rasmussen <ka...@kakidata.dk>.
> Did you try it without qualifying the table name? E.g.
> '!LinkedField' => 'loan_id'?
Sorry. Yes.
--
Kaare Rasmussen --Linux, spil,-- Tlf: 3816 2582
Kaki Data tshirts, merchandize Fax: 3816 2501
Howitzvej 75 Åben 12.00-18.00 Email: kar@kakidata.dk
2000 Frederiksberg Lørdag 12.00-16.00 Web: www.suse.dk
---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org
Re: Recordset: !Links doesn't work
Posted by Kee Hinckley <na...@somewhere.com>.
At 12:46 PM +0200 4/8/03, Kaare Rasmussen wrote:
>This is taken almost exactly from perldoc DBIx::Recordset:
>
> my $set = DBIx::Recordset -> Search (
> {
> ('!DataSource' => $db,
> '!Table' => 'lo_loan',
> '!Links' => {
> '-payment' => {
> '!Table' => 'lo_paymentplan',
> '!LinkedField' => 'lo_loan.loan_id',
> '!MainField' => 'lo_paymentplan.loan_id'
> }
> }
> )
> }
> );
>
Did you try it without qualifying the table name? E.g.
'!LinkedField' => 'loan_id'?
--
Kee Hinckley
http://www.messagefire.com/ Junk-Free Email Filtering
http://commons.somewhere.com/buzz/ Writings on Technology and Society
I'm not sure which upsets me more: that people are so unwilling to accept
responsibility for their own actions, or that they are so eager to regulate
everyone else's.
---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org