[Dbix-class] DBIx JOIN issue in New version
Sheeju Alex
sheejuec7 at gmail.com
Thu Feb 13 08:12:22 GMT 2014
Here is the output after using Test::DiagINC and I don't see SQL::Abstract
in the list but I see DBIx::Class version is * 0.08270*
DBIx::Class::Storage::DBI::_dbh_execute(): DBI Exception: DBD::Pg::st
execute failed: ERROR: syntax error at or near "IDENT"
LINE 1: ... JOIN "AlertProfile" "Profile" ON "Profile"."Id" IDENT $1 W...
^ [for
Statement "SELECT "me"."Id", "me"."ProfileId", "me"."Name", "me"."Type",
"me"."Sou
rce", "me"."Destination", "me"."Activated", "me"."AlertStopId",
"me"."EnorDisabledUserId", "me"."CreatedUserId", "me"."CreatedEpoch",
"me"."UpdatedUse
rId", "me"."UpdatedEpoch", "me"."DeletedUserId", "me"."DeletedEpoch" FROM
"AlertContact" "me" JOIN "AlertProfile" "Profile" ON "Profile"."Id" IDENT ?
WHERE ( ( "Name" = ? AND "Profile"."ReferenceId" = ? ) )" with
ParamValues: 1='me.ProfileId', 2='Office Email', 3='71717171711'] at
t/sheeju/10_alert
s.pl line 23
# Listing modules from %INC
# 5.71 AutoLoader
# 1.29 B
# 0.12 B::Hooks::EndOfScope
# 0.12 B::Hooks::EndOfScope::XS
# 1.32 Carp
# 6.04 Carp::Clan
# 1.32 Carp::Heavy
# 0.34 Class::Accessor
# 0.34 Class::Accessor::Fast
# 0.10010 Class::Accessor::Grouped
# 1.001000 Class::C3::Componentised
# 0.04004 Class::Data::Accessor
# 0.08 Class::Data::Inheritable
# 1.28 Class::Inspector
# 0.20 Class::Load
# 0.06 Class::Load::XS
# 2.1005 Class::MOP
# 2.1005 Class::MOP::Attribute
# 2.1005 Class::MOP::Class
*# 2.19.3 DBD::Pg
# 1.627 DBI
# 0.08270 DBIx::Class *
Best Regards,
Sheeju Alex
On Wed, Feb 12, 2014 at 8:00 PM, Peter Rabbitson <rabbit+dbic at rabbit.us>wrote:
> 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
>
>
> _______________________________________________
> 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/dbix-class@lists.scsys.co.uk
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.scsys.co.uk/pipermail/dbix-class/attachments/20140213/a2a5a2bf/attachment.htm>
More information about the DBIx-Class
mailing list