And in most cases I personally still prefer what I call "soft references", ie. String properties with the path to the target node. This still requires the application to handle the reference, but it gives a much-more human-readable value, as a path in a well-defined content model is much more understandable than a UUID.
Regards, Alex On Fri, Oct 10, 2008 at 9:45 AM, Alexander Klimetschek <[EMAIL PROTECTED]> wrote: > On Fri, Oct 10, 2008 at 12:58 AM, Torgeir Veimo <[EMAIL PROTECTED]> wrote: >> Maybe a revision to the JCR standard might at some point adopt some >> convenience methods to make soft references a bit more transparent, doing >> the lookup implicit, throwing an exception if the node no longer exist? > > That's what the new type WEAKREFERENCE in JCR 2.0 is for. Citing > section 3.7.3 of the public review of JSR-283 [1]: > > A WEAKREFERENCE property is identical to a REFERENCE property > except that it does not enforce referential integrity. A call to > Property.getNode on a WEAKREFERENCE will throw an > ItemNotFoundException if no node exists in the same workspace > with the specified referenceable identifier. > > [1]: http://jcp.org/en/jsr/detail?id=283 > > Regards, > Alex > > -- > Alexander Klimetschek > [EMAIL PROTECTED] > -- Alexander Klimetschek [EMAIL PROTECTED]
