• 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: @count
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: @count


  • Subject: Re: @count
  • From: Mike Schrag <email@hidden>
  • Date: Tue, 19 Jun 2012 06:43:29 -0700

You can't use @count in a sql query.

On Jun 19, 2012, at 4:33 AM, Ron X <email@hidden> wrote:

> hi4all
>
>         EOEditingContext editingContext = ERXEC.newEditingContext();
>
>         NSMutableArray<EOQualifier> qualifiers;
>         {
>             qualifiers = new NSMutableArray<EOQualifier>();
>             qualifiers.add(Artist.NAME_WITHOUT_THE_PREFIX.count().gt(1));
>
>         }
>         EOQualifier qual = ERXQ.or(qualifiers);
>
>         Artist.clazz.objectsMatchingQualifier(editingContext, qual);
>
> but this fails with
>
> INFO  43.44 MB used/37.62 MB free [Thread-7] (ERXDatabaseContextDelegate.java:177)  - Database Exception occured: java.lang.IllegalStateException: sqlStringForKeyValueQualifier: attempt to generate SQL for er.extensions.qualifiers.ERXKeyValueQualifier (@count > 1) failed because attribute identified by key '@count' was not reachable from from entity 'Artist'
>
> sorry, but I don't understand what does it mean
>
> why @count is not reachable?
> _______________________________________________
> 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


 _______________________________________________
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: 
 >@count (From: Ron X <email@hidden>)

  • Prev by Date: @count
  • Next by Date: Re: 5.4 uploading large files
  • Previous by thread: @count
  • Next by thread: Re: Can not launch WOnder app / was: WOnder install fails
  • Index(es):
    • Date
    • Thread