jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexander Klimetschek <aklim...@day.com>
Subject Re: SQL joins from JCR to database
Date Mon, 01 Feb 2010 15:20:21 GMT
On Mon, Feb 1, 2010 at 15:55, philip andrew <philip142au@gmail.com> wrote:
> I have a Jackrabbit running inside my H2 database set up by all those XML
> files.
>
> Is there any way to do a join between a normal database table and a Node in
> the tree?

Not directly. If you access the repository through the JCR API, it is
completely transparent how things are actually persisted. You would
run two queries at least, one in JCR to get a list of nodes and then
use that information for joining with your other data in the db.

When just going to the H2 DB directly, it will probably be hard to
build queries, as the standard persistence managers store the data in
a binary form, optimized for JCR usage. So you can't easily query for
property values, for example. (In Jackrabbit the query is done with
the help of Lucene indexes). The only thing readily available will be
the UUID of the nodes.

A possible solution is to put the DB data into the JCR.

Regards,
Alex

-- 
Alexander Klimetschek
alexander.klimetschek@day.com

Mime
View raw message