SELECT COUNT
SELECT COUNT
- Subject: SELECT COUNT
- From: Benoit Mangez <email@hidden>
- Date: Fri, 3 Sep 2004 10:58:58 +0200
Hi,
Just a simple question...
I have an huge EOQualifier (build by the user). I would like to perform
a simple SELECT COUNT(*) FROM myEntity WHERE (huge qualifier) without
fetching the corresponding objects.
I can't find a simple way to do this.
I tried to translate the 'huge qualifier' into SQL using the following
code:
EOAdaptor adaptor = EOAdaptor.adaptorWithModel(anEntity.model());
EOSQLExpressionFactory sqlfac = new
EOSQLExpressionFactory(adaptor);
sqlfac.createExpression(anEntity).setUseBindVariables(true);
EOSQLExpression sql =
sqlfac.selectStatementForAttributes(new NSArray(anAttribute), false,
fs, anEntity);
System.out.println("sql:"+sql.statement());
This works fine with FrontBase, but with Oracle: the bindings are
missing in sql.statement().
Any ideas ?
Benoit Mangez
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.