Michael,

When you use Criteria.add(), the compiler can get confused if the value you
are searching for is a String (it is both a String and an Object). You can
simply cast it so that it matches the appropriate add() method signature
like this:

        tempCrit.add(User.FIRST_NAME, (Object)searchString, Criteria.LIKE);

Kevin

> -----Original Message-----
> From: Jon Stevens [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, June 12, 2001 4:34 PM
> To: Turbine-user
> Subject: Re: building turbine sources
> 
> 
> on 6/12/01 3:32 PM, "michael young" <[EMAIL PROTECTED]> wrote:
> 
> > I've tried importing the Turbine sources into JBuilder. 
> When I compile, I
> > get a handful of deprecation warnings (I'm sure those are expected).
> 
> Expected...although some of them need to be fixed to use the 
> non-deprecated
> code...
> 
> > I also 
> > get an error on CriteriaTest.java:
> > "CriteriaTest.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 102, column 11
> > 
> > Does anyone have a clue?
> > 
> > Michael
> 
> Weird...things compile just fine for me with Jikes...I wonder 
> what compiler
> you are using...
> 
> -jon
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 

Reply via email to