jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Luca Tagliani <l.tagli...@cbt.it>
Subject Re: Query using joins
Date Mon, 31 Aug 2009 09:35:32 GMT

Hi Marcel,
  I've tried the your suggestion, but in fact I receive the following error:

"javax.jcr.NamespaceException: WR: is not a registered namespace prefix."

It seems that the query parser make an uppercase of the string so the
namespace "wr" (which is correctly registred) become "WR" (which, of course,
doesn't exist).

Does this make sense for you?

BR
Luca Tagliani


Marcel Reutegger wrote:
> 
> Hi,
> 
> yes, that's possible. the SQL2 query is:
> 
> select * from [wr:profile] as profile inner join [wr:user] as user on
> profile.[jcr:uuid] = user.[wr:profile]
> 
> you can also build the query using the QueryObjectModelFactory. For an
> introduction see section 6 of the JSR 283 draft specification
> available here:
> http://jcp.org/aboutJava/communityprocess/pfd/jsr283/index.html
> 
> please note that those interfaces are only implemented in Jackrabbit
> 2.0 (currently available as alpha releases).
> 
> regards
>  marcel
> 
> On Thu, Aug 27, 2009 at 09:25, Luca Tagliani<l.tagliani@cbt.it> wrote:
>>
>> Hi all,
>>  I wonder if it is possible to execute this query:
>>
>> "select profile.*, user.* from wr:profile as profile inner join wr:user
>> as
>> user on user.id = profile.wrprop:user"
>>
>> where wr:profile and wr:user ar nodeTypeName and wrprop:user is a
>> property
>> of type Reference which references an instance of wr:profile.
>>
>> Also, is it possible to build the query using the JSR283 API?
>>
>> Thanks in advance for your help
>>
>> BR
>>
>> Luca Tagliani
>> --
>> View this message in context:
>> http://www.nabble.com/Query-using-joins-tp25167225p25167225.html
>> Sent from the Jackrabbit - Users mailing list archive at Nabble.com.
>>
>>
> 
> 

-- 
View this message in context: http://www.nabble.com/Query-using-joins-tp25167225p25220685.html
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.


Mime
View raw message