I don't use JPA, but the way I understand it is that a get is by key which
can also be a batch get by key. Whereas a query, queries for the entity keys
using an index and then gets the entities by key.  So, the way I understand
it is below, but this is just my understanding so I could be wrong:

                                                HR DATASTORE
-------------------------------------------------------------------------------------------------------------------------
|                                              |
 CONSISTENCY SETTING           |
|              ACTION                    |               STRONG            |
        EVENTUAL     |
|-----------------------------------------------------------------------------------------------------------------------|
|  GET  BY KEY                       |               STRONG            |
   EVENTUAL      |
|  ANCESTOR QUERY              |               STRONG            |
 EVENTUAL      |
|  NON-ANCESTOR QUERY      |    EVENTUAL/STRONG     |        EVENTUAL      |
------------------------------------------------------------------------------------------------------------------------
* For non-ancestor query with strong consistency, the indexes are eventually
consistent but the entities should be strongly consistent (I think???).

Stephen

On Sun, Jul 10, 2011 at 5:36 PM, bejayoharen <[email protected]> wrote:

> Thank you, this is helpful, especially the links.
>
> I am using JPA and it's not clear to me what constitutes a "get" --
> does calling EntityManager.find() always constitute a "get" or only
> when the @Id of my class is the same as the underlying datastore key?
>
> Furthermore, the docs cited by Kyle indicate that a transaction will
> always return the most recently written data. However, that
> contradicts this
>
> http://code.google.com/appengine/docs/java/datastore/queries.html
>
> which says, "With the High Replication Datastore, non-ancestor queries
> are always eventually consistent."
>
> Which is it, are non-ancestor queries are always eventually
> consistent, or can transactions cause them to be strongly consistent?
>
> bjorn
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> 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 [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.

Reply via email to