1 Reply Latest reply on Aug 26, 2016 1:15 AM by hchiorean

    Is it possible to create a reference from one federated node to another in a connector?

    adam.mccormick

      Can I create a reference property in my connector to another node in my connector? For example while building node A I want to add a REFERENCE property to node B which also exists in my federation. I tried creating a simple reference value from my known identifier of node B (as it would be built by my connector) but it seems ModeShape dose not hold the same ID for the node as my connector gives it (I assume it's a prefix to indicate that the node is federated and from which connector it came from).

       

      Is there a way to do this?

       

      Thanks,

      -Adam

        • 1. Re: Is it possible to create a reference from one federated node to another in a connector?
          hchiorean

          It's not something which we've tried afaik, so I can't say if it's supposed to work or not. In general, JCR operations support for federated/external nodes is limited really because there are a lot of constraints when dealing with those.

           

          In the case of reference properties, I would say off the top of my head that as long the internal node identifier is correctly (and fully) stored on the ref property, then they should work. Semantically I think that only WEAK and perhaps SIMPLE references make sense because HARD references would impose a referential integrity constraint on nodes which don't belong to the repository.

           

          So as long as you create the reference property via the ReferenceValueFactory (or ModeShape's ValueFactory extension), it should be able to resolve external nodes. If it doesn't and you can provide a test case which exposes this, please log a JIRA. Thanks.