Support for Laravel Array casts

XMLWordPrintableJSON

    • Type: New Feature
    • Resolution: Fixed
    • Priority: Unknown
    • 5.9.0
    • Affects Version/s: None
    • None
    • 5
    • Needed
    • Hide

      1. What would you like to communicate to the user about this feature?

      In the docs section on cast data types, theres a deprecation note:

      Starting in Laravel MongoDB v5.8, the array cast type is deprecated. Using array as a cast type stores attribute values as JSON-encoded strings in MongoDB, which is not the native BSON format. To learn more, including migration options, see Version 5.8 Deprecations.

      We should mention that starting 5.9, users can now use the {AsBsonArray} and {AsBsonDocument} casts instead. 

      2. Would you like the user to see examples of the syntax and/or executable code and its output? 

      Not needed.

      3. Which versions of the driver/connector does this apply to?

      >= 5.9.0

      Show
      1. What would you like to communicate to the user about this feature? In the docs section on cast data types , theres a deprecation note: Starting in Laravel MongoDB v5.8, the array  cast type is deprecated. Using array as a cast type stores attribute values as JSON-encoded strings in MongoDB, which is not the native BSON format. To learn more, including migration options, see Version 5.8 Deprecations. We should mention that starting 5.9, users can now use the {AsBsonArray} and {AsBsonDocument} casts instead.  2. Would you like the user to see examples of the syntax and/or executable code and its output?  Not needed. 3. Which versions of the driver/connector does this apply to? >= 5.9.0
    • None
    • None
    • None
    • None
    • None
    • None

      Expected: Add Support for Laravel Array casts.

      https://laravel-news.com/json-attributes-array-casts

      This is similar to our embedded relationships. Perhaps a good replacement.

              Assignee:
              Jérôme Tamarelle
              Reporter:
              Jérôme Tamarelle
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved:

                  Estimated:
                  Original Estimate - 1 week
                  1w
                  Remaining:
                  Remaining Estimate - 1 week
                  1w
                  Logged:
                  Time Spent - Not Specified
                  Not Specified