• 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: EOQualifier and to-many relationships
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: EOQualifier and to-many relationships


  • Subject: Re: EOQualifier and to-many relationships
  • From: Joe Kramer <email@hidden>
  • Date: Fri, 14 Dec 2012 16:08:03 -0800

Weird... putting it in it's own class file works just fine. Turns out it was not my qualifier, but something to do with the way I am using an ERXDisplayGroup.

I have this code in my search method:
displayGroup().setQualifier(qual);
displayGroup().fetch();

    public ERXDisplayGroup<Person> displayGroup() {
        if (displayGroup == null) {
            EODatabaseDataSource dataSource = new EODatabaseDataSource(
                    session().defaultEditingContext(), 
                    Person.ENTITY_NAME);

            displayGroup = new ERXDisplayGroup<Person>();
            displayGroup.setDataSource(dataSource);
            displayGroup.setNumberOfObjectsPerBatch(10);
            displayGroup.setSortOrderings(Person.LAST_NAME.ascInsensitives());
        }
        return displayGroup;
    }

If I change the code in the search method to:
displayGroup().setObjectArray(Person.fetchPersons(ec, qual, null));

everything works as fast as I would expect. Anyone have insights into why the way I was trying to use ERXDisplayGroup was so slow?

Thanks,

Joe


On Fri, Dec 14, 2012 at 3:38 PM, Ramsey Gurley <email@hidden> wrote:
Uhhh, bizarre

IllegalArgumentException: <NSSelector> method is not public: public com.webobjects.foundation.NSArray

:D  Looks public to me.  

Try making the delegate an actual class in its own java file then.

Ramsey

On Dec 14, 2012, at 4:26 PM, Joe Kramer wrote:

Hi Ramsey,

Adding that code I get the following stack. Did I miss anything?

IllegalArgumentException: <NSSelector> method is not public: public com.webobjects.foundation.NSArray com.example.app.Application$1.editingContextShouldFetchObjects(com.webobjects.eocontrol.EOEditingContext,com.webobjects.eocontrol.EOFetchSpecification)
Class com.webobjects.foundation.NSSelector can not access a member of class com.example.app.Application$1 with modifiers "public"
  at com.webobjects.foundation.NSSelector._safeInvokeMethod(NSSelector.java:126)
  at com.webobjects.foundation._NSDelegate._perform(_NSDelegate.java:223)
  at com.webobjects.foundation._NSDelegate.perform(_NSDelegate.java:163)
  at com.webobjects.eocontrol.EOEditingContext.objectsWithFetchSpecification(EOEditingContext.java:4064)
  at er.extensions.eof.ERXEC.objectsWithFetchSpecification(ERXEC.java:1231)
     ... skipped 1 stack elements
  at com.webobjects.appserver.WODisplayGroup.fetch(WODisplayGroup.java:2132)
  at er.extensions.appserver.ERXDisplayGroup.fetch(ERXDisplayGroup.java:125)
  at er.directtoweb.pages.ERD2WListPage._fetchDisplayGroup(ERD2WListPage.java:452)
  at er.directtoweb.pages.ERD2WListPage.setupPhase(ERD2WListPage.java:552)
  ... skipped 16 stack elements

On Fri, Dec 14, 2012 at 3:02 PM, Ramsey Gurley <email@hidden> wrote:
editingContextShouldFetchObjects



 _______________________________________________
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: EOQualifier and to-many relationships
      • From: Ramsey Gurley <email@hidden>
References: 
 >EOQualifier and to-many relationships (From: Joe Kramer <email@hidden>)
 >Re: EOQualifier and to-many relationships (From: Ramsey Gurley <email@hidden>)
 >Re: EOQualifier and to-many relationships (From: Joe Kramer <email@hidden>)
 >Re: EOQualifier and to-many relationships (From: Ramsey Gurley <email@hidden>)

  • Prev by Date: Re: WebObjects mentioned in Podcast
  • Next by Date: Re: EOQualifier and to-many relationships
  • Previous by thread: Re: EOQualifier and to-many relationships
  • Next by thread: Re: EOQualifier and to-many relationships
  • Index(es):
    • Date
    • Thread