Re: [xwiki-users] xwql join query

2010-11-22 Thread afrey
I tried the following query but I didn't get anything :( #set($fruits = $services.query.xwql(from doc.object(Fruit.FruitClass) as fru, doc.object(Supplier.SupplierClass) as sup where fru.Supplier.Name=sup.Name and sup.City='Melbourne').execute()) -- View this message in context:

Re: [xwiki-users] xwql join query

2010-11-22 Thread Marius Dumitru Florea
Hi Alina, On 11/22/2010 04:12 PM, afrey wrote: Hi all, I'm struggling creating a xwql query that joins two tables. Let's say I have two classes: Fruit and Supplier. Fruit has the following properties: Name, Supplier. What's the type of the Supplier property? Is it a database list? Have

Re: [xwiki-users] xwql join query

2010-11-22 Thread afrey
Yes, sorry I forgot to mention. Supplier property is a Database List (it allows to select one Supplier from all of the Supplier objects created). Therefore I cannot have it set as string. It needs to be a selection from Supplier objects. Please check the previous post to see the join query that

Re: [xwiki-users] xwql join query

2010-11-22 Thread Marius Dumitru Florea
On 11/22/2010 04:27 PM, afrey wrote: I tried the following query but I didn't get anything :( #set($fruits = $services.query.xwql(from doc.object(Fruit.FruitClass) as fru, doc.object(Supplier.SupplierClass) as sup where fru.Supplier.Name=sup.Name and sup.City='Melbourne').execute()) On

Re: [xwiki-users] xwql join query

2010-11-22 Thread afrey
I tried the query and it doesn't work. It seems that member of causes the query to fail to execute. Unfortunately I cannot use Database tree as the data type for Supplier property of Fruit. -- View this message in context:

Re: [xwiki-users] xwql join query

2010-11-22 Thread afrey
It doesn't have to be an xwql query. It could be sql, hql, anything that would work ;) -- View this message in context: http://xwiki.475771.n2.nabble.com/xwql-join-query-tp5762763p5763606.html Sent from the XWiki- Users mailing list archive at Nabble.com.