jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Pietsch <mpe...@gmx.de>
Subject Re: Files uploaded by WebDAV not accessible via OCM queries
Date Sun, 14 Dec 2008 20:03:34 GMT
Hi St├ęphane,

slandelle@excilys.com wrote:
> IMO, discriminator should only be used only if you really can do otherwise.
> It sure is a fast way to have something running.
> However, as it stores the java class name into the repository, it's a real
> pain when you try to refactor your java model and change the class name. 

I'm aware of that. That's why I'm asking if the OCM queries rely on that 
discriminator tag. The main problem is, that the contentManager is not 
able to map a node if it does not contain the discriminator.

To put it differently: Is there a way to tell the OCM criterions for the 
  mapping different from the discriminator tag.
And finally: Is that possible via annotations?

My File POJO currently looks like this:

@Node(jcrType="nt:file", extend=HierarchyNode.class, discriminator = true)
public class File  extends HierarchyNode {

     @Bean(jcrName="jcr:content") private Resource resource;

     public Resource getResource() {
         return resource;

     public void setResource(Resource resource) {
         this.resource = resource;



> I prefer explicitally declare the jcrType and the elementClassName.
> There's still some issues with the trunk, but you can find how to patch it
> here:
> https://issues.apache.org/jira/browse/JCR-1893
> https://issues.apache.org/jira/browse/JCR-1895
> https://issues.apache.org/jira/browse/JCR-1909
> Sincerely,
> St├ęphane Landelle

View raw message