-
Hi, I'm using the version no. 9.0 for auditing with laravel version 5.1 & mongoDB as the database, in case of an array of object in one of my model, changes in this particular array field are not being captured. Below is the example array: "spoc" : [ Please help me get through this problem. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Having same issue have you fixed that one , I am unable to see array in old/new values |
Beta Was this translation helpful? Give feedback.
-
After searching and struggling what i got is 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. |
Beta Was this translation helpful? Give feedback.
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.