app-engine-ndb Questions
1
Solved
I am storing a key of an entity as a property of another in order to relate them. We are in a refactor stage at this point in the project so I was thinking about introducing ancestors.
Is there a p...
Swage asked 19/6, 2013 at 12:41
2
I've looked through the documentation, the docs and SO questions and answers and am still struggling with understanding a small piece of this. Which should you choose and when?
This is what I've r...
Narra asked 15/4, 2013 at 16:55
2
Solved
ReferenceProperty was very helpful in handling references between two modules. Fox example:
class UserProf(db.Model):
name = db.StringProperty(required=True)
class Team(db.Model):
manager_name ...
Sting asked 29/5, 2013 at 6:39
2
Solved
When I try to run a query on the datastore ordered by date I get the following error:
NeedIndexError: no matching index found.
The suggested index for this query is:
- kind: Message
properties:
...
Nolpros asked 22/4, 2013 at 1:5
1
Solved
After I post a new entity to the datastore, I redirect the page to a new URL that lists all of the entities in that group. When I redirect, the page shows stale results and I have to reload to see ...
Lattonia asked 2/4, 2013 at 20:37
1
Solved
Google App Engine's ndb provides a _post_put_hook(self, future), documented as follows:
Hook that runs after put()
To understand this hook better, I am wondering when self will differ from the re...
Platt asked 31/3, 2013 at 19:24
2
Solved
I have an application running on Google App Engine with python.
Model classes extend from ndb (google.appengine.ext.ndb) classes.
One of my views makes async calls to the database, something more ...
Gaffney asked 20/3, 2013 at 18:7
2
Solved
Say I have a picture gallery and a picture could potentially have 100k+ fans. Which ndb design is more efficient?
class picture(ndb.model):
fanIds = ndb.StringProperty(repeated=True)
... [other ...
Antichrist asked 13/3, 2013 at 4:30
4
Solved
I'm having a problem and I don't find any information about.
I define a field in my model like this.
class Dates(ndb.model):
...
date = ndb.DateTimeProperty(required = True) # I want to store d...
Starlet asked 19/2, 2013 at 11:18
2
Solved
We are currently building a small and simple central HTTP service that maps "external identities" (like a facebook id) to an "internal (uu)id", unique across all our services to help with analytics...
Descendent asked 14/2, 2013 at 15:25
1
Solved
NDB tasklets and yield are a great way to do async/parallel code. However, it is not quite clear from the documentation if this mecanism can be safely used with non-ndb async functions such as ima...
Ase asked 12/2, 2013 at 16:51
1
Solved
I'm in the process of moving my ndb codebase to async as much as possible where it makes sense. There is a scenario where I'm not quite sure how to proceed: transactions.
As I see it, I have 3 op...
Skeleton asked 12/2, 2013 at 3:10
2
I would like to hear your opinion about the effective implementation of one-to-many relationship with Python NDB. (e.g. Person(one)-to-Tasks(many))
In my understanding, there are three ways to imp...
Smiley asked 6/2, 2013 at 21:22
1
Solved
For the following (broken) function, I want to return True if the entity was created or updated, and False otherwise. The problem is that I do not know whether get_or_insert() got an existing entit...
Sansom asked 26/1, 2013 at 22:21
1
i have tried to make a backward paging, based on the example of google appengine documentation
NDB Query Cursor
my question is focused on this example:
# Set up.
q = Bar.query()
q_forward = q.or...
Agility asked 27/1, 2013 at 0:10
1
Solved
I switched to NDB for a new app, which as I understand includes memcache support 'for free'.
So I put an entity in the datastore:
class MyStorage(ndb.Model):
pickled_data = ndb.BlobProperty()
o...
Fluorene asked 18/1, 2013 at 15:4
3
Solved
I am trying to improve efficiency of my current query from appengine datastore. Currently, I am using a synchronous method:
class Hospital(ndb.Model):
name = ndb.StringProperty()
buildings= ndb....
Ticktacktoe asked 11/1, 2013 at 0:45
2
Solved
In old google appengine datastore API "required" and "default" could be used together for property definitions. Using ndb I get a
ValueError: repeated, required and default are mutally exclusive.
...
Depressant asked 9/1, 2013 at 8:30
1
Solved
How to I test for unset repeated properties in NDB after entity has been set?
The only reference I can find says:
Querying for a value of None on a repeated property has undefined behavior; don...
Fastidious asked 18/12, 2012 at 8:48
1
Solved
In app engine transactions documentation I have found the following note:
Note: If your app receives an exception when submitting a transaction,
it does not always mean that the transaction fai...
Dhow asked 6/12, 2012 at 9:39
1
Solved
Context:
My model classes inherit from a base class:
class BaseModel(ndb.model):
# commom fields and methods
class SpecificModel(BaseModel):
# specific fields and methods
Problem:
I want to...
Appetizing asked 26/11, 2012 at 19:11
1
Solved
I have two models: Members and Events. A member can participe in many events and in an event, there are many participants. I think about like this:
class Members(ndb.model):
event = ndb.KeyProper...
Weismannism asked 26/11, 2012 at 12:48
1
Solved
I'm trying to test a filter for the DateTimeProperty with App Engine's NDB but I have it set to auto_now?
Is there a way to get around this for unit testing?
Example:
class MyModel(ndb.Model)
t...
Suited asked 23/10, 2012 at 6:55
1
Solved
in my app i need to remove a few of my models properties.
i checked out this link but the first issue is that the properties are on a polymodel and there is no way im going to switch to an expando ...
Leff asked 2/10, 2012 at 16:40
2
Solved
I have a simple scenario where there is a User class which has the name, email and followers property.
class User(ndb.Model):
name = ndb.StringProperty(required = True)
search_name = ndb.String...
Esther asked 11/9, 2012 at 11:47
© 2022 - 2024 — McMap. All rights reserved.