Thanks for the discussion on this, this has resolved the issue for me anyway. I was unaware that the jcr:content node off the file node was referenceable, the references that I am making can go to that instead for now and therefore I don't need the node of type nt:file or nt:folder to be referenceable (nt:folder due to just setting it through a json file).

I didn't particularly want to have two files, myfile.jpg & myfile.jpg.json for each referenceable file which was why I didn't go down this route.

In regards to references being strongly discouraged in the repository (and CMS instances specifically) I presume this has something in regards to this: http://wiki.apache.org/jackrabbit/DavidsModel (#5)

I understand what he is saying here, but I am curious as to why you say CMS in particular? Maybe a few of the cases that I am using references for I don't need to (one being site navigation). One of the benefits that I saw for using references as a way of linking between pages in the site was that when a page is moved in the repository the references still point to the page, and the url will be automatically updated (also will stop links to dead pages since the page cannot be removed while it is referenced).

What are the thoughts around this?

Carsten Ziegeler wrote:
Tobias Bocanegra wrote:
i haven't tried, but with a side-by-side json that should work, right?

myfile.jpg
myfile.jpg.json
{
  jcr:mixinTypes: ["mix:referenceable"]
}


No, this isn't implemented yet, just for folders - and implementing it this way is actually my prefered option b) :)

btw: it's the jcr:content of an nt:file that is referenceable. so
that's also where the reference should point, to.

But "jcr:content" is not by default referenceable I think, so you still
have the same problem.
yes it is, as long nt:resource is used, which is the default nodetype
that is used by the loader for files.
Ah, yes, right - I just looked at the jcr:content node type definition which is just nt:base. Thanks!

Carsten

Reply via email to