90
91
92
93
94
95
96
97
98
99
100
101
102
103
|
# File 'lib/pb/serializable.rb', line 90
def bulk_load(with: nil, **args)
with ||= ::Pb::Serializer.build_default_mask(__pb_serializer_message_class.descriptor)
with = ::Pb::Serializer.normalize_mask(with)
with = __pb_serializer_filter_only_computed_model_attrs(with)
primary_object_name = __pb_serializer_primary_model_name
if primary_object_name
(with[primary_object_name] ||= []) << true
elsif self < Serializer::Base
(with[:object] ||= []) << true
end
bulk_load_and_compute(with, **args)
end
|