Search code examples
oracle-databaseoracle-adfjdeveloper

Oracle ADF many-to-many with additional attribute


I'm developing a ADF Fusion Web Application and have some problems with EntityAssociations and ViewLinks.

I have a database table Project with id, name etc. Also I have a table Technology which only contains a id and the name of the technology, for example "ADF". The relationship between theese two entities is many-to-many. Means one project can have multiple technologies assigned and inverse a technology can be assigned to multiple projects.

This relationship is described trough a join table named Project_Technology. Columns of this table are Project_FK, Technology_FK and Effort. Project_FK and Technology_FK are a composite primary key, Effort is an additional attribute.

Can someone explain me how to map EntityObject and ViewObjects that I can access the Effort, too? "Regular" many-to-many associations aren't that hard to implement but I am really struggling with the additional attribute.

Any help is appreciated. Thanks in advance!

Edit: I could solve my issues. See answer below for details.


Solution

  • I got it working. The Problem was the composite primary key on my join tables. It seems like ADF doesn't like them. I put a extra column ID on the join tables and now I can insert values by using the CreateInsert Data Controls.