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
|
Hey guys, While working on a project, my domain model became a bit huge, so I decided to split it into separate files and use the entity linking feature. http://www.freeimagehosting.net/udsd7 (a fragment of my domain model) While writing unit tests of a repository, I started to get the following exception Mindscape.LightSpeed.LightSpeedException : Could not determine the reverse association of [UserInBillingEntity.User (User)]
at Mindscape.LightSpeed.Model.AssociationModel.(TypeModel )
at Mindscape.LightSpeed.Model.TypeModel.LoadFields(IEnumerable I'm not sure what's causing this, I'd apreciate some help. PS. Please note that I haven't updated LS in a while - so if this is a known issue that has already been fixed - I'll update. |
|
|
Make sure you have the entities which are linking to User set up as linked entities in the model file where User is actually defined. The code gen for the User class is presumably missing these associations and that is leading to the error you are seeing. Have a read through http://www.mindscapehq.com/documentation/lightspeed/Working-with-Models-in-the-Visual-Designer/Linked-Models for more detail about the steps you need to take when spanning associations across linked models.
|
|
|
Hey Jeremy, cheers for the reply, I'll try that, thanks. (edit) Ok, I think I understand now. Btw, doesn't that beat the purpose of splitting the model into separate files? Wouldn't it be possible to have the entity linking feature + associations without the step you've described? |
|
|
Its not ideal but unfortunately this is just a limitation with how we are able to code generate the model files so for now you will need to define the links within both models. If you dont have many entities spanning the boundary it makes more sense, but if you have a highly connected model you will probably find sticking to a single model more practical.
|
|
|
Yeah, my model was split into 5 files :/ I had to revert. This is going to the wishlist soon (tm) :P |
|