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 :) LightSpeed is proving great to work with and my models are growing larger, so I've just created my first linked model. I followed the instructions I found in a blog post - create a another model in my project, and change the name property of the new model to match the existing one I want it linked to. Easy. VS2010 spits out two errors: No dramas - changed the newly generated partial class to be public and problem 1 is solved. Removed the generatedcodeattribute from the newly generated partial class and problem 2 is solved. BUT, there's always a but, each time I save my model, the generatedcodeattribute always reappears e.g.
<System.CodeDom.Compiler.GeneratedCode("LightSpeedModelGenerator", "1.0.0.0")> _ and I have to change it to Public Partial Class GymDataUnitOfWork this is now proving to be a pain in the butt (cause I have to fix this before I can compile) ..... is there anything I'm not doing that I need to be? Or is it possible to change the generated code on linked models? Or any other suggestions? TIA, |
|
|
This sounds like there is more than one "primary" model in the project. Open each file, click on the background, and make sure that IsLinkedChild is set to False on one model and True on all the others. A set of linked models must contain exactly one primary model (non-child) model. (A quick way to check this is to do a right-click and Check Links on one of the models. If you get an error saying "The link set contains multiple primary models," that's your problem. This will also detect if you have gone too far and set all the models to be child models!) |
|
|
Spot on, thanks Ivan! That was my problem |
|