Home
Help
Register
Log in

Search

 
   Active Threads  

You are here: Home > LLBLGen Pro > LLBLGen Pro Runtime Framework> ReturnsNewIfNotFound
 

Pages: 1
LLBLGen Pro Runtime Framework
ReturnsNewIfNotFound
Page:1/1 

  Print all messages in this thread  
Poster Message
mshe
User



Location:
Markham, Canada
Joined on:
02-Feb-2006 23:31:34
Posted:
167 posts
# Posted on: 10-Apr-2009 07:23:10.  
Hello Everyone,


How does ReturnsNewIfNotFound work?

I have an entity which has related fields mapped - all the fields have "RetunNewIfNotFound" set to true (Default Value).

However, some fields return nothing, others return an "new object".

How does LLBLGen determine when it returns a nothing vs. a new object?

I'm confused at the behaviour of ReturnsNewIfNotFound.

I'm running LLBLGen v2.6, Self-Servicing, October 6th, 2008 release.



  Top
mshe
User



Location:
Markham, Canada
Joined on:
02-Feb-2006 23:31:34
Posted:
167 posts
# Posted on: 10-Apr-2009 07:46:47.  
Hello,

It seems when I specify a prefetch path, nothing is returned for entities that are not found.

However, I have a single case where it's still returning a new element.

I'm a bit confused at the behaviour for ReturnNewIfNotFound.


  Top
Walaa
Support Team



Location:

Joined on:
21-Aug-2005 16:03:48
Posted:
14531 posts
# Posted on: 10-Apr-2009 09:34:27.  
Let's take a northwind example.
For the OrderEntity, it has a related CustomerEntity, and a related OrderDetails collection.

If both are prefetched and no records were found for both in the database that relates to this Order then the following should be true:

1- order.Customer = new CustomerEntity();
2- order.OrderDetails = new OrderDetailsCollection();
Also order.OrderDetails.Count = 0;

Would you please explain by example your findings?
  Top
Pages: 1  


Powered by HnD ©2002-2007 Solutions Design
HnD uses LLBLGen Pro

Version: 2.1.12172008 Final.