hibernate query language or using criteria?

前端 未结 2 807
遥遥无期
遥遥无期 2021-01-15 05:27

Any one who tell me the query using criteria/hql/sql. Requirement is that user enter email or username the query return the password of the user from table user.

2条回答
  •  终归单人心
    2021-01-15 06:31

    If all you're doing is fetching one field, you probably just want to go hql (or possibly sql).

    If you do criteria, I believe you're pulling back the entire object, just to eventually use one field.

    Edit: That's a really broad question. Here is a tutorial

提交回复
热议问题