Missing foreign key field in Domain Model

24 Jun '17, 10:39 AM
2,741 Views
No Forum Badges

Hello.

I have an Oracle Database. Of course in each one to many association, there is table that has a field that is a foreign key on the other table.

When I do reverse engineering, importing the tables and the associations into the domain model, the fields that are foreign keys, are missing.

Is there a way to solve this problem?

I need that, for instance, when I have to show all the fields(even the foreign key) of a table in a list, using the binding. But in the display attributes page of course I can't select the missing field(s).

 
x 0
Follow
Answer Answer at this question and get points!
Forum Expert - Level 5

Hi Marcello,

the synchronization process is correct, the foreign key is assigned directly on the relationship created between two entity. In the Domain Model if you select a relationship, move its Properties View and open the "Mapping" tab you can see in teh "Columns" property the reference of the foreign key.

If you need to explicit this column, you can add an attribute on the entity that has the foreign key and do the manually mapping with the related column. Otherwise, you can create a derived attribute ("Simple Imported Attribute") that retrieves the key of the entity in relationship.

For more information you can see the follow Online Trainings on our learn related to the Domain Model:
- https://my.webratio.com/learn/learningobject/domain-model-overview
- https://my.webratio.com/learn/learningobject/defining-the-domain-model-v-72
- https://my.webratio.com/learn/learningobject/connecting-the-database
- https://my.webratio.com/learn/learningobject/extending-the-domain-model-derivation-v-72

 

Best regards

 
x 0
Answer at this question and get points!