hi hans,
please try the following count-query:
Criteria crit = new Criteria();
crit.addEqualTo(phoneNumber.rftelco.rftelcoId, new Integer(65));
broker.getCount(query);
the generated sql for hsqldb looks like this:
SELECT count(*) FROM CALLS A0 INNER JOIN PHONE_NUMBER A1 ON
Hans Novak wrote:
Can you give me a hint howto realize that ?
I'll take a closer look to your statements and tables and try it. Did you
publish all your terms so that I can find them into the previous mails?
Regards,
Thomas
-
Hello Thomas (and Jakob)
Thomas Franke schrieb:
I'll take a closer look to your statements and tables and try it. Did you
publish all your terms so that I can find them into the previous mails?
I'm not shure.
So her are my classes and the repository: I hope, thats what you need.
Hans
hi hans,
first you need to define all your classes and their relationships in the
repository.xml . and then you could execute a report query selecting
count(*).
hth
jakob
Hans Novak schrieb:
Hi,
i try many hours (without a result) to query this sql statement:
SELECT count(*) FROM CALLS
Hi,
this is already done before (and working).
I can read and write to the database (mysql) with ojb criterias and querys.
My problem is, how i write the criterias and querys that will be
translated to a sql command like described.
Hans
Jakob Braeuchi schrieb:
hi hans,
first you need to
hi hans,
if you have the relationships properly defined, you'll not have to care
about the joins.
Criteria crit = new Criteria();
crit.addEqual(telcoId, new Integer(65));
ReportQueryByCriteria q = QueryFactory.newReportQuery(Calls.class, crit);
q.setAttributes(new String[]{count(*)});
Hi Hans,
PLEASE PLEASE HELP ME !
How about to use ReportQueryByCriteria and the Criteria#addSql method? I think
it's the best way to perform this.
Hope I could help!
Thomas
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For