wood burning stoves 2.0*
The moose likes EJB and other Java EE Technologies and the fly likes EJB QL Question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "EJB QL Question" Watch "EJB QL Question" New topic
Author

EJB QL Question

Nischal Tanna
Ranch Hand

Joined: Aug 19, 2003
Posts: 182
Hi guys
take an example EJB QL



From the above, Player is an abstract schema as per my knowledge.. My question is why select object(p)?... I mean what does the parenthesis "object(p)" signify?.. can ne1 point out this to me...


Thnx
arunij katiliyar
Greenhorn

Joined: Mar 09, 2005
Posts: 26
I think this is how it goes

when the container looks at this query it first compiles and parses the ejb ql very much like the query execution . so it looks @ player which referes to the abstract schema . gets all the cmp field mappings .Constructs a sql query . Using the datasource definitions provided in the descriptors , connects to the database , executes the query and gets the result set . The container then utilises its OR mapping part to create ejb objects from the result set and thats the reason its object(p) where p is an alias to the schema Player . So the query says to create objects of Player schema only . Similar to the alias used in sql query .

Murugan
 
 
subject: EJB QL Question
 
Similar Threads
Using EJB-QL LIKE and a replacable param(?1).
J2EE Tutorial CMP deployment problem.
EJB-QL
need help in EJB QL with upper and like
EJB Query Error