Skip to content
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

MONGOID-4592 Add examples of using read_attribute and write_attribute to implement custom field behavior #5082

Merged
merged 2 commits into from Sep 14, 2021

Conversation

p-mongo
Copy link
Contributor

@p-mongo p-mongo commented Sep 13, 2021

@p-mongo p-mongo changed the title MONGOID-4592 read_attribute and write_attribute examples MONGOID-4592 Support the :local_default or :store_default option to fields, which defines a default value for document fields without persisting that value to the database Sep 13, 2021
@p-mongo
Copy link
Contributor Author

p-mongo commented Sep 13, 2021

@p-mongo p-mongo changed the title MONGOID-4592 Support the :local_default or :store_default option to fields, which defines a default value for document fields without persisting that value to the database MONGOID-4592 Add examples of using read_attribute and write_attribute to implement custom field behavior Sep 13, 2021
@comandeo
Copy link
Contributor

Regarding spec failure: this one is very flaky - https://github.com/mongodb/mongoid/blob/master/spec/mongoid/clients/options_spec.rb

I think we may want to either completely rewrite it or get rid of it, since counting connection on server side is not reliable.

@p-mongo p-mongo merged commit 2f4e08c into mongodb:master Sep 14, 2021
p-mongo pushed a commit to johnnyshields/mongoid that referenced this pull request Sep 22, 2021
* master:
  MONGOID-5151 Respect aliased fields in pluck/distinct by having Document.database_field_name recursively consider embedded docs (mongodb#5047)
  RUBY-2675 test coverage on the Mongoid side (mongodb#5030)
  MONGOID-4592 Add examples of using read_attribute and write_attribute to implement custom field behavior (mongodb#5082)
  MONGOId-5185 Remove tests for _id serialization (mongodb#5081)
  MONGOID-5103 Implement eq symbol operator (mongodb#5076)
  Fix MONGOID-5006 Link default auth source documentation to driver instead of incorrectly claiming "admin" is always the default (mongodb#5048)
  Create security policy following github's template (mongodb#5070)
p-mongo pushed a commit to johnnyshields/mongoid that referenced this pull request Sep 22, 2021
* master:
  MONGOID-5151 Respect aliased fields in pluck/distinct by having Document.database_field_name recursively consider embedded docs (mongodb#5047)
  RUBY-2675 test coverage on the Mongoid side (mongodb#5030)
  MONGOID-4592 Add examples of using read_attribute and write_attribute to implement custom field behavior (mongodb#5082)
  MONGOId-5185 Remove tests for _id serialization (mongodb#5081)
  MONGOID-5103 Implement eq symbol operator (mongodb#5076)
  Fix MONGOID-5006 Link default auth source documentation to driver instead of incorrectly claiming "admin" is always the default (mongodb#5048)
  Create security policy following github's template (mongodb#5070)
p-mongo pushed a commit to johnnyshields/mongoid that referenced this pull request Sep 23, 2021
* master: (26 commits)
  MONGOID-5128 Scoped associations (mongodb#5017)
  MONGOID-5005 - .sum, .count, and similar aggregables now ignore sort if not limiting/skipping (mongodb#5049)
  MONGOID-5098 Improve specs for timezone handling (specs only; no behavior change) (mongodb#5023)
  MONGOID-5151 Respect aliased fields in pluck/distinct by having Document.database_field_name recursively consider embedded docs (mongodb#5047)
  RUBY-2675 test coverage on the Mongoid side (mongodb#5030)
  MONGOID-4592 Add examples of using read_attribute and write_attribute to implement custom field behavior (mongodb#5082)
  MONGOId-5185 Remove tests for _id serialization (mongodb#5081)
  MONGOID-5103 Implement eq symbol operator (mongodb#5076)
  Fix MONGOID-5006 Link default auth source documentation to driver instead of incorrectly claiming "admin" is always the default (mongodb#5048)
  Create security policy following github's template (mongodb#5070)
  MONGOID-5131 Use proper mdb <-> ubuntu versions (mongodb#5067)
  MONGOID-5131: Set up build pipeline for outside contributors (mongodb#5043)
  MONGOID-5165 Fix documentation link (mongodb#5065)
  Fix indentation
  MONGOID-5029 #empty method should use an #exists? rather than a #count query (mongodb#5029)
  MONGOID-5177 Fix flaky contextual spec (mongodb#5064)
  MONGOID-5170 - Fix more typos mostly in code docs and code comments (mongodb#5056)
  MONGOID-5105 Allow block form in Mongoid::Association::EmbedsMany::Proxy#count  (mongodb#5060)
  MONGOID-5162 Add a release note for the planned changes in ObjectId#as_json (mongodb#5059)
  MONGOID-5171 - Make the minimum Ruby version 2.5 (mongodb#5058)
  ...
p-mongo pushed a commit to johnnyshields/mongoid that referenced this pull request Sep 23, 2021
* master:
  MONGOID-5128 Scoped associations (mongodb#5017)
  MONGOID-5005 - .sum, .count, and similar aggregables now ignore sort if not limiting/skipping (mongodb#5049)
  MONGOID-5098 Improve specs for timezone handling (specs only; no behavior change) (mongodb#5023)
  MONGOID-5151 Respect aliased fields in pluck/distinct by having Document.database_field_name recursively consider embedded docs (mongodb#5047)
  RUBY-2675 test coverage on the Mongoid side (mongodb#5030)
  MONGOID-4592 Add examples of using read_attribute and write_attribute to implement custom field behavior (mongodb#5082)
  MONGOId-5185 Remove tests for _id serialization (mongodb#5081)
  MONGOID-5103 Implement eq symbol operator (mongodb#5076)
  Fix MONGOID-5006 Link default auth source documentation to driver instead of incorrectly claiming "admin" is always the default (mongodb#5048)
  Create security policy following github's template (mongodb#5070)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants