• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
wildcard search problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

wildcard search problem


  • Subject: wildcard search problem
  • From: Timmy <email@hidden>
  • Date: Fri, 24 Mar 2006 11:14:00 -0800

WO folks:

I've implemented a wildcard search on one of my WOComponents by adding a bunch of EOKeyValueQualifiers to an array. The search takes user input, appends a "*" then I build the qualifiers as so:

qualifiers.addObject(new EOKeyValueQualifier("field1", EOQualifier.QualifierOperatorLike, wildcardMatch));
qualifiers.addObject(new EOKeyValueQualifier("relationship.field1", EOQualifier.QualifierOperatorCaseInsensitiveLike, wildcardMatch));
qualifiers.addObject(new EOKeyValueQualifier("relationship.field2", EOQualifier.QualifierOperatorCaseInsensitiveLike, wildcardMatch));


This all works as expected and returns any matching EO's. Something goes wrong when I add additional qualifiers that traverse two one-to- one relationships. I've extended a table in my model by adding adding another table and this relationship is set as "owns destination." So, if I add another qualifier like this:

qualifiers.addObject(new EOKeyValueQualifier("to-one-a.to-one- b.field1", EOQualifier.QualifierOperatorCaseInsensitiveLike, wildcardMatch));

my search returns results only if "to-one-b" is not null. This is true even if the user-entered criteria matches one of the first three qualifiers. If I comment the last qualifier out, the same search works again but I obviously lose the ability for the search to extend against the other relationship. One possible fix is to make sure that the final destination in the last qualifier is not null - but that is a user education approach.

Can anyone explain to me why this is happening?

Tim
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: wildcard search problem
      • From: "Jerry W. Walker" <email@hidden>
    • Re: wildcard search problem (apology)
      • From: Timmy <email@hidden>
References: 
 >MySQL JDBC connection (From: netBrackets <email@hidden>)
 >Re: MySQL JDBC connection (From: Arturo PĂ©rez <email@hidden>)
 >Re: MySQL JDBC connection (From: Arturo Perez <email@hidden>)

  • Prev by Date: wildcard search problem
  • Next by Date: Re: Help. Error from jam ??
  • Previous by thread: Re: MySQL JDBC connection
  • Next by thread: Re: wildcard search problem (apology)
  • Index(es):
    • Date
    • Thread