You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Was it a desirable behaviour and is it the same across all other ORMs? In other words, is it the design decision?
The alternative is to call #save_changes, which will update only the changed columns. And that would be the expected behaviour by me.
So I can have the desired behaviour by calling
model.event
model.save_changes
.
I'd like to ask 2 questions:
Should the current behaviour be the default behaviour?
If yes, would it be possible to add a configuration parameter to change this bang behaviour for sequel? (E.g., sequel_bang_save_changes = true somewhere
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello the aasm maintainers and the other members of community!
I have a question regarding aasm behaviour with bang events with Sequel model
Currently, when you call
model.event!
, it updates all the fields of the entity, because it callsSequel::Model#save
https://github.com/aasm/aasm/blob/master/lib/aasm/persistence/sequel_persistence.rb#L32
Was it a desirable behaviour and is it the same across all other ORMs? In other words, is it the design decision?
The alternative is to call
#save_changes
, which will update only the changed columns. And that would be the expected behaviour by me.So I can have the desired behaviour by calling
.
I'd like to ask 2 questions:
Should the current behaviour be the default behaviour?
If yes, would it be possible to add a configuration parameter to change this bang behaviour for sequel? (E.g.,
sequel_bang_save_changes = true
somewhereWDYT?
Beta Was this translation helpful? Give feedback.
All reactions