java - Float in JPQL query -


i have following method:

public book findbookbytitleandversion(string title, float version) {     typedquery<book>query = em.createquery("select b book b b.title = ?1 , b.version = ?2" ,book.class);      query.setparameter(1, title);     query.setparameter(2, version);     return query.getsingleresult(); } 

i'm using mysql , have records should returned. store 'version' float type (1.22 in case). query returns:

javax.persistence.noresultexception: no entity found query

float has here, query title works fine.


Comments

Popular posts from this blog

javascript - Clear button on addentry page doesn't work -

c# - Selenium Authentication Popup preventing driver close or quit -

tensorflow when input_data MNIST_data , zlib.error: Error -3 while decompressing: invalid block type -