Uploaded image for project: 'Tupelo'
  1. Tupelo
  2. TUP-433

Clients who specify the RDF type as a property in their bean can munge the state of their beans

XMLWordPrintableJSON

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • 2.5
    • 2.4.3, 2.5
    • Beans
    • None

      The bean session manages the RDF types, which are multi-valued.

      If a user specifies a mapping and a single-valued property with predicate RDF.TYPE, then

      • saving the bean works, since ThingSession preserves multiple values.
      • fetching the bean after a save, however, will invoke Thing.getValue() which is single-valued. One of the RDF types will be selected at random (as per contract)
      • saving the bean replaces all the RDF types with the single value.

      (Thanks to Shawn, who discovered this.)

      At issue is the fact that RDF type is managed especially as a multi-valued type. The implementation, however, does no checking for setValue(Rdf.TYPE, xxx).

      Solution:

      • make the appropriate note in the documentation for Thing.setValue, Thing.addValue that there are specific calls for managing the type and to use those.
      • have BeanMappings refuse to accept property with predicate of Rdf.TYPE.

              jgaynor Jeffrey Gaynor
              jgaynor Jeffrey Gaynor
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: