DropDownMultiple and JSR Query

Hi everyone,

One of our content types has a DropDownMultiple to set from 0 to N categories to the item. Is working fine but I don’t know how I can do it to query it on JSR. If I query the other fields there is no problem:

SELECT rx:sys_contentid,rx:duration from rx:video

I’ve been looking at db and I found that RX is storing the categories in another table called Video_Category_Set containing the itemId,revisions,category.

I’ve tried to query this table with different names but there is no luck.

SELECT * from rx:videocategory
SELECT * from rx:video_category
SELECT * from rx:video_category_set

By the way, using JSR is it possible to get all the “table” names? Something like “select table_names from user_tables”

Thanks in advance, Javier. :slight_smile:

JSR-170 queries search all the values selected in DropDownMultiple controls (and other multi-value controls like check box trees.) So, even though the values selected are stored in a separate table, you don’t need to do anything like an INNER JOIN as you would in SQL. It won’t return a separate result for each selected value, just one per content item that matches your WHERE clause (which can test for values in the DropDownMultiple.) To get the individual values that have been selected, you have to examine the assembly item in the Velocity template that renders it, using something like $sys.item.getProperty(“rx:fieldname”).getValues()

I’m pretty sure the only “tables” in JSR-170 are the content types set up in your system, plus nt:base which searches for items of any type.

Andrew.

Great, thanks indeed.