I’m running into a weird issue with my OrmLite table:
public class Floor
{
[AutoIncrement]
public int Id { get; set; }
[ForeignKey(typeof(Bank))]
[Alias(“BankId”)]
public int BankId { get; set; }
[Alias(“FloorDescription”)]
public string FloorDescription { get; set; }
[Alias(“FloorValue”)]
public string FloorValue { get; set; }
}
During an insert, everything works fine. However, during an update, the sql sends floor_description, floor_value, bank_id instead of the actual attribute names or even the aliases.
Why is the underlying translator sticking an underscore? I started experiencing this all of a sudden (It used to work…haven’t updated the libs either). I’ve even recreated all the tables. There are other tables using aliases and they work fine.
Also, I’ve also started to move from the combined DTO / Table pattern I was using.
Please provide the source code that has the issue and the resulting SQL if available. Also any non-default configuration you’re using.
Please note that with every issue the first thing we attempt is try to repro the issue locally, so we need any configuration/environment and the code we can run to try and repro the issue locally. e.g. A failing unit test (in a gist/repo/etc) would be ideal since it has everything we need to reproduce the issue (and doesn’t leave out any unknown assumptions).
Nick Karnik:
I’m not sure if it’ll be easy to give you source code that repros. The SQL statement was a simple update statement, but with the wrong column names.
I updated everything to the latest and recreated everything (like I did before) and it works fine now. Unfortunately, I’m not going to be able to provide a repro. If the latest fixes the issue, it’s good enough for me.
Thanks or your quick response Demis. I went down the upgrade path because I didn’t know when I’d get a response.