Hi, I have a class with a database list property that should list all available users but I got no idea how the hibernation query should look. Thanks! Sascha
On 1/16/06, Sascha Österle <sascha.oe@aon.at> wrote:
Hi,
I have a class with a database list property that should list all available users but I got no idea how the hibernation query should look.
Thanks! Sascha Hi,
select prop.value from BaseObject as obj, StringProperty as prop where obj.className='XWiki.CompanyClass' and prop.id.id = obj.id and prop.id.name='name' order by prop.value replace "XWiki.CompanyClass" by your the className of the class who contains the list of users and 'name' by the column name Jérémi -- Blog: http://www.jeremi.info LinkedIn: https://www.linkedin.com/profile?viewProfile=&key=1437724 http://www.xwiki.org skype: jeremi23 -- msn et gtalk : jeremi23@gmail.com
Hi, wow, it works! I had to change the ClassSheet to use #set($obj = $doc.getObject("XWiki.TodoClass",0)) and $doc.display($prop.getName(),"edit",$obj) instead of just $doc.display($prop.getName()) Now one last question: Can I select multiple columns too? I would love to have the first_name and last_name in my drop-down. Thanks a lot! Sascha jeremi joslin wrote:
On 1/16/06, Sascha Österle <sascha.oe@aon.at> wrote:
Hi,
I have a class with a database list property that should list all available users but I got no idea how the hibernation query should look.
Thanks! Sascha
Hi,
select prop.value from BaseObject as obj, StringProperty as prop where obj.className='XWiki.CompanyClass' and prop.id.id = obj.id and prop.id.name='name' order by prop.value
replace "XWiki.CompanyClass" by your the className of the class who contains the list of users and 'name' by the column name
Jérémi
-- Blog: http://www.jeremi.info LinkedIn: https://www.linkedin.com/profile?viewProfile=&key=1437724 http://www.xwiki.org skype: jeremi23 -- msn et gtalk : jeremi23@gmail.com
------------------------------------------------------------------------
-- You receive this message as a subscriber of the xwiki-users@objectweb.org mailing list. To unsubscribe: mailto:xwiki-users-unsubscribe@objectweb.org For general help: mailto:sympa@objectweb.org?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
participants (2)
-
jeremi joslin -
Sascha Österle