• 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
ERXBatchingDisplayGroup/Distinct/Sorting bug? (was: RE: DisplayGroup/ERXFlickrBatchNavigation question)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

ERXBatchingDisplayGroup/Distinct/Sorting bug? (was: RE: DisplayGroup/ERXFlickrBatchNavigation question)


  • Subject: ERXBatchingDisplayGroup/Distinct/Sorting bug? (was: RE: DisplayGroup/ERXFlickrBatchNavigation question)
  • From: "Andrew R. Kinnie" <email@hidden>
  • Date: Tue, 29 Dec 2009 13:22:58 -0500

OK, we have narrowed this down dramatically.
We have a batching display group of objects from and Oracle DB.
We are grabbing objects from two separate paths, and therefore are using distinct (setUsesDistinct(true);).
We are sorting the objects based on firstname then lastname (we have also tried just using one).

We get the Oracle error each time, because the generated SQL uses "distinct" for the id column on the inner most select, but does not also select the attributes used in the sort.

We get this error no matter what form of qualifier we use.  Whether we use ERXKey or not.  No matter how simplified.

Anyone else using:
1. ERXBatchingDisplayGroup,
2. setUsesDistinct(true); and
3. Sorting?

Andrew


On Dec 28, 2009, at 3:06 PM, Chuck Hill wrote:

> And the qualifiers are what controls what SQL is generated.  It could also be the way the DG is combining the qualifiers internally.  Maybe try creating the OR externally and just setting one combined qualifier on the DG.  If that does not work, consider dropping the ERXKey stuff and build it using the Wonder qualifiers directly.  You might need to re-state the query.
>
>
> Chuck
>
>
> On Dec 28, 2009, at 10:20 AM, Andrew R. Kinnie wrote:
>
>> Also, the reason I point out the distinct/sorting issue is that the generated SQL uses an order by in the outer select, and if you add distinct in the inner select, it's not including the attributes required by the order by, but only the id attribute.  Thus, Oracle raises an error, because the distinct select must contain all the attributes used by the order by.  If I run the sql separately, I get the same error, and if I add the order by attributes manually to the SQL, I get the correct result.
>>
>> Andrew
>>
>>
>> On Dec 28, 2009, at 12:53 PM, Chuck Hill wrote:
>>
>>>
>>> On Dec 28, 2009, at 9:06 AM, Andrew R. Kinnie wrote:
>>>
>>>> As a followup, I get the correct number of rows if I comment out any code which sorts the displayGroup using attributes other than the id column of the entity populating the displayGroup.
>>>>
>>>> Without sorting, and with setUsesDistinct(true); I get 23 rows.  Navigation works.
>>>>
>>>> If I then try to sort the displayGroup (using in this case the entity's lastname then firstname attributes) I get the oracle error, because the inner most select statement generated by Wonder/EOF has a distinct, but is trying to orderby attributes that are in the outermost select but not the inner most select where the distinct statement is.
>>>>
>>>> Is this a bug in Wonder where setUsesDistinct(true); does not work with sorting?
>>>>
>>>> Am I missing something?
>>>
>>>
>>> What is the qualifier?  If you are using one of the Wonder qualifiers, you may have found a bug or may be using them incorrectly.
>>>
>>>
>>> Chuck
>>>
>>> --
>>> Chuck Hill             Senior Consultant / VP Development
>>>
>>> Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems.
>>> http://www.global-village.net/products/practical_webobjects
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>
>
> --
> Chuck Hill             Senior Consultant / VP Development
>
> Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems.
> http://www.global-village.net/products/practical_webobjects
>
>
>
>
>
>
>

 _______________________________________________
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: 
 >RE: DisplayGroup/ERXFlickrBatchNavigation question - Wonder bug? (From: "Andrew R. Kinnie" <email@hidden>)
 >Re: DisplayGroup/ERXFlickrBatchNavigation question - Wonder bug? (From: Chuck Hill <email@hidden>)
 >Re: DisplayGroup/ERXFlickrBatchNavigation question - Wonder bug? (From: "Andrew R. Kinnie" <email@hidden>)
 >Re: DisplayGroup/ERXFlickrBatchNavigation question - Wonder bug? (From: Chuck Hill <email@hidden>)

  • Prev by Date: Re: Refactor java files (Prev: OT: Refactor files into packages (Eclipse))
  • Next by Date: Re: Refactor java files (Prev: OT: Refactor files into packages (Eclipse))
  • Previous by thread: Re: DisplayGroup/ERXFlickrBatchNavigation question - Wonder bug?
  • Next by thread: Re: DisplayGroup/ERXFlickrBatchNavigation question - Wonder bug? - SOLVED
  • Index(es):
    • Date
    • Thread