Skip to content

Model changes not being traced in case of Array of Objects in case of MongoDB #792

Answered by aizaztag
Y003 asked this question in Q&A
Discussion options

You must be logged in to vote

After searching and struggling what i got is
Non-scalar values, such as arrays and objects, can be saved using the JSON data type. However, if the data is too large, it may exceed the maximum size of the JSON column in your database.

If you are unable to save non-scalar values using the package, you may consider creating a custom audit driver that uses a different data type to store the old and new values of the models. This will allow you to store non-scalar data in a way that is compatible with your database.

Another solution is to use a package that support saving non-scalar data by converting them to string representation before saving it.

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by erikn69
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #596 on March 13, 2023 20:43.