sapiens / SqlFu

Fast and versatile .net core data mapper/micro-orm
Other
229 stars 50 forks source link

QueryOnly seems not to work #56

Closed bxbxbx closed 9 years ago

bxbxbx commented 9 years ago

According to the docs the QueryOnly Attribute should prevent write access of the column. But it seems that it also prevents the reading of the column, because in my case the columns is always null.

In the class ExpressionSqlBuilder in the method

public ExpressionSqlBuilder<T> WriteSelectAllColumns()

is the following line

if (_ti.Excludes.Contains(c)) continue;

This seems wrong to me. The accompaning test seems not to fail because of the unfortunate default value 0 of the column.

sapiens commented 9 years ago

If you're certain it's a bug, I'm accepting PRs

sapiens commented 9 years ago

Fixed in release 2.3.7