Re: @count
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>) |