Summary
Bulkrax::ValkyrieObjectFactory#convert_based_near_to_attributes was added before the generalized nested_attributes: true mapping flag existed. With the flag in place (#1193), the hardcoded translator can be retired in favor of a declarative mapping option.
Proposed steps
- Add a deprecation warning to
convert_based_near_to_attributes that fires when the translator actually runs and points users at the flag: "based_near translation via the hardcoded factory method is deprecated; declare nested_attributes: true in your based_near field mapping. This translator will be removed in Bulkrax 10.0."
- Update Bulkrax-shipped default mappings (and any test app/fixtures) to include
nested_attributes: true on based_near so they stop tripping the warning.
- Document the migration path in the README/wiki: any custom Bulkrax mapping for based_near should add
nested_attributes: true ahead of the next major release.
- In the next major Bulkrax release, remove
convert_based_near_to_attributes and the call site in transform_attributes.
Why now (a follow-up, not part of #1193)
The PR introducing the flag is intentionally scoped to "add the flag" so it can land cleanly. Migrating based_near is a behavior change for any adopter whose mapping doesn't yet declare the flag — keeping it separate gives that change its own discussion and release cadence.
Acceptance criteria
Summary
Bulkrax::ValkyrieObjectFactory#convert_based_near_to_attributeswas added before the generalizednested_attributes: truemapping flag existed. With the flag in place (#1193), the hardcoded translator can be retired in favor of a declarative mapping option.Proposed steps
convert_based_near_to_attributesthat fires when the translator actually runs and points users at the flag: "based_near translation via the hardcoded factory method is deprecated; declarenested_attributes: truein your based_near field mapping. This translator will be removed in Bulkrax 10.0."nested_attributes: trueon based_near so they stop tripping the warning.nested_attributes: trueahead of the next major release.convert_based_near_to_attributesand the call site intransform_attributes.Why now (a follow-up, not part of #1193)
The PR introducing the flag is intentionally scoped to "add the flag" so it can land cleanly. Migrating based_near is a behavior change for any adopter whose mapping doesn't yet declare the flag — keeping it separate gives that change its own discussion and release cadence.
Acceptance criteria
nested_attributes: truefor based_near.