views:

25

answers:

1

Can i have two entities in the same model , but in different entities groups, with the same key_name?

Thank

Joel

+1  A: 

Yes.

An entity is uniquely identified by its kind and name or ID, and that of its ancestors. Two entities in different groups will have different ancestry and different paths, even if they have the same kind and name.

Drew Sears
Thank you. And what about the key that is given to the entity by the datastore? the one I can use with db.get()?
Joel
What about it? Keys are not assigned by the datastore. They're just a representation of the information listed above, formatted as a protocol buffer, serialized to binary format, and base64 encoded. See the Key.from_path method for an example of building the key object from its path.
Drew Sears