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/d4fe5999-c0c2-48e2-af28-f1199e877c24%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
  • [google-appengine... Azeem Haider

Reply via email to