-
-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding updated_at
to $dontVersionable
results in error when calling diff()
#56
Comments
@mansoorkhan96 Please take a look. thanks. |
Please provide complete code examples to help us help you. Code examples can help us reproduce the issue. |
@overtrue Seems like there are two issues with snapshot.
|
@overtrue I think maybe this is happening because user aaded the DIFF strategy initially but then switched to Snapshot? So one version which was created using DIFF might have a few attributes and the other one created with Snapshot would ofcourse have all the $versionable attributes. So thats where the diff() method complains about not having attributes in hand. |
I am able to reproduce. |
ok, may be we can ignore this, or add some notes in readme. |
@overtrue I beleive there shouldnt be the DIFF strategy it should only be snapshot. which stores all attributes by default unless you specifiy $versionable. |
so, let's drop the strategy feature? ok? |
@overtrue yes that sounds good. plus a good mechanism to see if the changes are valid to create a new version. plus some strictness maybe. throw an exception if user is using both properties i.e $versionable and $dontVersionfields. They should be using either of them? If you want support both then maybe a way to get the intersection of both |
I don't really want to track
updated_at
, so I added it to the$dontVersionable
variable in the model, however when calling thediff()
method it gives me the following error:Full trace can be seen here: https://flareapp.io/share/Lm81QQJP#stack
The text was updated successfully, but these errors were encountered: