Map foreign keys to ORM object

Hi-
I am doing reverse engg of database,after taking couple of tables[entities] into ERD, I am doing sync to classes…but the ORM objects which are getting generated are not having foreign keys as attributes.Means the ORM objects shows only those columns[as attribute] which are not having any foreign reference on the column.

So my question is how can I get the foreign key referenced column(s) also in the ORM objects, so I dont have to enter attributes manually in each ORM objects, and basically why the ORM object generation is missing FK attributes.

Thanks,

Samir.

Hi Samir,

The Foreign Key column is maintained by association, and not being handled as normal attribute.

Best regards,
Jick

Yes, agreed, but while doing a reverse engg of database, if that some tables are having composite PK’s, then relationship link shows objects name only, how ORM will aware that which attributes are of composite nature? as relationship never talks about attributes.
let me know.

Thanks,

Samir.

HI Samir,

Sorry, but we do not quite understand.

There is no difference between single and composite FK in object layer (java code). They are just different in database and will be handled transparently in ORM.

Best regards,
Jick