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
|
Hi In my Lightspeed model I have a table Artworks and a table Themes. Themes has a one-to-many association with Artworks. An artwork doesn't necessarily have to be assigned to a theme, but when I am adding test data into Artworks I get the error: "The INSERT statement conflicted with the FOREIGN KEY constraint "FK__Artworks__ThemeI..." etc etc. What sort of association should I be using in this case? Thanks! |
|
|
Changing the association's Nullable setting to True should do the trick. You may also need to check that the column is defaulted to NULL (i.e. there isn't an old "default to 0" constraint lying around), though I'm pretty sure we remove the old default if there is one. |
|
|
Thanks Ivan - all sorted. I had tried setting the Nullable setting to true but hadn't noticed the 0 default value. |
|