[Dbix-class] DBIx JOIN issue in New version

Peter Rabbitson rabbit+dbic at rabbit.us
Wed Feb 12 14:30:49 GMT 2014


On Wed, Feb 12, 2014 at 01:25:41PM +0530, Sheeju Alex wrote:
> I have upgraded to SQL::Abstract 1.77 version but still I see this issue
> 
> I have upgraded to DBIx::Class 0.08270 version but still I see this issue
> 
> Here is the relationship between AlertContact table and AlertProfile
> 
> __PACKAGE__->belongs_to(
>     Profile => 'PAMS::WWW::Schema::Result::AlertProfile',
>     {
>         'foreign.Id' => 'self.ProfileId'
>     }
> );
> 
> Here is the search call
> 
>         my $alert_contact = $c->model('PAMSDB::AlertContact')->search(
>             {
>                 'Profile.ReferenceId' => $profile->{ID},
>                 'Name'                => $href->{ContactMethod}
>             },
>             {'join' => 'Profile'}
>         )->first;
> 
> Still this gives below Error

Please install Test::DiagINC and use it somewhere in your script. When 
things blow up it will output a list of loaded modules to STDERR. Double 
and tripple check that SQLA is indeed 1.77. The error below does not 
have another obvious explanation (for now).

> Statement "SELECT * FROM "AlertContact" "me"  JOIN "AlertProfile" "Profile"
> ON "Profile"."Id" IDENT ? WHERE ( ( "Name" = ? AND "Profile"."ReferenceId"
> = ? ) )" with ParamValues: 1='me.ProfileId', 2='Office Email', 3='1']
> 

Cheers




More information about the DBIx-Class mailing list