开发者

@NamedQuery select parameter meaning

开发者 https://www.devze.com 2022-12-30 10:50 出处:网络
Found some examples of @NamedQuery annotations,e.g.: @NamedQuery(name=\"employeeBySsn\" query=\"select e from Employee e where e.ssn = :ssn\")

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

精彩评论

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