tmsmith / Dapper-Extensions

Dapper Extensions is a small library that complements Dapper by adding basic CRUD operations (Get, Insert, Update, Delete) for your POCOs. For more advanced querying scenarios, Dapper Extensions provides a predicate system. The goal of this library is to keep your POCOs pure by not requiring any attributes or base class inheritance.
1.79k stars 586 forks source link

Reference Maps don't appear to use the mapped schema names. #297

Closed alongo-tr closed 2 years ago

alongo-tr commented 2 years ago

FWIW, I am unable to query joined tables since the mapped schema name is not prepended to the table name in the join statement. All the other mapped column names are added correctly, and the main table has the schema name prepended.

I don't see a way to add the schema here ... https://github.com/tmsmith/Dapper-Extensions/blob/a820fb8bd08db8619a32f318f496b6e10a22c379/DapperExtensions/Sql/SqlGenerator.cs#L369

It also seems that the GetTableName function is not being used for the joined tables, just the main table.

valfrid-ly commented 2 years ago

Hi @alongo-tr , how are your maps??

I already used joining the same table multiple times and it works but you need to define schema and table name in your map.