-
EJB QL NOT RETURNING AN INNER JOIN (1 messages)
- Posted by: john smith
- Posted on: April 02 2007 11:09 EDT
Hi: I am using weblogic 8.1. I wrote this EJB QL: findProduct com.CategoryLocal SELECT OBJECT(p) FROM Product p, Category c where c = ?1 I have a product table which has a foreign key of "categoryid". I passed it a CategoryLocal object with primary key of 1. I was expecting two records of product to return with categoryId of 1. Instead I receive all the records in the product table as if I am doing a "select * from product". Am I writing the ejb ql incorrectly to get what I want? Any hint would be greatly appreciated!!! Yours, Frustrated.Threaded Messages (1)
- Re: EJB QL NOT RETURNING AN INNER JOIN by James David on April 03 2007 02:20 EDT
-
Re: EJB QL NOT RETURNING AN INNER JOIN[ Go to top ]
- Posted by: James David
- Posted on: April 03 2007 02:20 EDT
- in response to john smith
A normal SQL must be as follows : select * from product p, category c where c=1 and p.categoryid=c.id so, are you missing this p.categoryid=c.id or do you expect ejbql to take care of such join. I have never used ejbql thats y.