In my production, OJB always converts bean properties to table columns (an old bug 
don't conver when had spaces inside parenthesis, but it's already fixed since rc4 - 
AFAIK).

Best regards,

Edson Richter


  ----- Original Message ----- 
  From: Stefan Schl�sser 
  To: OJB Users List 
  Sent: Thursday, February 19, 2004 11:49 AM
  Subject: Re: Antwort: How to do a not casesensitive string equal Criteria ?


  Hi,

  crit.addLike( "UPPER( "+<fieldname>+")", ((String) Value).toUpperCase() );

  does the trick.

  But does OJB really do a fieldname conversion i.e. converting the
  fieldname to a colname by the repository ? Or does it take the name as 
  is? (I don't know since both are equal in my case but I do not know 
  whether this will be true in future as well.

  Thanks,
     Stefan


  Edson Carlos Ericksson Richter wrote:

  > Yes, it can be done. Just remember that some databases has problems to use indexes 
when you apply functions over the fields (SapDB 7.2 had this problem... I've not been 
using this since then, so I don't know if still have).
  > 
  > Other: I think you made a typo. Should not be
  > 
  > myCriteria.addEqualTo("UPPER(meinStringField)", "MYTEXT"
  > 
  > ???
  > 
  > Best regards,
  > 
  > Edson Richter
  > 
  >   ----- Original Message ----- 
  >   From: [EMAIL PROTECTED] 
  >   To: OJB Users List 
  >   Sent: Thursday, February 19, 2004 10:16 AM
  >   Subject: Antwort: How to do a not casesensitive string equal Criteria ?
  > 
  > 
  > 
  >   Hi Stefan,
  > 
  >   you can try this:  myCriteria.addEqualTo("UPPER(meinStringField)", "mytext"
  >   );
  >   Works at least for DB2.
  > 
  >   Regards
  >   Lasse
  > 
  > 
  > 
  > 
  > 
  > 
  > 
  >   |---------+----------------------------->
  >   |         |           Stefan Schl�sser  |
  >   |         |           <[EMAIL PROTECTED]|
  >   |         |           mediate.de>       |
  >   |         |                             |
  >   |         |           19.02.04 13:51    |
  >   |         |           Bitte antworten an|
  >   |         |           "OJB Users List"  |
  >   |         |                             |
  >   |---------+----------------------------->
  >     
>-------------------------------------------------------------------------------------------------------------------------------|
  >     |                                                                              
                                                 |
  >     |        An:      OJB Users List <[EMAIL PROTECTED]>                           
                                            |
  >     |        Kopie:                                                                
                                                 |
  >     |        Thema:   How to do a not casesensitive string equal Criteria ?        
                                                 |
  >     
>-------------------------------------------------------------------------------------------------------------------------------|
  > 
  > 
  > 
  >   Hi,
  > 
  >   I'd like to formulate a Criteria
  > 
  >   crit.addEqualTo("meinStringField", "mytext");
  > 
  >   which should match MYTEXT, mytext, MyText etc. i.e. a incasesensitive
  >   match.
  >   How do I do that using ojb (without resorting to tablecolumn names or
  >   straight sql) ?
  >   By the way, I am using SAPDB and HSQL
  > 
  >   Thanks for your help,
  > 
  >   Stefan
  > 
  > 
  >   ---------------------------------------------------------------------
  >   To unsubscribe, e-mail: [EMAIL PROTECTED]
  >   For additional commands, e-mail: [EMAIL PROTECTED]
  > 
  > 
  > 
  > 
  > 
  > 
  > 
  >   ---------------------------------------------------------------------
  >   To unsubscribe, e-mail: [EMAIL PROTECTED]
  >   For additional commands, e-mail: [EMAIL PROTECTED]
  > 
  > 
  > 
  >   ---
  >   Outgoing mail is certified Virus Free.
  >   Checked by AVG anti-virus system (http://www.grisoft.com).
  >   Version: 6.0.591 / Virus Database: 374 - Release Date: 17/2/2004



  ---------------------------------------------------------------------
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]



  ---
  Outgoing mail is certified Virus Free.
  Checked by AVG anti-virus system (http://www.grisoft.com).
  Version: 6.0.591 / Virus Database: 374 - Release Date: 17/2/2004

Reply via email to