henkmollema / Dommel

CRUD operations with Dapper made simple.
MIT License
611 stars 99 forks source link

Insert does not work for dommel in postgres with table name - TableName #88

Closed himaanshugoyal closed 5 years ago

himaanshugoyal commented 5 years ago

"42P01: relation \\"specialistportfolios\\" does not exist"

My Table name is SpecialistPortfolios and dommel is not able to map automatically in insert postgres

henkmollema commented 5 years ago

What does that error mean? Does the relation exists?

henkmollema commented 5 years ago

@himaanshugoyal this might have to do with Postgres being lowercase by default. If you're using Dommel v2 you can use the [Table] attribute to explicitly specify the table name. For example:

[Table("specialistportfolios")]
public class SpecialistPortfolios 
{
    // ...
}
henkmollema commented 5 years ago

@himaanshugoyal I hope my suggestions works out for you. If not, please reopen this issue.