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, I've got a basic class table inheritance in my model. When I try to sync the model to the db it keeps wanting to delete the discriminator column from the db. Am i doing something wrong here? screenshot via support email...
cheers justin |
|
|
Only properties participate in database sync. To be synchronised correctly, the discriminator therefore needs to be represented as a property in the base class. Add a Type property to your base class. |
|
|
ah - that would explain it. have added Type property to model with generation set to field only. And now i can remove the _type field and pragma warning disable from the partial class. :) thanks |
|
|
... which reminds me why i did that in the first place. Now i get all these erroneous compiler warnings: warning CS0169: The field 'Model.BaseEntity._type' is never used
would be great if you could wrap the generated _type field in a pragma warning disable.... |
|