I'm using 1.0.20051.60207, I found a case which cause prefetch path not fetch all the records in child table into child collection.
For example, I want to fetch a order with its order lines. I have the following data in database.
[Order:]
OrderNo: "SO0001__"
CustomerNo: "C01"
[Order Lines]
OrderNo: "SO0001__ "
LineNo: "1"
OrderNo: "SO0001__"
LineNo: "2"
OrderNo: "SO0001"
LineNo: "3"
_ is a space
Data type of OrderNo is a nvarchar( 8 ). Some data is inserted by a old system which is written by a old language, it would add space to my data if length of data is less than field length. In this case two space is added to "SO0001".
When I fetch data with new .Net system, by the following code, only the first two order lines (1 and 2) is fetched. I checked the sql statement generated by LLBLGen in sql profiler, it can fetch all 3 lines, but LLBLGen did not add line 3 into the collection. I think it may be problems of tailing space.
string orderNo = "SO0001";
IPrefetchPath2 prefetchPath = new PrefetchPath2((int)EntityType.SalesOrderEntity);
prefetchPath.Add(SalesOrderEntity.PrefetchPathDetails);
SalesOrderEntity salesOrder = new SalesOrderEntity(orderNo);
using (DataAccessAdapter adapter = new DataAccessAdapter())
{
adapter.FetchEntity(salesOrder, prefetchPath);
}