Another reason you might want to use BMP is when you need to write a custom finder 
method.  There are many known cases where EJB-QL just isn't complete enough yet to 
express the desired query.

For example, suppose you want to find all orders where at least one line item is 
shipped.  That's easy to do in EJB-QL: "select object(o) from order o where 
o.li.shipped = true".  But what if I want to find all orders where ALL line items are 
shipped.  This requires a nested query in SQL.  Since EJB-QL doesn't yet support 
nested queries (as of EJB 2.0), you're stuck.

Now, some app servers do let you describe CMP queries using plain SQL.  For example 
JBoss has this feature.  But it's not portable across app servers (OR mappings never 
are, as each deployment has different database needs) and I don't believe Weblogic 
currently allows you to express CMP queries as SQL.

Doug

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to