• 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: Null values at end of sorted list
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Null values at end of sorted list


  • Subject: Re: Null values at end of sorted list
  • From: email@hidden
  • Date: Fri, 1 Feb 2008 16:35:10 -0500


Hi Lachlan :-)

I just tried your idea of enumerating through all the EO classes and setting them explicitly for the class of "setSupportForClass". I did this and also kept another line for setting "Object.class" as well. Unfortunately it hasn't corrected the situation yet. We still have problems after saving changes to the database but no problems sorting and resorting prior to a ec.saveChanges().

I'm not sure what your code was fixing though. I thought that "Object.class" was the root of everything and would be a catch all. If it isn't, doing specifics for all the EO classes is not enough. I'd also need to do Long, Integer, NSTimestamp, String, etc. because those could be null too and part of a comparison (the attribute of an EO).

Thanks for attacking this problem and thinking about it. Let me know if I misunderstood or if you have other ideas,

-- Aaron

Lachlan Deck <email@hidden> wrote on 01-02-2008 03:21:19 PM:

> > Seeing as you've peeked at _handleNulls etc you, on closer  
> inspection, should notice that this is not what you want.
>
> for ( Enumeration mn = EOModelGroup.defaultGroup().models
> ().objectEnumerator(); mn.hasMoreElements(); )
> {
>    EOModel model = ( EOModel )mn.nextElement();
>    for ( Enumeration en = model.entities().objectEnumerator();  
> en.hasMoreElements(); )
>    {
>       EOEntity entity = ( EOEntity )en.nextElement();
>       Class entityClass = Class.forName( entity.className() );
>       EOSortOrdering.ComparisonSupport.setSupportForClass( new  
> CXNullsAtEndComparisonSupport(), entityClass );
>    }
> }
>
 _______________________________________________
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: Null values at end of sorted list
      • From: Lachlan Deck <email@hidden>
References: 
 >Re: Null values at end of sorted list (From: Lachlan Deck <email@hidden>)

  • Prev by Date: Re: Qualifier creation
  • Next by Date: Re: Qualifier creation
  • Previous by thread: Re: Null values at end of sorted list
  • Next by thread: Re: Null values at end of sorted list
  • Index(es):
    • Date
    • Thread