Search code examples
javahibernategwtjparequestfactory

How to persist a hashmap (map) using gwt RequestFactory mechanism?


I've got a domain object named Person. This domain object has a map field which handles person relationship where key is the name of the targeted person and value is the Person object.

Here is the class:

public class Person 
{
    private String name;
    private Map<String, Person> relationships;

    public String getName() { return name; }
    public void setName(String name) { this.name = name; }

    @ManyToMany(...)
    @MapKey(name="name")
    public Map<String, Person> getRelationships() 
    { 
        return relationships; 
    }

    public void setRelationships(Map<String, Person> relationships) 
    { 
        this.relationships = relationships; 
    }
}

Using GWT RequestFactory mechanism, how to persist this map which is defined like it with hibernate ?


Solution

  • Hum... I think there's no way to do it... (but I'm opened to any workaround)

    An issue has been created here : http://code.google.com/p/google-web-toolkit/issues/detail?id=5524&q=requestfactory&colspec=ID%20Type%20Status%20Owner%20Milestone%20Summary%20Stars

    star it if you want these feature to be added.