You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When you call client.context() after you have already used a context, you get a fatal error:
Context is already created for this thread.
However, AFAICT, nested contexts are supported by NDB internally, and this seems to be just a check in client.context() that prevents this. Is there a reason for preventing nested contexts? If not, can this check be removed?
I want to use a client connected to a specific database through my app, but for some very local (deeply nested) operations, i want to connect to a different database for my data accesses. I would have a second client, and use a client.context() on this client before doing these operations, but this doesn't seem to be possible. I assume that I can create and use the Context object myself, but I wanted to understand why NDB prohibits this in the client.
The text was updated successfully, but these errors were encountered:
When you call
client.context()
after you have already used a context, you get a fatal error:However, AFAICT, nested contexts are supported by NDB internally, and this seems to be just a check in
client.context()
that prevents this. Is there a reason for preventing nested contexts? If not, can this check be removed?I want to use a client connected to a specific database through my app, but for some very local (deeply nested) operations, i want to connect to a different database for my data accesses. I would have a second client, and use a
client.context()
on this client before doing these operations, but this doesn't seem to be possible. I assume that I can create and use theContext
object myself, but I wanted to understand why NDB prohibits this in the client.The text was updated successfully, but these errors were encountered: