Not exactly.

However, we've used the TopLink CMP container for WebLogic 4.5.1.  (Their WLS
5.1 product is in beta right now)  TopLink does support constructing IN()
clauses from input Vectors -- with one important limitation: It doesn't work
with bind variables.  In other words, the desired JDBC SQL should look something
like:

/* ?'s representing bind variables and allowing
   SQL statement reuse at the DB level */
SELECT ...
FROM ...
WHERE columnA in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)

assuming you want SQL statement reuse (and for Oracle at least, you do -- trust
me)
What TopLink can produce is:

/* hard-coded values for the IN() restriction */
SELECT ...
FROM ...
WHERE columnA in (1, 3, 8, 12, 87, 105)

We managed to work around this limitation by using lots of "OR"s.  The resulting
SQL was quite ugly, but much more efficient.

Tom Larson
Capital One Services, Inc.
[EMAIL PROTECTED]

-----Original Message-----
From: Shiv Kumar <[EMAIL PROTECTED]>
Sent: Thursday, May 04, 2000 8:14 PM
To: [EMAIL PROTECTED]
Subject: Does finder support IN clause


Hi all

Does any other Application Server provide such a feature? Read on..

I am using Weblogic 5.1 and struggling to write a finder method for a CMP bean
which can use the SQL 'IN' clause. For example, I want something like this :-

public Enumeration findByAandBs(A a, B[] b) {
  // this finder should translate to
  // select * from t where t.a = a and t.b IN (b[0], b[1], b[2],.... b[n]);
}

The weblogic WLQL operator list does not include the 'IN' operator. Has anyone
else in this list faced the same problem?

Thanks.
--
shiv
[EMAIL PROTECTED]



--
shiv
[EMAIL PROTECTED]



__________________________________________________
Do You Yahoo!?
Talk to your friends online with Yahoo! Messenger.
http://im.yahoo.com

===========================================================================
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".

===========================================================================
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