Hi,
This is the activitystream hibernate mapping where you can see the exact
property names:
https://github.com/xwiki/xwiki-platform/blob/master/xwiki-platform-core/xwi…
...and this is the regular XWiki model mapping (corresponding to the other
tables observed in
http://platform.xwiki.org/xwiki/bin/view/DevGuide/DatabaseSchema )
https://github.com/xwiki/xwiki-platform/blob/master/xwiki-platform-core/xwi…
Remember that, when writing HQL, you need to look at the hibernate mapping,
not just the SQL database schema (which is useful, but can be misleading).
Thanks,
Eduard
On Wed, Jan 20, 2016 at 9:27 AM, Pascal BASTIEN <pbasnews-xwiki(a)yahoo.fr>
wrote:
Ok thxs guys
I didn't understood why my $xwiki.activitystream.searchEvents doesn't work
with eventid...
I'm starting to begin some help and copy/paste
Doc
http://platform.xwiki.org/xwiki/bin/view/DevGuide/DatabaseSchema
indicate:
"In a hibernate query you can use the same name as the get method but
without the get and with the first letter lowercase so the SQL query"
I drink a strong coffe and read ... WITH THE FIRST LETTER LOWERCASE!
Then I replace my EventId by eventId to fix my ugly code (because public
String getEventId()):
#set($results=
$xwiki.activitystream.searchEvents("act.eventId='$MyValue'", false, 0,
0))
and tadaaaa!
it's working thxs a lot.
I will post my form here later when it will be ready if you want it. :-)
$xwiki.activitystream.method but if I use where
condition on
eventid field I obtain this error :-(
Caused by: org.hibernate.QueryException: could not resolve
property: EventId of:
com.xpn.xwiki.plugin.activitystream.impl.ActivityEventImpl
[select act from
com.xpn.xwiki.plugin.activitystream.impl.ActivityEventImpl
as act where
act.EventId='757328280-1453216488000-dishFheu' order by
act.date desc]
at
org.hibernate.persister.entity.AbstractPropertyMapping.propertyException(AbstractPropertyMapping.java:81)
_______________________________________________
users mailing list
users(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/users