users@glassfish.java.net

Re: JPA Merge and Remove

From: <glassfish_at_javadesktop.org>
Date: Mon, 25 Jun 2007 12:37:17 PDT

Hi Marcel,

your relationship is a uni-directional OneToMany, which must be annotated @OneToMany. Uni-directional OneToMany relationships are mapped to a join table by default. After commiting

tx.begin;
em.merge(garage);
em.commit;
tx.close

the join table entry should be removed from the database.
[Message sent by forum member 'mf125085' (mf125085)]

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