users@glassfish.java.net

Re: JPA ManyToOne relation problem

From: <glassfish_at_javadesktop.org>
Date: Mon, 25 Feb 2008 04:57:44 PST

@Stateless
public class ProductFacade implements ProductFacadeLocal {

    @PersistenceContext
    private EntityManager em;

    /** Creates a new instance of ProductFacade */
    public ProductFacade() {

    }

    public void edit(Product product) {

        em.merge(product);
    }

    public Productr find(Object pk) {

        return (Product) em.find(Product.class, pk);
    }

....................
When I set new Param collection for Product the old values still exist in database.
Where I wrong ?
[Message sent by forum member 'petka' (petka)]

http://forums.java.net/jive/thread.jspa?messageID=260708