mysql - SQL Statement to Spring Data - PersistentEntity must not be null -


i´m doing web-application spring boot backend , angularjs frontend.
database mysql.
try top 5 items out of database. i´m doing through the
@query annotation. tried sql statement directly onto db , expected values.
sql statement:

 select item      work_item        group item       order count(*) desc        limit 3   

@query:

@query(value="select work_item_item work_item group work_item_item order count( *) desc limit 5", nativequery = true)   list< string > find5mostuseditems(); 

when try access related url i´m getting following error:

java.lang.illegalargumentexception: persistententity must not null! 

would glad if push me right direction.
in case need more information, plz ask. (my first question :) )

edit: entity:

@entity public class workitem {      @id     @generatedvalue(strategy = generationtype.auto)     @column(name = "workitem_id")     private long id;     @column(name = "workitem_date")     private localdate date;     @column(name = "workitem_mitarbeiternummer")     private int mitarbeiternummer;     @column(name = "workitem_starttime")     private localtime starttime;     @column(name = "workitem_endtime")     private localtime endtime;     @column(name = "workitem_workduration")     private int workduration;     @column(name = "workitem_item")     private string item;     @column(name = "workitem_itemdescription")     private string itemdescription; 

greetings!

i think should try select workitem_item instead of select work_item_item


Comments

Popular posts from this blog

yii2 - Yii 2 Running a Cron in the basic template -

asp.net - 'System.Web.HttpContext' does not contain a definition for 'GetOwinContext' Mystery -

mercurial graft feature, can it copy? -