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 using the designer to create a one-to-one association between object Product & MSDSData. I then take the generated code and move it to a different .cs file (but same partial class names) so i can add a custom resolver to them and not have the designer over write my code everytime. For some reason it doesn't like the code I copied and pasted. It's giving me a "circular reference" error. However if I leave the code in the original .cs file linked to the .lsmodel file everything seems to be okay. Here's my code:
What am I doing wrong? Can someone please help this is urgen.. |
|
|
I assume you have set the association's Generation option to None. This affects all code generation for the association, including the foreign key field. So you need to copy the foreign key field into your partial class alongside the relevant EntityHolder. (Note that only one class will contain a foreign key field -- which class depends on the 'direction' of the one-to-one association.) |
|