开发者

@NamedQuery select parameter meaning

Found some examples of @NamedQuery annotations,e.g.:

@NamedQuery(name="employeeBySsn" query="select e from Employee e where e.ssn = :ssn")

what does parameter e mean?

the second usage of it seems like alias name of table and what开发者_如何学C does "select e" part mean?


it is same as using "Select * " in the normal sql... here 'e' represents the reference to the class...


It is like select * from table You are saying you need all fields of Employee entity object


e is not the alias name.It is similar to an reference to the table Employee. So that e.ssn means you are accessing the ssn field of the refernce e.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜