Include() not working

Include() not working

Postby haiduc32 » Thu 01 Sep 2011 09:21

Hi,
we started using dbMonitor lately and I've spotted that the Include() has no action. For example:
Code: Select all
Customer customer = context.Customers.Include("Orders").Single( ... );
Order order = customer.Orders.First();

will generate 2 selects in db instead of expected only one.

Is this a known issue, some flag we have to set?
haiduc32
 
Posts: 5
Joined: Mon 27 Jun 2011 09:44

Postby Shalex » Fri 02 Sep 2011 13:54

haiduc32 wrote:generate 2 selects in db instead of expected only one.

Do you mean the "Prepare: Select..." and "Execute: Select..." records in dbMonitor? These are two stages of a single select.
Shalex
Devart Team
 
Posts: 7377
Joined: Thu 14 Aug 2008 12:44

Postby haiduc32 » Fri 02 Sep 2011 14:03

hi,
to be more specific:
Code: Select all
Customer customer = context.Customers.Include("Orders").Single( ... );
//one select is done here on the Customers table
Order order = customer.Orders.First();
//one select is done here on the Orders table
haiduc32
 
Posts: 5
Joined: Mon 27 Jun 2011 09:44

Postby Shalex » Mon 05 Sep 2011 13:03

Could you please send us a small test project with the corresponding DDL/DML script to reproduce the issue in our environment?
Shalex
Devart Team
 
Posts: 7377
Joined: Thu 14 Aug 2008 12:44


Return to dotConnect for Oracle