Maulin, this is not a relation table (this is a 1..N relation) I got a table COMPANY with fields: - companyID (PK) - companyName - companyType - etc...
Then, i got a table COMPANY_EMAIL with fields. - email (PK) - companyID(PK and also a FK)
Note that i'm not really interested if this is the best database shema model, but on how to specifically model this situation with Entity CMPs.
Ye, i know i could change the database schema in this case (making only the email a PK), but i'm sure that situations like this may happen again and i might not be apple to change the database schema. That's way i'm looking for a solution for that.
If you need more information to help me, let me know.
Well, its not a problem. It happens as CompanyEmail is Weak entity. I have similar things dealt with as I had Rule and Condition objects where Condition was WeakEntity and ConditionKey must have RuleID in there..
I will let you know tomorrow what did I do there..