Re: n00b Q:Getting a database entity count
Re: n00b Q:Getting a database entity count
- Subject: Re: n00b Q:Getting a database entity count
- From: Johann Werner <email@hidden>
- Date: Mon, 16 Jun 2008 08:44:03 +0200
Am 15.06.2008 um 23:18 schrieb Rams:
On Jun 15, 2008, at 4:17 PM, Johann Werner wrote:
Hi Rams,
calling entity.relationship.count would fault all objects.
I was afraid of that...
Look at http://wiki.objectstyle.org/confluence/display/WOL/Count+To-Many+Objects+without+Loading
where you get a more recent code snippet for solving your problem.
jw
Hmm, now that you mention it, this page:
http://wiki.objectstyle.org/confluence/display/WO/Best+Practices-Starting+From+Scratch
Seems to indicate there's an "easy" way to do it in wonder... Is
this included in _WonderEntity.java perhaps? I forgot to mention,
I'm using Wonder and WO 5.3.3.
Thanks again!
In the example code snippet you can see that
ERXEOControlUtilities.objectCountWithQualifier() does the trick. There
is another convenience function
ERXEOControlUtilities.objectCountUniqueWithQualifierAndAttribute() but
best is to loock into Wonder API.
jw
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
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