I am using ERXEOAccessUtilities.rowCountForFetchSpecification() now.
My way dates back to the ancient times when there was no wonder...

        atze


Am 11.06.2011 um 19:59 schrieb Miguel Arroz:

> Hey,
> 
>  You're doing that in a very, VERY weird way. Why not using Wonder, as Pascal 
> suggested? It will generate a proper query and no work for you.
> 
>  Regards,
> 
> Miguel Arroz
> 
> On 2011/06/11, at 12:18, Alexander Spohr wrote:
> 
>> Looks like the bug is mine. I did not read the statement as i should, as the 
>> count(*) is an attribute.
>> 
>> To count an entity I add an Attribute "count(*)" on the fly to the entity.
>> This attribute seems to be still in the entity while another fetch runs.
>> 
>> This surprises me somewhat as I thought that my app is not multithreaded 
>> inside EOF.
>> But maybe I get an uncatched exception that keeps the count attribute from 
>> being removed. I'll check into that.
>> 
>> Sorry for the noise!
>> 
>>      atze
>> 
>> 
>> 
>> 
>> Am 11.06.2011 um 12:25 schrieb Alexander Spohr:
>> 
>>> That is done by EOF.
>>>>> com.webobjects.eoaccess.EOAccessArrayFaultHandler.completeInitializationOfObject
>>> 
>>> It bring my apps speed massively down.
>>> We had no exceptions until today.
>>> 
>>> 
>>> Am 11.06.2011 um 12:18 schrieb Pascal Robert:
>>> 
>>>> Are you calling straight SQL or does that call was made with 
>>>> ERXControlUtilities aggregate methods? You can't do a count(*) and having 
>>>> all attributes listed after, that's why you are getting the "must appear 
>>>> in the GROUP BY clause" error.
>>>> 
>>>>> Hi List,
>>>>> 
>>>>> this is a strange one:
>>>>> - allianceID is nullable.
>>>>> Any idea what the problem here might be?
>>>>> 
>>>>>   atze
>>>>> 
>>>>> 
>>>>> JDBCAdaptorException: EvaluateExpression failed: 
>>>>> <com.webobjects.jdbcadaptor.PostgresqlExpression: "SELECT count(*), 
>>>>> t0.allianceID, t0.alliancePermission, t0.comment, t0.creationDate, 
>>>>> t0.deletionDate, t0.gold, t0.id, t0.lastReadForumDate, 
>>>>> t0.lastReadReportDate, t0.loginId, t0.nick, t0.points, t0.rank FROM 
>>>>> Player t0 WHERE t0.allianceID = ?::int4" with
>>>>> Bindings: 1:71(allianceID)>:
>>>>> Next exception:SQL State:42803 -- error code: 0 -- msg: ERROR: column 
>>>>> "t0.allianceid" must appear in the GROUP BY clause or be used in an 
>>>>> aggregate function
>>>>> Position: 18
>>>>> at 
>>>>> com.webobjects.jdbcadaptor.JDBCContext._jdbcErrorWithChannel(JDBCContext.java:170)
>>>>> ... skipped 7 stack elements
>>>>> at 
>>>>> com.webobjects.eocontrol.EOObjectStoreCoordinator.objectsWithFetchSpecification(EOObjectStoreCoordinator.java:488)
>>>>> at 
>>>>> com.webobjects.eocontrol.EOEditingContext.objectsWithFetchSpecification(EOEditingContext.java:4069)
>>>>> at er.extensions.eof.ERXEC.objectsWithFetchSpecification(ERXEC.java:1206)
>>>>> ... skipped 1 stack elements
>>>>> at 
>>>>> com.webobjects.eocontrol.EOObjectStoreCoordinator.objectsForSourceGlobalID(EOObjectStoreCoordinator.java:634)
>>>>> at 
>>>>> com.webobjects.eocontrol.EOEditingContext.objectsForSourceGlobalID(EOEditingContext.java:3923)
>>>>> at er.extensions.eof.ERXEC.objectsForSourceGlobalID(ERXEC.java:1169)
>>>>> ... skipped 1 stack elements
>>>>> at 
>>>>> com.webobjects.eoaccess.EOAccessArrayFaultHandler.completeInitializationOfObject(EOAccessArrayFaultHandler.java:77)
>>>>> at 
>>>>> com.webobjects.eocontrol._EOCheapCopyMutableArray.willRead(_EOCheapCopyMutableArray.java:39)
>>>>> at 
>>>>> com.webobjects.eocontrol._EOCheapCopyMutableArray.count(_EOCheapCopyMutableArray.java:96)
>>>>> at com.webobjects.foundation.NSArray.size(NSArray.java:1026)
>>>>> at com.xyrality.bk.eo.Alliance.publicPropertyList(Alliance.java:84)
>>>>> at com.xyrality.bk.eo.Player.publicPropertyList(Player.java:249)
>>>>> at com.xyrality.bk.eo.Habitat.publicPropertyList(Habitat.java:1187)
>>>>> at com.xyrality.bk.core.MapTile.propertyList(MapTile.java:54)
>>>>> ... skipped 10 stack elements
>>>>> at com.xyrality.bk.actions.MapAction.map(MapAction.java:71)
>>>>> at com.xyrality.bk.actions.MapAction.mapAction(MapAction.java:57)
>>>>> ... skipped 3 stack elements
>>>>> at 
>>>>> com.webobjects.appserver.WODirectAction.performActionNamed(WODirectAction.java:144)
>>>>> at 
>>>>> er.extensions.appserver.ERXDirectAction.performActionNamed(ERXDirectAction.java:401)
>>>>> at 
>>>>> com.xyrality.bk.actions.BKDirectAction.performActionNamed(BKDirectAction.java:84)
>>>>> ... skipped 6 stack elements
>>>>> at com.xyrality.bk.Application.dispatchRequest(Application.java:63)
>>>>> ... skipped 3 stack elements
>>>>> 
>> 
>> _______________________________________________
>> Do not post admin requests to the list. They will be ignored.
>> Webobjects-dev mailing list      ([email protected])
>> Help/Unsubscribe/Update your Subscription:
>> http://lists.apple.com/mailman/options/webobjects-dev/arroz%40guiamac.com
>> 
>> This email sent to [email protected]
> 
> 

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to