Ticket #307 (closed enhancement: fixed)
Provide 'key' attribute for GAE models
| Reported by: | thijs | Owned by: | |
|---|---|---|---|
| Priority: | critical | Milestone: | 0.4 |
| Component: | Adapters | Version: | 0.3.1 |
| Keywords: | google-app-engine, review | Cc: | marceloverdijk, fernandoacorreia@… |
Description (last modified by thijs) (diff)
GAE models get automatically a 'key' assigned by GAE's datastore API.
In a Flex app you might need this key to update records. Currently that key is not send to the Flex client because it's a method on the model class. It should become a attribute called 'key' containing the available properties etc.
Use case:
def getCurrentUser(): u = GqlQuery("select * from AppUser where googleU = :gu", gu=users.get_current_user()).get() if u == None: u = Models.AppUser( googleU = users.get_current_user()) u.put() #setting the id this way doesn't work either.... #u.id = u.key().id() return u
MailingList references:
Attachments
Change History
Note: See
TracTickets for help on using
tickets.
