Play Framework 1.2.7 JPAQuerry

0
Hello, I'm a beginner in java, and I'm having a very difficult problem to solve, I'm trying to get the parameter usrName and write to my bank with the following querry, but the account value always gets NULL, could someone help me by kindness Follow the code below.

Accounts conta = Accounts.find("Select a FROM Accounts a where a.usrName=?" , usrName).first();         

            if (conta != null){             
                    conta.usrName = usrName;
                    conta.save();           
                    renderJSON(conta.toString());
            }
            renderJSON(conta);              
    }
    
asked by anonymous 17.04.2018 / 22:15

0 answers