3 Replies Latest reply on Sep 13, 2013 9:14 AM by rhauch

    weakreference will be reference while retrieve from JCR

    angelo.chen

      When i save a property use

           node.setProperty(name, value, type); if the type is weakreference while i retrieve it from jcr, it will be reference. Is it a bug?

       

      After investigate the code,

      Found class JcrValue treat the weakreferce and reference the same while persist.

       

      L294 miss PropertyType.WeakReference case

      L495

                  case PropertyType.REFERENCE:

                  case PropertyType.WEAKREFERENCE:

                      return factories().getReferenceFactory().create(value.getString());

      L529

                  case PropertyType.REFERENCE:

                  case PropertyType.WEAKREFERENCE:

                      return factories().getReferenceFactory().create(value);