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 two tables Users and Accounts. both are entities which User has a foreign key that references account. AccountId. At present I'm getting a: MySqlException Unknown column 'users.AccountId' in 'field list' I know it exists because when I come to creating a new Object of type User I can see AccountId appear on the select for that object, although what I am getting is Unknown column 'users.AccountId' in 'field list'. The accountId is of type int(11) in MySql in both Accounts and Users The code is as follows: Looks like the exception is happening @ u = uow.Users.FirstOrDefault(p => p.Login == _login); ------------------------------------------------------------- public iMed.User getUserByLogin(LightSpeedContext<iMedUnitOfWork> _devContext, Cheers Patrick |
|
|
Hi Patrick, Check that the column name is explicitely specified with exact casing. One way you can confirm this is to log the SQL statements that LightSpeed is sending to the database (by setting the Logger property on the LightSpeedContext) and then replay them yourself in MySqlWorkbench and it will give you more detail about any issues at a MySql level. If that is the case then you can set this within the designer by right clicking on the entity property AccountId and then setting the column name accordingly in the property pane.
Jeremy |
|