• 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
Re: wildcard search problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: wildcard search problem


  • Subject: Re: wildcard search problem
  • From: "Jerry W. Walker" <email@hidden>
  • Date: Tue, 28 Mar 2006 09:38:31 -0500

Hi, Tim,

From your description, I'm presuming that you're building your NSMutableArray of EOQualifiers as below and building an EOOrQualifer from the array, then using the resulting EOrQualifier in an EOFetchSpecification.

If the above is true, although I don't know the reason, off hand, for the failure to find the records on an earlier match if the "to-one-b" is null, I would suggest setting -EOAdaptorDebugEnabled YES, running the application again and checking the generated SQL. Your answer may lie there.

Regards,
Jerry

On Mar 24, 2006, at 2:14 PM, Timmy wrote:

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:
40gmail.com


This email sent to email@hidden

--
__ Jerry W. Walker,
WebObjects Developer/Instructor for High Performance Industrial Strength Internet Enabled Systems


    email@hidden
    203 278-4085        office

_______________________________________________
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


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>)
 >wildcard search problem (From: Timmy <email@hidden>)

  • Prev by Date: Re: New Web Components failing to compile?
  • Next by Date: Re: Simple Escape Question
  • Previous by thread: Re: wildcard search problem (apology)
  • Next by thread: Re: MySQL JDBC connection
  • Index(es):
    • Date
    • Thread