Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

HF EJB QL questions.

 
Steven Colley
Ranch Hand
Posts: 290
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Folks, could you please comment these questions for me?

Tks in advance!!!

1 - What designates the query domain? WHERE or FROM clause?

2 - What designates the type of objects to be selected? SELECT or FROM clause?

3 - About WHERE clause : "Identification variable can represent a single value or a collection" - Why isn't this statement correct?

Tks!!!
 
Benoît de Chateauvieux
Ranch Hand
Posts: 183
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Felipe,

1- The WHERE clause reduces the scope of the query and limit the number of items selected. I think we can say that's the query domain but i'm interested too in a confirmation.

2- The FROM clause determines the entity bean types that will be included in the SELECT statement. (it provides the "scope" of the SELECT)

3- It's illegal to navigate cross a collection-based relashionship field.
This makes sense: you can't use a navigation operator (.) in Java to access elements of a Collection.

The Chapter 9 of O'reilly EJB3 books is very good in EJBQL.

Beno�t
 
Steven Colley
Ranch Hand
Posts: 290
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Benoit,

First of all, tks for providing me this information!! ;-)
"The Chapter 9 of O'reilly EJB3 books is very good in EJBQL."

As far my questions/your asnwers....here is what I�ve found later:

1 - The FROM clause designates the query domain. And the "query domain" means "the deploy descriptor - ejb-jar.xml" i mean..all those entity beans which have been declared inside some specific ejb.-jar.xml and that can have a relationship.

2 - What designates the type of objects to be selected? SELECT clause.

3 - I still dind�t understand this question.

Please let me know if it does not make sense!!!

Tks so much!!!
 
Benoît de Chateauvieux
Ranch Hand
Posts: 183
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Felipe,

Thanks for your answer and your corrections...

I think you're right.
I best understand, now, the concept of query domain.
And of course, you're right in the second point !

For the third point, I think I was mistaken.
Can you confirm that the "Identification variable" is the identifier of the entity in the FROM clause: ?

Thanks a lot for your questions and this conversation.
It helps me clarify a lot of things
 
Gowher Naik
Ranch Hand
Posts: 643
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
SELECT OBJECT (m) FROM MovieSchema AS m
In above query
A SELECT clause determines the type of the objects or values to be selected
FROM clause defines Domain and also identification variable.
m is identification variable.
 
Steven Colley
Ranch Hand
Posts: 290
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HI Benoit and Gowher !!!

Ok, that's all so folks!!!

Tks sooo much!!!

Have a good studying!!!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic