Closed
Description
Hi,
the following mapping fails because of the id column:
public class ArticleMap : ClassMapping<Article>
{
public Article()
{
Id(x => x.Id, x => x.Column("Id"));
Property(x => x.Name);
Property(x => x.Description);
ManyToOne(x => x.Dimensions, map => map.Name("Id"));
}
}
If i change it to:
public class ArticleMap : ClassMapping<Article>
{
public Article()
{
Id(x => x.Id, x => x.Column("Id"));
Property(x => x.Name);
Property(x => x.Description);
ManyToOne(x => x.Dimensions, map => map.Name("ID"));
}
}
it works for SELECT but for UPDATE and INSERT, the behavior is strange.
The generated INSERT command is: INSERT INTO Article (Name, Description, ID, Id) VALUES (?, ?, ?, ?)
.
The generated UPDATE command is: UPDATE Article SET Name = ?, Description = ?, ID = ? WHERE Id = ?
.
Many greetings,
heikar