Hi all,

In my Controller I have an attached Entity JpaPerson. Then I created a new
Organization and persisted this entity. As returned value I have an
attached Entity JpaOrganization . Now I just want to add this
JpaOrganization to JpaPerson using setOrganizations() and save the change.
It doesn't work because the list organizations in JpaPerson is null

@Override
    public List<Organization> getOrganizations() {
        return
ConvertingListProxyFactory.createProxyList(Organization.class,
organizations);
    }

    @Override
    public void setOrganizations(List<Organization> organizations) {
        if(this.organizations == null) {
            this.organizations = new ArrayList<JpaOrganization>();
        }
        this.getOrganizations().clear();
        if(organizations != null) {
            this.getOrganizations().addAll(organizations);
        }
    }

How can I resolve this problem?

Reply via email to