Hello,

On 4/16/08, [Ricardo Rodriguez] Your EPEC Network ICT Team <
[EMAIL PROTECTED]> wrote:
>
> Thanks, Pascal,
>
> Pascal Voitot wrote:
> > Hello,
> >
> > the option is the boolean "xwiki.store.hibernate.useclasstables" to put
> in
> > the config...
> >
> > sorry if I don't answer quickly but I'm quite busy and I can't answer in
> a
> > serious manner just now...
> > Anyway, if it can help you, I think you should read this tuto:
> > http://www.theserverside.com/tt/articles/article.tss?l=XWiki
> >
>
> I think I have to read it a hundred time more :-) at least...
> > Even if I know a bit the class design, I'm not an expert yet :)
> > But $xwiki.search seems not to return Object[] but Collection[] only
> with
> > properties Name, ClassName and Number... Don't know why exactly but I
> will
> > look at it...
> >
> > So something like this seems to work for me... you retrieve the doc and
> then
> > the object and then you get our Object :)
> >
> > #set($query="from BaseObject obj where obj.className
> > ='Contacts.ContactClass'")
> > #set($results=$xwiki.search($query, 10, 0))
> > #foreach ($item in $results)
> > #set($myObject =
> $xwiki.getDocument($item.Name).getObject($item.ClassName,
> > $item.Number))
> > $myObject.get("firstname") | $myObject.get("surname") |
> > $myObject.get("phone1")
> > #end surname
> >
>
> I will follow this idea to see if I am able to understand how the
> mechanism does work! Vincent explanation is The Server Side must be
> enough. The point is to read it a number of times to incorporate new
> understanding. I must recognize that the first time I read it... I
> understood... nothing :-)
>
> But, in this $query up here you included "from", is it not ", BaseObject
> as obj......."?
>
> Please, what does mean the "," before BaseObject? Thanks! I think this
> is not explained in Vincent's article.


this is because in the Todo tutorial, it uses $xwiki.searchDocument which
already brings one part of the HQL request...
so what you write is the end of the request that's why you put "," at the
beginning:)

but in my sample, this is pure HQL so no problem of this kind!

regards
Pascal


Ricardo
>
> > Maybe somebody could tell if there is something quicker?
> >
> > br
> > Pascal
> >
>
> Thanks for your help,
>
> Ricardo
>
> --
> Ricardo Rodríguez
> Your EPEC Network ICT Team
>
> _______________________________________________
> devs mailing list
> [email protected]
> http://lists.xwiki.org/mailman/listinfo/devs
>
_______________________________________________
devs mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/devs

Reply via email to