Hi Binoj, thanks for your reply
Originally posted by Binoj Viswanathan:
hi,
The anz there in path expression itself
"identification_variable.[single_valued_cmr_field.]* single_valued_cmr_field"
so u can use like this in SELECT....
select m.director.name from OBJECT.. so on
binoj v
I am sorry, but I dont see the answer there. My understanding of single_valued_navigation is that it is composed by an identification_variable followed by one or more cmr field navigations. So I think that a single_valued_navigation is a chain in which the first element is an identification_variable and all following elements are cmr fields.
If my reading of this is correct, m.director (considering director a cmr field) is a single_valued_navigation, but I dont see how
m.director.name fits in "identification_variable.[single_valued_cmr_field.]* single_valued_cmr_field"
since name is a cmp field of director.
Of course m.director.name is a single_valued_expression because it is a single_valued_navigation followed by a cmp_field, so your example is indeed correct. What really confuses me is that a single_valued_expression can be either {single_valued_navigation or identification_variable} followed by a cmp_field OR a single_valued_navigation alone. As I stated previously I believe that m.director is a single_valued_navigation and so it is also a single_valued_expression. In this case, it should be ok to include m.director in the SELECT clause of an EJB-QL expression.
If you could point the flaw in my understanding I would be very happy.
Thanks again,
Stefan