Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8350449
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T08:19:34+00:00 2026-06-09T08:19:34+00:00

My datastore table is named document and has is structured in the following matter:

  • 0

My datastore table is named document and has is structured in the following matter:
Key, Write Ops, ID/Name, html, name.
Sample data is:

Key: aglub19hcHBfaWRyDgsSCGRvY3VtZW50GAEM 
Write Ops:6
ID/Name:1
html:"<div>something</div>
name: "Untitled name"

Where the first three columns are created by Google App Engine. I fetch the entities from datastore with the code below:

int PAGE_SIZE = 20;
DatastoreService datastore = DatastoreServiceFactory.getDatastoreService();
PreparedQuery queryString = datastore.prepare(new Query("document"));
int rowCount = queryString.countEntities();
int offset = 0;
//fetch results from datastore based on offset and page size
FetchOptions fetchOptions = FetchOptions.Builder.withLimit(PAGE_SIZE);
QueryResultList<Entity> results = queryString.asQueryResultList(fetchOptions .offset(offset));

A problem occurs when I try to retreive the Key column from entity with .getKey() method.
Instead of returning the random string from column Key it returns document(“1). Is there a way to get Keys from the results array?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T08:19:35+00:00Added an answer on June 9, 2026 at 8:19 am

    The key is not a “random string”. It’s a string encoding of the Key object.

    I use the Python API rather than the Java one, but in Python you can simply call str() on the Key instance to get the encoded version. In Java you might be able to use key.toString(), or you may need to serialize it in some way.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Anyone have sugestion or example on how displaying Google Datastore records table with pagination
I am using GAE's high replication datastore. I previously downloaded a table in csv
Assume a Cassandra datastore with 20 rows, with row keys named r1 .. r20
I have some problemas with Datastore. when i restart googleappengine all my data is
I need to use Fluent-nHibernate against a table with a composite primary key (Azure
Regarding the code lab here , how can we filter datastore data within the
So I have the following situation. I have a class DataTypes which has the
I am starting to write an application that will output an OpenOffice document. The
I am using this SELECT name FROM sqlite_master WHERE type = table AND name
In my application, we need to develop a FRIENDS relationship table in datastore. And

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.