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
|
Explination: Hello, I am trying to find user contacts that have a matching uID with the user I am currently editing. I receive the following exception. Exception: MysqlException: Unknown column 'ct_user_contacts.Id' in 'field list' Code: public UserEditWindowModel(CtUser user)
{
this.model = user;
this.RaisePropertyChanged("Model");
var contacts = LightSpeedServices.Instance.GetUnitOfWork().CtUserContacts.Where(contact => contact.Uid == user.Id);
this.userContacts.AddRange(contacts); <-- ExceptionLine
}
|
|
|
It looks like CtUserContact.Uid is mapped to a column named "Id", but that column doesn't exist in the database. My guess would be that this column mapping is incorrect: try changing the Column Name setting on the Uid property. If this isn't the issue, we'd need to see the model, database schema and generated SQL. |
|
|
Ok so the CtUserContact.Id column was not bound. So when the linq statement tried to use the nonexistant ID column it threw the exception. Its all good now thanks for your help. |
|