Select returns object from db instead of instanciated one when using same type #1314
-
Hi, I wanted to query objects from the db and create copies of them, with just a few properties set. The goal is to reduce the data serialized.
The query below I expected to yield a list of objects with only A1 and A2 set
But it yielded the original objects stored in the db with all properties set. Once I change the query to:
it's working fine and I get objects the have A3 not set. Regards |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
Could you ease include the code for |
Beta Was this translation helpful? Give feedback.
-
sure, sry
_session is a lightweight session |
Beta Was this translation helpful? Give feedback.
-
@kinl99 Marten currently does not support fetching a subset/projected data using |
Beta Was this translation helpful? Give feedback.
@kinl99 Marten currently does not support fetching a subset/projected data using
Select
on the Queryable object but for the whole document. We would possibly look at this use case in 4.x timeframe.