Issue #3306: Disable serialization with Laravel "array" cast

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Unresolved
    • Priority: Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: Laravel
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      alanondra has created Issue #3306: Model `array` cast saved as string in laravel-mongodb. This Jira ticket was filed by GromNaN

      Issue Text:

      • Laravel-mongodb Version: 5.2.0
      • PHP Version: 8.2.27
      • Database Driver & Version: 6.0.20

      Description:

      Steps to reproduce

      1. Create Model with property in `casts` method defined as `array`
      2. Save Model
      3. Query Model from Collection in Studio 3T

      Expected behaviour

      I expected it to save as a MongoDB array.

      Actual behaviour

      It saved as a PHP string representation of an array.

      <details><summary><b>Logs</b>:</summary>
      Insert log.txt here (if necessary)
      </details>

              Assignee:
              Unassigned
              Reporter:
              TPM Jira Automations Bot
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: