-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Closed
Description
I have a SQLite table
create table cars (
id integer primary key,
name text,
data text);Where data is a large clob and do not want to read it in every query. I have a class
public class Car
{
[Key]
public long Id { get; set; }
public string Name { get; set; }
}And read a Car by the Dapper.Contrib query
connection.Get<Car>(id);It generates the SQL query
select * from cars where Id = @idIt's is not optimal, since the data column (large) is fetched too, and never used. I would expect the query
select t.id, t.name from cars t where Id = @idI.e specify the columns in the select clause. The GetAll() method should has to be changed, too. (IMHO no ORM should use select * in it's core functions.)
Note: the [Computed] columns has to be omitted, too. With [Computed] the Dapper.Contrib Get query reads the column, but Update, Insert wont change the [Computed] column.
Metadata
Metadata
Assignees
Labels
No labels