views:

64

answers:

3

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 does "select e" part mean?

A: 

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

navinbecse
A: 

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

Reddy
A: 

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.

rgksugan