java - Can some one tell me whats wrong with my JPQL query throwing me The basic mapping 's.surname' cannot be used in conjunction with the = operator error -
i trying compare name typed text box , name inside table keep getting error exception in thread "awt-eventqueue-0" java.lang.illegalargumentexception: exception occurred while creating query in entitymanager: exception description: problem compiling [select s salesmen s s.name = linus order s.name asc]. [31, 37] basic mapping 's.name' cannot used in conjunction = operator.
my query is
select s salesmen s s.name = linus order s.name asc
your query should select s salesmen s s.name = 'linus' order s.name asc
. linus
must quoted, since varchar
. add query building strategy (assuming v2
linus
):
... v1 + " '" + v2 + "' " + ob ...
Comments
Post a Comment