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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T11:25:26+00:00 2026-06-08T11:25:26+00:00

I’m working on a GXT project using JPA for persistence, but I’m facing an

  • 0

I’m working on a GXT project using JPA for persistence, but I’m facing an issue with bidirectionnal relationship persistence.

I have those two Entities :

    @Entity
    @Table(name = "ACTV_REQ", catalog = "erpdb")
    @AttributeOverride(name = "id", column = @Column(name = "ID", nullable = false, columnDefinition = "BIGINT UNSIGNED"))
    @NamedQueries(value = { 
            @NamedQuery(name = "findByPerson", query="select object(m) from ActvReq m where m.people= :people")
    })
    public class ActvReq extends BaseEntity {
        @ManyToOne
        @JoinColumn(name = "PPL_ID")
        @NotNull
        private People people;

        @ManyToOne
        @JoinColumn(name = "ACTV_TYP_ID")
        private ActivityTyp actvTyp;

        @ManyToOne
        @JoinColumn(name= "PPL_ACTV_RIGHT_ID")
        private PeopleActvRight pplActvRight;

        @Column(name = "DESCR")
        private String desc;
    }

And :

    @Entity
    @Table(name = "PPL_ACTV_RIGHT", catalog = "erpdb")
    @AttributeOverride(name = "id", column = @Column(name = "ID", nullable = false, columnDefinition = "BIGINT UNSIGNED"))
    @PeopleActvRightBeanConstraint
    @NamedQueries(value = { 
            @NamedQuery(name = "findByPeople", query="select object(m) from PeopleActvRight m where m.people= :people")
    })
    public class PeopleActvRight extends BaseEntity {

        @ManyToOne
        @JoinColumn(name="ACTV_TYP_ID")
        @NotNull    
        ActivityTyp type;

        @ManyToOne
        @JoinColumn(name="PPL_ID")
        @NotNull    
        People people;

        @ManyToOne
        @JoinColumn(name="ACTV_RIGHT_ID")
        ActvRight actvRight;

        @OneToMany(mappedBy="pplActvRight",cascade=CascadeType.ALL)
        private List<ActvReq> actvRequests = new ArrayList<ActvReq>();
    }

(I did not copy getters and setters but thoses methods exists.)

For the persistence of ActvReqProxy, it’s basically done that way in my EditorPresenter :

    getRequestContext().persistAndReturn(getModel()).with("actvTyp","people","pplActvRight").fire(new Receiver<M>() {
        @Override
        public void onSuccess(M response) {
        unsetContext();
        onSaveSuccess( response );
        }       
    });

And the response pplActvRight is already null in the response I get, but in getModel() pplActvReqProxy is set.

On server side I’ve a service which calls the following method of my DAO :

    public ActvReq persistAndReturn(ActvReq entity){
        em.getTransaction().begin();
        em.persist(entity);
        em.close;
        return entity;
    }

And when I’m trying to persist a ActvReqProxy from my editor, using method with(“pplActvRight”,”people”,actvType”), I don’t get any errors, but in my DB the entity is not entirely persisted. I mean a new ActvReq is created in the DB but field PPL_ACTV_RIGHT_ID remains null. (It works fine for people and actvTyp)

EDIT : In fact I assume the problem is located on GWT Resolver in resolveDomainValue, it can not resolve the attribute pplActvRight. It’s as if my EntityProxy object doesn’t exists on server-side.

Any ideas?

  • 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-08T11:25:27+00:00Added an answer on June 8, 2026 at 11:25 am

    So at the beginning of persistAndReturn on server side it is already null? If so, then at least we know that it has nothing to do with JPA.

    And you’re sure that on client side it is set to something other than null on proxy before calling persistAndReturn? You can easily verify it: using Eclipse debugger it is possible to see JSON code to which proxy will be serialized (one of fields of proxy that you can see when you select proxy object in debugger). Please make sure that pplActvRight key is there with not-null value.

    If so, maybe you should debug GWT source code that translates proxies to server-side entities to check what is being done with that pplActvRight property (why isn’t it assigned to corresponding ActvReq server side instance). I can’t remember what the class name doing this stuff was but if you won’t be able to find it I can search it for you.

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

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I have a French site that I want to parse, but am running into
I have thousands of HTML files to process using Groovy/Java and I need to
I have two tables with like below codes: Table: Accounts id | username |
I have a .ini file as follows: [playlist] numberofentries=2 File1=http://87.230.82.17:80 Title1=(#1 - 365/1400) Example
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have just tried to save a simple *.rtf file with some websites and
I want to count how many characters a certain string has in PHP, but
I have a jquery bug and I've been looking for hours now, I can't

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.