Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re^2: DBI::Class relationship naming

by soonix (Canon)
on Jan 01, 2017 at 19:27 UTC ( [id://1178777]=note: print w/replies, xml ) Need Help??


in reply to Re: DBI::Class relationship naming
in thread DBI::Class relationship naming

Probably a red herring, but "fieldwiths" and "fieldwithout" share a common prefix of length 9, as do "groupnames" and "groupname" (also length 9).

Replies are listed 'Best First'.
Re^3: DBI::Class relationship naming
by Beatnik (Parson) on Jan 01, 2017 at 19:47 UTC
    That would be the easy explanation.. Unfortunately, the production fieldnames are 20+ characters long and the behavior is the same.


    Greetz
    Beatnik
    ... I'm belgian but I don't play one on TV.
      I know that Postgres can handle names of 64 characters, but in the code above you call it a method. I know next to nothing about DBIC, but if it uses XS/C/C++, there could happen some name mangling on the way from field name to method name.

      Does the problem persist, when the names differ already in the first few characters?

        My 2 tables use different field names.. So table1 has a field identitygroupname, pointing to another table, properly mapped with a table relationship. table2 has a field identitygroups, pointing to another table, properly mapped with a table relationship.
        my $foo = $t1->identitygroupname->name; my $bar = $t2->identitygroup->name;
        The belongs_to definition in DBIC::Schema::Result::T1 looks like this:
        __PACKAGE__->belongs_to( "fieldwith", "DBIC::Schema::Result::R1", { id => "fieldwiths" }, { is_deferrable => 0, join_type => "LEFT", on_delete => "NO ACTION", on_update => "NO ACTION", }, );
        I'm not sure if this is a bug in dbicdump or something on purpose. I very much doubt that this is a Postgresql issue.


        Greetz
        Beatnik
        ... I'm belgian but I don't play one on TV.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1178777]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (2)
As of 2024-04-26 00:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found