How to query java appengine datastore VIEWER for object using long id

I am trying to do something relatively straightforward and something that, in my opinion, I could do.

I am trying to use the admin interface to query my data store using a long identifier. The object in question is defined as:

@PersistenceCapable(identityType = IdentityType.APPLICATION, detachable = "true")
public class Notification
{   
    @PrimaryKey
    @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
    private Long notificationId = null;
}

In the datastore viewer in the appengine admin interface, I execute the following gql query:

SELECT * FROM Notification WHERE _key_ = KEY('Notification', 12345)
SELECT * FROM Notification WHERE id = KEY('Notification', 12345)
SELECT * FROM Notification WHERE notificationId = KEY('Notification', 12345)
SELECT * FROM Notification WHERE notificationId = 12345

None of these queries return any results or cause any errors. I am sure that the essence exists. Oh, of the ones I used, I just can't remember. Could this be due to a recent upgrade of appengine to 1.3.6?

+3
1

:

SELECT * FROM Notification WHERE __key__ = KEY('Notification', 12345)

, , .

+4

Source: https://habr.com/ru/post/1760362/


All Articles