Hello, to get started with using Objectify you should read through this walk-through on Storing Data with Objectify and Datastore <https://cloud.google.com/appengine/docs/standard/java/gettingstarted/using-datastore-objectify> as well as the Objectify Wiki <https://github.com/objectify/objectify/wiki>.
If you want to figure out what you're doing wrong with your classes, you should post their full code. This is best done by creating a question on Stack Overflow using one of the tags <https://cloud.google.com/support/docs/stackexchange> monitored by our community technical support team. On Wednesday, November 22, 2017 at 12:16:02 AM UTC-5, Azeem Haider wrote: > > I'm and new in objectify and datastore. I have three kinds 1-user, 2-post, > 3-feed user is parent of post and feed and feed contain Ref of post. > > > *Feed* > > > public class Feed { > @Id Long id;@Parent Key<User> userKey;Ref<Post> post; > > > *Post* > > > public class Post { > @Id Long id; > @Parent Key<User> userKey; > String content; > > > *Get Entity* > > > Key key = Key.create(User.class, 124); > Query query = ofy().load().type(Feed.class).ancestor(key); > > Feed feed = (Feed) query.list().get(0); > > out.print(feed.getPost()); // return > LiveRef(Key<?>(Post(4644337115725824))) > out.print(feed.getPost().get()); // return null > > > I want to get the content of Post. How can I do that ? Post is exist with > this id in datastore. > -- You received this message because you are subscribed to the Google Groups "Google App Engine" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/google-appengine. To view this discussion on the web visit https://groups.google.com/d/msgid/google-appengine/d5c11390-16f6-4bda-a94b-a99083eab29d%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
