I'm not using entity groups (in this case) because the entity/db.Model
instance that I'm constructing doesn't have a reasonable ancestor.
There will be too many of them to put under any of the db.Model
instances that I'm using to build the key_name, let alone to put under
a single root.
The db.Model instance that I'm creating will not be used to create
other keys. The other db.Model instances whose Keys() I want to use
to create the key_name are likewise either root entities or at a very
short depth in an entity dag.
I'd assumed that the length of a db.Model instance's db.Key().name()
was a constant plus a linear function of the depth the entity in its
entity group.
If my assumption is true, the key_names that I'm planning to construct
will have bounded length. If the db.Key() s constructed by the dev
environment are the same length as those in the production
environment, I should be able to figure out whether said bounded
length is less than the max length of a key_name.
On Oct 15, 2:19 pm, "Marzia Niccolai" <
ma...@google.com> wrote:
> Hi Andy,
>
> I believe there is a limit on key names of 500 bytes, but I can't seem to
> find it in the documentation.
>
> I think the question I have is there a reason you are not using entity
> groups? When using entity groups you can use Key.from_path() to construct
> key objects from the ancestor path:
http://code.google.com/appengine/docs/datastore/keyclass.html#Key_fro...
>
> This way you don't need to build up longer and longer key names.
>
> -Marzia
>
>
>
> On Wed, Oct 15, 2008 at 2:03 PM, Andy Freeman <
ana...@earthlink.net> wrote:
>
> > I'd like to construct a key_name (for get_or_insert) by concatenating
> > the name() s of a couple of db.Key s.- Hide quoted text -
>
> - Show quoted text -