Hi

(XWiki 2.7.2)
I've defined a class with a property defined as DatabaseList 
It's a multi select
The Hibernate query is:

select ata.filename
 from XWikiAttachment as ata,
       XWikiDocument as doc 
 where doc.fullName ='CdLSAssociations.FlagAttachments'
   and doc.id = ata.docId
order by ata.filename

This works fine, when I create a new object of this class I can select multiple 
fileNames

My questions;
I would like to strip the filename extension from the ata.filename (ar.png => 
ar)
I was trying a substr(ata.filename,1,2) does not work
How do I do this?

Second, I wonder if it is possible to add a second collumn to the query that 
uses a translation table
like 
select ata.filename,
           $msg.get(ata.filename) as translatedName 
 from XWikiAttachment as ata,
       XWikiDocument as doc 
 where doc.fullName ='CdLSAssociations.FlagAttachments'
   and doc.id = ata.docId
order by translatedName

and use in the class property defenition the ID Field name and Value Field Name

Any help is highly appreciated

Gerritjan


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

Reply via email to