Hi bhargavi, The way parameters work is EJB-Ql is as follows. In a query you use ?# as a placeholder for parameters. When the query is evaluated each ?# will be replaced by a parameter from the associated method. The number following the ? determines which parameter will replace it. For example ?2 will be replaced by the second parameter. The number of ?#s can not exceed the number of method parameters but can be less. Let's assume your query SELECT DISTINCT OBJECT(o) FROM Order o,IN(o.lineItems)l WHERE l.product.name=?1
is associated with the finder method public Product findByProductName(String name); ?1 would be replaced by the first parameter which is name.
Hope this helps.
Keith Rosenfield<br />SCJP<br />SCWCD<br />SCBCD
posted 16 years ago
Thanks Keith & Magnus I got it
SCJP2,SCWD,SCBCD,IBM Certified SOA Associate,IBM Certified Architectural Design of SOA Solutions
There are no more "hours", it's centi-days. They say it's better, but this tiny ad says it's stupid:
Devious Experiments for a Truly Passive Greenhouse!