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 am trying to use a composite key as descibed in http://www.mindscapehq.com/documentation/lightspeed/Working-with-Legacy-Databases/Using-Composite-Keys (section Foreign Keys That Are Part of a Composite Key) In my case associated entity has an autoincremented Id.
ForeignKeyFieldAttribute is setted up
I've got an error during saving changes
Can't find where I'm wrong. Could you give me a clue? |
|
|
Can you post the code you are using in your ConsoleApplication? I have had a quick test here with this model but I am not running into any issues.
|
|
|
Thank you for quick responce. I've attached the whole project. |
|
|
Thanks - I have added a fix for the actual issue you are seeing here and this will be available in the next nightly build. That said you will still run into a problem because you are using identity based identifiers for Team and you are using Team.Id when creating your composite key prior to the key having been assigned so this will lead to an FK violation on insert. To correct this, you should do your insert like this:
|
|