persistence@glassfish.java.net

Self-referencing manytomany relationship

From: Benjamin Graf <Benjamin.Graf_at_gmx.net>
Date: Wed, 28 Jun 2006 13:30:30 +0200

Hi,

does anybody know how to implement a Self-referencing manytomany relationship? I tried this example:

@ManyToMany(cascade=CascadeType.ALL)
private Collection<BoEntity> relation;

But I got only a table boentity_boentity with one column id_relation. I think need something with two columns.

Can anybody help me?

Best regards
Benjamin
-- 
"Feel free" – 10 GB Mailbox, 100 FreeSMS/Monat ...
Jetzt GMX TopMail testen: http://www.gmx.net/de/go/topmail