Hi,

I need to do a sub query in my criteria thus

// Now get views that have this database as a FK and have records
Criteria crit = new Criteria();
crit.add(RwViewPeer.RW_VIEW_ID, (Object)"RW_VIEW_ID IN (SELECT
DISTINCT(VIEW_ID) FROM RW_RECORD)", ((String)criteria.CUSTOM));
crit.add( RwViewPeer.DATABASE_ID,
KeyConverter.intFromNumberKey(rwDatabase.getRwDatabaseId()));
returnList = RwViewPeer.doSelect(crit);

The extra cast is to try to get stupid JBuilder to stop giving me this
error. It doesn't

"EntityListTool.java": Error #: 304 : reference to add is ambiguous; both
method add(java.lang.String, java.lang.Object, java.lang.String) in class
org.apache.turbine.util.db.Criteria and method add(java.lang.String,
java.lang.String, java.lang.Object) in class
org.apache.turbine.util.db.Criteria match at line 555, column 18

the problem is that I can only compile using 'ant compile' now and thus
cannot trace in JBuiilder to see more detial on  the exception in the method
that has the above code in it. Thus why I produce the code excerpt here, I
cannot see anything wrong with it. If I remove just the line with the
Criteria.CUSTOM it compiles and the doSelect runs just fine.

Ideas?

Another question, having just switched from Oracle to MySQL I had to change
one column from '..size="4000" type="VARCHAR"' for Oracle to
'..type="BINARY"' for MySQL. The former converts to a VARCHAR2(4000( and the
latter to a BLOB. Now when I put the object with this attribute into the
context how do I convert from a BLOB to a string for display?

Thanks

David Wynter

roamware Ltd.
(+44) (0) 208 922 7539 B.
(+44) (0) 7879 605 706 M.
[EMAIL PROTECTED]


--
To unsubscribe, e-mail:   <mailto:turbine-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:turbine-user-help@;jakarta.apache.org>

Reply via email to