yes it can. There is also an example in the HFEJB where the ejbSelect returns a collection of Director (CMR field) component interface references and the hone business method calls it, gets the collection and calls the getDirectorName() method on each collection, gets all the names and concatenates them and returns a big string to the client
Sathish, please provide the page number of this example in HFEJB. Thanks.
Are you are referring to the example on page396: MoveiBean ? In this example the ejbSelectGetMoviesByDirectorAndGenre() - returns only a collection of cmp fields of movie bean. It does not return a CMR field.
Refer to the corresponding EJB-QL on page 405: SELECT m.title FROM MovieSchema m WHERE m.director.directorId??1 AND m.genre =?2
m.title - is a cmp field in movie bean. [ December 16, 2005: Message edited by: Sankar Subbiramaniam ]
In Summary, are the following queries valid (refer to specs for the relationship between order and Product, Page 221): 1) SELECT l.product FROM Order AS o, IN(o.lineItems) l 2) SELECT l.product.name FROM Order AS o, IN(o.lineItems) l Note: Name is a cmp field of product
According to HFEJB, page 406 (BANG) -- Both queries 1 and 2 are wrong. According to spec 11.2.8, page 232 both are correct.
As of my current stand , query 2 is OK. Query 1 is not correct.
I will try to deploy this code and confirm the answers. If anybody has already done it, please inform. Thanks.