Skip to content
This repository has been archived by the owner on Sep 16, 2022. It is now read-only.

appengine.Namespace #33

Closed
gertcuykens opened this issue Jul 7, 2014 · 3 comments
Closed

appengine.Namespace #33

gertcuykens opened this issue Jul 7, 2014 · 3 comments

Comments

@gertcuykens
Copy link

Can this be implemented in endpoints?

When I do the following my datastore index breaks

c := endpoints.NewContext(r)
c2, err := appengine.Namespace(c, "")
if err != nil {return err}

filtered or ordered queries do not work anymore on appspot.com they only work on localhost:8080

@x1ddos
Copy link
Contributor

x1ddos commented Aug 19, 2014

@gertcuykens are you still seeing this issue? If so, could you test your case using standard handler w/o go-endpoints and see if it replicates. Please, let me know.

@gertcuykens
Copy link
Author

Yes still have issue, going to try to use standard appengine but almost certain it wil work when using appengine. Note that using Namespace the type get cast from endpoints.Context to appengine.Context. That can't be good I think :) Thats why I think it needs a separate endpoints.Namespace implementation.

(http://stackoverflow.com/questions/24595487/my-datastore-has-no-index-entries-on-appspot)

@x1ddos
Copy link
Contributor

x1ddos commented Aug 22, 2014

Here's appengine package function that creates a namespaced context:
https://code.google.com/p/appengine-go/source/browse/appengine/namespace.go?spec=svn2057380fe32fd44e14be5a2e39706889971c428b&r=2b13db16010258321632f5e7c6b7c178e4e4da22#17

appengine.Namespace() will return a namespacedContext which preserves the original context c.

It's really simple and doesn't look like go-endpoints has to do anything with the issue. Please, try w/o go-endpoints and see if there's any difference.

@x1ddos x1ddos closed this as completed in e866591 Oct 7, 2014
@x1ddos x1ddos removed the need-info label Oct 13, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants