Closed drstrangelooker closed 1 year ago
It looks like the before_save
method is getting called. The following works
# setup snipped
item1 = create(:item, :folder_id => folder[:id])
item2 = create(:item, :folder_id => other_folder[:id])
item3 = create(:item, :folder_id => folder[:id])
folder.refresh
item1 = MyApp::Model::DBItem.where(:id => item1[:id]).first
item2 = MyApp::Model::DBItem.where(:id => item2[:id]).first
item3 = MyApp::Model::DBItem.where(:id => item3[:id]).first
# tests snipped
It's expected that before_save
is called before saving. If you think there is an actual bug here, can you post a minimal self contained example showing it? As to why Sequel 4.49.0 operated differently, I couldn't tell you off hand.
Closing this now. If you do think this is a bug and can create a minimal self contained example, please post it here so I can review and potentially reopen.
I haven't had a chance to create a test case. When I do I'll reopen. Thanks.
On Thu, Nov 10, 2022, 7:12 PM Jeremy Evans @.***> wrote:
Closed #1961 https://github.com/jeremyevans/sequel/issues/1961 as completed.
— Reply to this email directly, view it on GitHub https://github.com/jeremyevans/sequel/issues/1961#event-7787966723, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACSDEENDWLNQNTKU5OD4MT3WHWFODANCNFSM6AAAAAAR35K7TA . You are receiving this because you authored the thread.Message ID: @.***>
I have a model pointing to a MariaDB 8.0 database.
My tests look like this...
This works fine with Sequel 4.49.0. It fails with 5.62.0.
When I look at why it is failing, some timestamps are differing.
In 4.49.0, I dump the values of the timestamps and get this
With the more recent version I get the following:
The
before_save
method foritem
does reference these columns:So it is possible that this is getting called now, but wasn't in the older version.
Any ideas?