Hello Jen,

To find out how to be able to specify joins or any SQL in custom finders, read:

http://www.orionserver.com/docs/orion-ejb-jar.xml.html

Search for query and look at the partial attribute.

What you want is already possible, without changing the code of your beans.

Regards,
Karl Avedal

Jen Hsien Huang wrote:

> EJB CMP feature is fantasy. But it's use less because I cant do a simple joint on 
>it, so I wonder the benifit of CMP is just a dream. for example I have two EJB , 
>Company and Product, a Product can use Company as it CMP field , but if I want a 
>finder method search the Product by the Company name, that's impossible.
> So why not define a CMP finder syntax can do a simple joint ? for example
>
> public Collection findByCompanyName(String value) throws RemoteException, 
>FinderException;
> public static final String findByCompanyName_query = "$company.name LIKE $1";
>
> this will generate a SQL call that joint tables of Product and Company. ex
> "SELECT * from Product , Company where Company.id = Product.company and Company.name 
>LIKE ? "
>
> I think this will make CMP more useful.


Reply via email to