Path: | doc/release_notes/4.48.0.txt |
Last Update: | Sat Jun 02 02:04:22 +0000 2018 |
Related to this, loading the sequel/adapters/utils/pg_types.rb file is now deprecated.
Use the Database instance accessors or Database options instead to change behavior.
Use the with_* methods which return a modified copy of the dataset instead of these mutation methods.
The Dataset#to_json method supports an :instance_block option, which should be a proc that will be passed to Model#to_json.
In order to implement this, Sequel.object_to_json now passes any block given to the to_json call on the object. If you are overriding Sequel.object_to_json, you are responsible for making sure the block is passed appropriately.
def foo(*a, **b) end foo(City.order(:id))
results in foo being called with a being [] and b being City.order(:id).to_hash, which is unexpected and undesired behavior. If you want to use keyword argument splats or other places where ruby will call to_hash implicitly if it is defined, using undef_method :to_hash is recommended.
Additionally, the dataset for such a model no longer uses a subquery, since there is no reason to do so as there is no join.