Skip to content

Commit

Permalink
Begin implementation of ndb.Model (googleapis#6581)
Browse files Browse the repository at this point in the history
Also 

- Fixing `repr()` of `Text/StringProperty`
- Adding coverage for `MetaModel.__repr__`

For now, reducing the functionality for `Model._set_projection`.
This is because a `StructuredProperty` is needed to really be able
to test / run `_set_projection` as written.

- Add a virtual `Model._put` so we can refer to it in docs
- Add a custom docstring for `Model.key`, since before Sphinx was
  trying to render the `ModelKey` docstring in the context of `Model`,
  which caused a failure of `.. automethod:: _validate`
  • Loading branch information
dhermes authored Nov 27, 2018
1 parent 16f3387 commit db2cc30
Show file tree
Hide file tree
Showing 3 changed files with 635 additions and 24 deletions.
3 changes: 3 additions & 0 deletions MIGRATION_NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,9 @@ The primary differences come from:
has new support for adding such a user to a `google.cloud.datastore.Entity`
and for reading one from a new-style `Entity`
- The `UserProperty` class no longer supports `auto_current_user(_add)`
- `Model.__repr__` will use `_key` to describe the entity's key when there
is also a user-defined property named `key`. For an example, see the
class docstring for `Model`.

## Comments

Expand Down
Loading

0 comments on commit db2cc30

Please sign in to comment.