• 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: ERXInQualifier bug - repeating last element extra 5 times
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ERXInQualifier bug - repeating last element extra 5 times


  • Subject: Re: ERXInQualifier bug - repeating last element extra 5 times
  • From: "Shravan Kumar. M" <email@hidden>
  • Date: Mon, 16 Nov 2009 21:18:50 -0800 (PST)

Okay. Thanks for your quick response Ricardo.


From: Ricardo J. Parada <email@hidden>
To: Shravan Kumar. M <email@hidden>
Cc: WO Dev Group <email@hidden>
Sent: Tue, November 17, 2009 10:19:28 AM
Subject: Re: ERXInQualifier bug - repeating last element extra 5 times


When I tried it, the ERXInQualifier generated SQL for only the desired values and without repeating the last one.  Actually I did not set that property, I used the padToSize in the constructor.  And then I noticed that the default padToSize comes from that property by looking at the ERXInQualifier source code.

Like I said, I don't know what the padding is for.   I read the documentation but it did not answer that to me.  It mentions something about bind variables and reducing the number of unique queries.  But I still don't get it.  :-)

Here it is:

public ERXInQualifier(String key,
NSArray values,
int padToSize)
Constructs an in qualifer for a given attribute name and an array of values.

Parameters:
key - attribute name
values - array of values
padToSize - the size which is expected to be reasonable for this qualifier. If the NSArray values has more than one element, the padToSize is used to round up the number of elements and pad with nulls. Doing this reduces the number of unique queries which result from having an arbitrary number of values. For example, if the padToSize is 8, then we'll either have 1, or 8, or 16, or... bind variables as compared to 1..., 2..., 3..., 4..., or ....16



On Nov 16, 2009, at 11:39 PM, Shravan Kumar. M wrote:

Oh is it! I will try out this option today!!! 

Will changing this option as advised effect any other parts of Wonder/ ERXtensions - "er.extensions.ERXInQualifier.DefaultPadToSize=1"

Actually, due to this padding we had an SQL overflow once, but people did not recognize that this was caused by ERXInQualifier duplication of values...


From: Ricardo J. Parada <email@hidden>
To: Shravan Kumar. M <email@hidden>
Cc: WO Dev Group <email@hidden>
Sent: Tue, November 17, 2009 2:12:05 AM
Subject: Re: ERXInQualifier bug - repeating last element extra 5 times

Yes I noticed that too.  I don't quite understand what the padding does but I think you may set the following property to 1 and it may behave the way you are expecting it:

er.extensions.ERXInQualifier.DefaultPadToSize=1



 _______________________________________________
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: 
 >ERXInQualifier bug - repeating last element extra 5 times (From: "Shravan Kumar. M" <email@hidden>)
 >Re: ERXInQualifier bug - repeating last element extra 5 times (From: "Ricardo J. Parada" <email@hidden>)
 >Re: ERXInQualifier bug - repeating last element extra 5 times (From: "Shravan Kumar. M" <email@hidden>)
 >Re: ERXInQualifier bug - repeating last element extra 5 times (From: "Ricardo J. Parada" <email@hidden>)

  • Prev by Date: Re: Component to simulate a long response
  • Next by Date: Re: Component to simulate a long response
  • Previous by thread: Re: ERXInQualifier bug - repeating last element extra 5 times
  • Next by thread: Re: ERXInQualifier bug - repeating last element extra 5 times
  • Index(es):
    • Date
    • Thread