Strange, your code works fine for me.  This also works for me:

    class Test(db.Model):
      pass

    t_key = Test().put()
    t_id = t_key.id()
    print type(t_id), t_id

    t = Test.get_by_id(t_id)
    print str(t.key())


Robert





On Thu, Jun 23, 2011 at 00:39, gwstuff <gwsa...@gmail.com> wrote:
> Hi,
> I am having trouble getting get_by_id working on the latest version of
> dev_appserver. Is anyone else facing this issue with the latest release?
> Input (on the interactive console):
> from db.note import Note
> n = Note.all()[0]
> i = n.key().id()
> print i
> print Note.get_by_id(i)
> Output:
> 3
> None
>
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/google-appengine/-/m7PrC_1KLQgJ.
> To post to this group, send email to google-appengine@googlegroups.com.
> To unsubscribe from this group, send email to
> google-appengine+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/google-appengine?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.

Reply via email to