Skip to content

8.0.0.rc1

Pre-release
Pre-release
Compare
Choose a tag to compare
@dchandekstark dchandekstark released this 02 Dec 18:42

Removed deprecated methods

  • ActiveFedora::SolrService.escape_uri_for_query (use Rsolr.escape)
  • ActiveFedora::SemanticNode.pids_from_uris
  • ActiveFedora::RDF::Indexing#prefix (use #apply_prefix)
  • ActiveFedora::RDF::Indexing.prefix

Default datastream "prefix" (preprended to solr field names):

  • ActiveFedora::Datastream#prefix returns "#{dsid.underscore}__" by default (was empty string) -- e.g. "desc_metadata__" for dsid "descMetadata".

Attribute setters

  • The setter for an attribute defined with multiple: true raises ArgumentError when given a scalar value:
    has_attributes :title, datastream: "descMetadata", multiple: true

    obj.title = "Test" # => ArgumentError
    obj.title = ["Test"] # OK
  • The setter for an attribute defined with multiple: false (a.k.a. "unique") raises ArgumentError when given an enumerable value (Array):
   has_attributes :description, datastream: "descMetadata", multiple: false

    obj.description = ["Testing ActiveFedora 8.0.0"] # => ArgumentError
    obj.description = "Testing ActiveFedora 8.0.0." # OK
  • The #attributes= method behaves consistently with the attribute setters -- i.e., raising ArgumentError when setting an attribute value inappropriately as outlined above.

Attributes reader

The #attributes reader method behaves consistently with the attribute readers -- i.e., returning scalar values for multiple: false and arrays for multiple: true attributes.