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 getting the following warning message when building my model: 'Model.Restriction.Attribute' hides inherited member 'Mindscape.LightSpeed.Entity.Attribute(string)'. Use the new keyword if hiding was intended. Do I need to rename my table, or is there a way around this? This error is flagged on a Property as follows: [System.Runtime.Serialization.DataMember] |
|
|
You can use Attribute as a table name, but not as a property name. Just rename the association property, e.g. to AppliesTo -- you can do this by clicking on the label at the Restriction end of the association arrow, or by editing the Backreference Name property of the association arrow in the Properties box. IMPORTANT: Changing the name of the association property will also change the name of the implicitly generated foreign key property (e.g. from AttributeId to AppliesToId). If you want to keep the column name AttributeID in the database, then you must also edit the Backreference Column Name setting, so that LightSpeed maps the AppliesToId property to the AttributeID column. |
|
|
Thanks for the clarification. Another weird interaction I didn't think about until getting into the meat of the project... |
|
|
I was / am a little confused by the second part of your statement. I could not find anything called "Backreference Column Name" in the properties, but I did find something called "Backreference Resolver" under the Mapping section, and "Column Name" under the Persistence section. Setting Mapping / Backreference Resolver to AttributeID didn't seem to do anything, that I could see, but setting Persistence / Column Name to AttributeID decorated the _appliesToId field with [Column("AttributeID")]. So, what is the correct way to do this? Persistence would seem to be the poorer choice by inference, but it seems to do the correct thing in the code. Thanks, Dave |
|
|
Yes, sorry. Column Name is what you want. Apologies for messing up the name. |
|