Hi,

after playing around a little with the new linq provider I got into
trouble when trying to use Fetch/FetchMany in conjunction with Select
instead of ToList. As I have understood I should use FetchMany when I
want to eager load an association - which is exactly what I want to.

The following statement works fine and I get all persistent objects
(Config objects with a 1 to many association 'Boundaries'):
var configurations = session.Query<Config>.FetchMany(x =>
x.Boundaries).ToList();

But when I use Select in order to load just a subset of the persisten
data of the Config object I'll get a NotSupportedException thrown in
PolymorphicQuerySourceDetector::GetClassName(IASTNode querySource):
var configPocos = session.Query<Config>.FetchMany(x =>
x.Boundaries).Select(x => new ConfigPoco { ID = x.ID, Boundaries =
x.Boundaries, ... };

Any idea? Am I doing something wrong?

Martin

-- 
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/nhusers?hl=en.

Reply via email to