This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
I have folowing class Question Entity
Test Entity
TestQuestion
TestQuestion entity have 2 foreign column, one from Test entity and other from Question Entity, how I can achive this scenario, please note, combination TestId and QuestionId from TestQuestion entity is always unique thx for your reply |
|
|
You will want to set up TestQuestion with a composite key (see: http://www.mindscapehq.com/documentation/lightspeed/Working-with-Legacy-Databases/Using-Composite-Keys) and then add the associations to Test and Entity. As those parts of the composite key are also the FK columns you will need to follow the guidance from the "Foreign Keys That Are Part of a Composite Key" section, so on those associations set the Key Property Reference field to be Id.TestId and Id.QuestionId accordingly.
|
|