Hi everyone, I have a problem. I'm developing a new system but I need to use the existing database because the new system will run concomitant with the old one. I have two tables, "employees" and "orders". In "orders" there are "id_order"(PK), "id_employee"(FK), "id_stock_worker"(FK), "id_employee_comission"(FK), "id_employee_comission2"(FK) and "id_authorizer"(FK) columns. In "employees" there is an "id_employee"(PK) column. The thing is, all FK in "orders" table reference to "id_employee" of "employees" table.
My first question is: Which annotations do I use in the tables to map the hole thing?
My second question is: How do I persist the objects in order to specify to which column of "orders" table I'm putting the information?
Thanks
|