FAQ
if a table has multiple links to the same second table, then some (all
except the first?) of the LinkNames don't appear since they are never
added to the *ReplaceFields list.

here's the fix:

--- /home/gus/Recordset.pm.orig Tue Feb 12 14:47:38 2002
+++ DBIx/Recordset.pm Wed Feb 13 17:11:28 2002
@@ -1867,6 +1867,10 @@
print LOG "[$$] DB: Add to $self->{'*Table'} linked name field $link->{'!Table'}.$_ (i=$i, n=$n, m=$m)\n" if ($debug > 2) ;
$m++ ;
}
+ else
+ {
+ push @{$replace[$i]}, $fields{"$link->{'!Table'}.$_"};
+ }
}
}
else
@@ -1881,6 +1885,10 @@
print LOG "[$$] DB: Add to $self->{'*Table'} linked name field $link->{'!Table'}.$nf (i=$i, n=$n, m=$m)\n" if ($debug > 2) ;
$m++ ;
}
+ else
+ {
+ push @{$replace[$i]}, $fields{"$link->{'!Table'}.$_"};
+ }
}

$numtabs-- if (!exists $tables{$link->{'!Table'}}) ;

--
- Gus

---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org

Search Discussions

  • Angus Lees at Feb 14, 2002 at 3:21 am

    On Wed, Feb 13, 2002 at 05:23:29PM +1100, Angus Lees wrote:
    if a table has multiple links to the same second table, then some (all
    except the first?) of the LinkNames don't appear since they are never
    added to the *ReplaceFields list.

    here's the fix:
    [snipped]

    .. apparently it only appeared to work for my single test case (making all
    duplicate links take on the same value).

    after looking at the code again today i realise it simply isn't possible
    with the existing table join methods, since you only end up with one value
    for each table.column - i want several.

    the only real fix that i can see is to rewrite this whole section of code
    to use unique table aliases for linked-to tables - which i don't feel like
    doing at the moment :( .

    --
    - Gus

    ---------------------------------------------------------------------
    To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
    For additional commands, e-mail: embperl-help@perl.apache.org
  • Gerald Richter at Feb 16, 2002 at 4:01 pm

    the only real fix that i can see is to rewrite this whole section of code
    to use unique table aliases for linked-to tables - which i don't feel like
    doing at the moment :( .
    That's the same reason why I didn't implemented it

    Gerald


    -------------------------------------------------------------
    Gerald Richter ecos electronic communication services gmbh
    Internetconnect * Webserver/-design/-datenbanken * Consulting

    Post: Tulpenstrasse 5 D-55276 Dienheim b. Mainz
    E-Mail: richter@ecos.de Voice: +49 6133 925131
    WWW: http://www.ecos.de Fax: +49 6133 925152
    -------------------------------------------------------------


    ---------------------------------------------------------------------
    To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
    For additional commands, e-mail: embperl-help@perl.apache.org

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupembperl @
categoriesmodperl, perl
postedFeb 13, '02 at 6:23a
activeFeb 16, '02 at 4:01p
posts3
users2
websiteperl.apache.org

2 users in discussion

Angus Lees: 2 posts Gerald Richter: 1 post

People

Translate

site design / logo © 2022 Grokbase