GeoTools
  1. GeoTools
  2. GEOT-2376

FeatureStore.modifyfeatures should take a Name[], not a AttributeDescriptor[]

    Details

    • Type: Improvement Improvement
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.5.3
    • Fix Version/s: 2.7-M0
    • Component/s: main
    • Labels:
      None

      Description

      Taking a full AttributeDescriptor[] is unecessary and dangeours, as the user provided descriptor might be inconsitent with the ones declared by the datastore, e.g., they could have different constraints, different metadata or different bindings. The methods should just take enough information to locate the attributes that need updating, and eventually throw an exception if the attribute is not found in the schema.

      Not scheduling for the short term, but sure this looks like a design mistake that needs fixing at our next iteration of datatore improvements.

        Activity

        Hide
        Jody Garnett added a comment - - edited
        I agree; this is the same trouble of mixing Query and Metadata we had when Filter required an AttributeType.

        Going to prepair a patch for 2.6.x as this really does look to be a mistake.
        Show
        Jody Garnett added a comment - - edited I agree; this is the same trouble of mixing Query and Metadata we had when Filter required an AttributeType. Going to prepair a patch for 2.6.x as this really does look to be a mistake.
        Hide
        Jody Garnett added a comment -
        Attach patch allows features to be modified by Name (rather then forcing the user to look up an AttribtueDescriptor with the added risk of possibly getting it wrong)
        Show
        Jody Garnett added a comment - Attach patch allows features to be modified by Name (rather then forcing the user to look up an AttribtueDescriptor with the added risk of possibly getting it wrong)
        Hide
        Andrea Aime added a comment -
        I guess that for DataStore we do want a String[] as well (just saying).

        Jody, all of these patches do require a GSIP (possibly a separate one) and might be affected by the issue of patches porting (as in, when is the best time to apply these changes?)
        Show
        Andrea Aime added a comment - I guess that for DataStore we do want a String[] as well (just saying). Jody, all of these patches do require a GSIP (possibly a separate one) and might be affected by the issue of patches porting (as in, when is the best time to apply these changes?)
        Hide
        Jody Garnett added a comment -
        As of -r35320

        No surprises while implementing; note jdbc-ng patch switches over to subclasses working with Name rather then AttributeDescriptor; and could probably be further simplified.
        Show
        Jody Garnett added a comment - As of -r35320 No surprises while implementing; note jdbc-ng patch switches over to subclasses working with Name rather then AttributeDescriptor; and could probably be further simplified.

          People

          • Assignee:
            Jody Garnett
            Reporter:
            Andrea Aime
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: