--- En date de : Mar 19.1.16, vinc...@massol.net <vinc...@massol.net> a écrit :

> De: vinc...@massol.net <vinc...@massol.net>
> Objet: Re: [xwiki-users] Fw : Re: How can I get event object through a form
> À: "XWiki Users" <users@xwiki.org>
> Date: Mardi 19 janvier 2016, 8h09
> Also note that the AS has
> a buitin feature to delete old events, see your xwiki.cfg
> file:
> 
....
> xwiki.plugin.activitystream.daystokeepevents=0

Yes I know that and delete some event with API :-)
My problem is the way to give some selected event object through a form with 
$request.getParameterValues() to delete these events.

> 
> If you still need to delete
> event manually you could check the code executed by the
> scheduler job.

I didn't found it either Scheduler.ActivityStreamCleaner is empty and anyway I 
suppose it is groovy code (look into xar source if needed).


> > Did you try using
> searchEvents and building an HQL that
> >

Anyway I found table and field to use an hql query here:
http://platform.xwiki.org/xwiki/bin/view/DevGuide/DatabaseSchema (I must use a 
ggogle glass+zoom to see field ;-) )
but my query with $services.query.hql($hql).execute() doesn't work with table 
name (rg.hibernate.hql.ast.QuerySyntaxException: activitystream_events is not 
mapped ).
Then I tested with simple query:
SELECT doc.XWD_TITLE FROM xwikidoc AS doc WHERE doc.XWD_FULLNAME = 
'Main.WebHome'
didn't work => Caused by: org.hibernate.hql.ast.QuerySyntaxException: xwikidoc 
is not mapped [select doc.XWD_TITLE FROM xwikidoc AS doc WHERE doc.XWD_FULLNAME 
= 'Main.WebHome']
SELECT doc.title FROM XWikiDocument AS doc WHERE doc.fullName = 'Main.WebHome'
working fine
With velocity+API we can not use hql query with true field/table name?
If we can not then where I can found field/table mapping name for 
activitystream_events table?

Thxs
_______________________________________________
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users

Reply via email to