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

Popular posts from this blog

javascript - Karma not able to start PhantomJS on Windows - Error: spawn UNKNOWN -

c# - Display ASPX Popup control in RowDeleteing Event (ASPX Gridview) -

Nuget pack csproj using nuspec -