Title: [JBoss-user] m:n relationship and relation tables
Hi,
I'm wondering where the relationship tables are stored.
normally also in the Database. How do you setup the CMP beans? With Xdoclet?
Then use @jboss.relation-mapping and @jboss.relation-table tags to specify
them (Afaik, the @jboss.relation-mapping is not even needed, when the setup
of the relation clearly shows that this is n:m).
 

* One poster can have several roles

*

* @ejb.relation name = "Poster-Roles"

* target-ejb = "Poster"

* target-role-name = "Poster-has-Role"

* role-name = "Role-of-Poster"

*

* @jboss.relation-mapping = "mapping-table"

*

* @jboss.relation-table table-name = "poster_role_map"

* create-table = "true"

* remove-table = "false"

*

* @jboss.relation related-pk-field = "uid"

* fk-column = "po_uid"

*

* @ejb.interface-method

* @return

*/

public abstract Collection getPosters();

Reply via email to