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
|
When I update my LS model from my database, if any database column has a FK constraint to a table that's not in the model, the entity property for the column is not created as part of the entity class. I have a situation where some tables will not be included in my LS model, but I still want to have the corresponding ID columns for the classes that are included. I know I can create the mapping manually, but then every Update From Source command wants to delete my manually created field.
Is there a way to change this setting through configuration, or will I just have to live with it?
|
|
|
This isn't currently configurable: LightSpeed assumes that anything marked as a foreign key is going to be surfaced as an association rather than a field. You have two options (other than "live with it" *grin*): 1. Create the associated entities and just never use them. LightSpeed won't actually try to load them unless it needs them. The downside is that this clutters up the model and is confusing to maintenance programmers. 2. Code up the FK fields and properties by hand in a partial class. That way the designer won't know about them and will not try to delete them. This is cleaner but obviously makes it harder to understand the model through looking at the designer alone. |
|