-
1. Re: Many-to-Many Mappings with Extra Columns
aloubyansky Oct 21, 2002 2:57 AM (in response to stepan)You can't add extra fields to the table that is created to handle relationships.
If you have to do it, then, in CMP, you have to create one more entity bean and establish relationships between the three. But as you noted, currently, foreign keys can't be a part of primary keys. -
2. Re: Many-to-Many Mappings with Extra Columns
turalyon Mar 5, 2005 10:07 PM (in response to stepan)Would you recommend to switch to "bean managed relationship" in this case or is the extra CMP entity bean the way to go?
I wonder why this question is not asked more often, as i face the exact same problem.
I'm working on a document-management-sytem and i'm not sure about how to implement the Many2Many relationship between my entities "file" and "user". The only extra field i have to add would be "isVisible" to check whether a "file" that belongs to 1..n "user"s can be seen on that users public list of files.
Any comments on this architectural question will be appreciated.