How do I select from a table by another unique column other than id
im looking a replacement for
String fbid=<some facebookId>
User user = User.findBy("facebookId",fbid).first();
I’m using Java + Ebean and not scala!
thanks
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Of course you can create a ‘shortcut’ by adding a method into your
Usermodel:and using it in controller:
It’s pretty good solution as you can keep your controllers’ code clean and use custom
findersas sophisticated as required at the case.