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 7557407
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T12:07:23+00:00 2026-05-30T12:07:23+00:00

Could you please tell me how I can make RequestFactory populate fields of my

  • 0

Could you please tell me how I can make RequestFactory populate fields of my entity proxy that are entity proxies too ?

Here is parent proxy

@ProxyFor(value = Organization.class, locator = PojoLocator.class)
public interface OrganizationProxy extends EntityProxy
{
    public String getName();
    public void setName(String name);
    public String getAddress();
    public void setAddress(String address);
    public PersonProxy getContactPerson();
    public void setContactPerson(PersonProxy contactPerson);
}

as you can see it contains another proxy as field. Here is how PersonProxy looks like

@ProxyFor(value = Person.class, locator = PojoLocator.class)
public interface PersonProxy extends EntityProxy
{
    public String getName();
    public void setName(String name);
    public String getPhoneNumber();
    public void setPhoneNumber(String phoneNumber);
    public String getEmail();
    public void setEmail(String email);
    public OrganizationProxy getOrganization();
    public void setOrganization(OrganizationProxy organization);
}

In my RequestContext interface I have method Request<OrganizationProxy> findOrganizationById(long id). DAO class that fetches real Organization from datastore sets its contactPerson field but in the client it’s always null. In fact RequestFactory never even calls Organization.getContactPerson().

My client call looks like this

createFactory().contextOrder().findOrganizationById(1).fire(new Receiver<OrganizationProxy>()
{
    @Override
    public void onSuccess(OrganizationProxy response)
    {
        if (response == null)
        {
            organizationProxy = orderRequestContext.create(OrganizationProxy.class);
            organizationProxy.setContactPerson(orderRequestContext.create(PersonProxy.class));
        } else
            organizationProxy = orderRequestContext.edit(response);

        // Copy the data in the object into the UI
        driver.edit(organizationProxy);
    }

    @Override
    public void onFailure(ServerFailure error)
    {
        createConfirmationDialogBox(error.getMessage()).center();
    }
});

What am I missing here ? Shall I do something somewhere manually ? Isn’t RequestFactory supposed to populate whole graph ?

  • 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-05-30T12:07:24+00:00Added an answer on May 30, 2026 at 12:07 pm

    Sorry but I found the answer. I should have RTFM.

    When querying the server, RequestFactory does not automatically
    populate relations in the object graph. To do this, use the with()
    method on a request and specify the related property name as a String

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

Sidebar

Related Questions

Could you guys please tell me how I can make the following code more
Could you tell me please, how can I make something like this: For example
Could someone please tell me how I can make the icon for my app
Could you please tell me how can one escape an apostrophe. I need it
Could someone please tell me what I am doing wrong here. I have compiled
Can you please tell me how can I make a simple connection with remote
Could you please tell me how make such clickable map? Is it possible to
Could anyone please tell me what the web developers can do with cloud computing,
Could someone please tell me why this <%= destroy_password_url @user.password_reset_token %> generates http://localhost:3000/api/destroy_password.4G5EoRVYMUAtiIKqOerKsw routes.rb
Could you please tell me what does @src stands for in action script 3

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.