Hi,

I think the tutorial 
http://struts.apache.org/2.1.6/docs/struts-2-spring-2-jpa-ajax.html is 
misleading(?).  In the PersonServiceImpl class, the method:

public void save(Person person) {
    if (person.getId() == null) {
        em.persist(person);
    } else {
        em.merge(person);
    }
}

has an error of 'The operator == is undefined for the argument type(s) int'.  
Because
the default value would be 0 per 
http://java.sun.com/docs/books/tutorial/java/nutsandbolts/datatypes.html.  I 
think it should be:
if (person.getId() == 0)

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org

Reply via email to