Objects and related entities

Posts   
 
    
Posts: 72
Joined: 11-Aug-2006
# Posted on: 29-Aug-2006 08:40:32   

Hi There

I need a bit of guidance for architecture and LLBLGEN Pro . I am a license holder.

I have an entity Order with related entities OrderSKU

I am using Stored Proc to update to keep logic in the DB for performance.

I have the following code..

( the first line could be called multiple times )

ActionProcedures.UpModifySkuqty(Order.Id, skuID, _roleName, Qty, false, false, false); ActionProcedures.UpRecalcOrder(_order.Id, true, _roleName); _order.Refetch();

Now the _order entity has related entity orderskus . How can I make _order retrieve the related orderskus entities freshly from the database.

Maybe there is a better way to do this?

Thanks Martin

Walaa avatar
Walaa
Support Team
Posts: 14983
Joined: 21-Aug-2005
# Posted on: 29-Aug-2006 09:04:08   

Use a prefetchPath to SKUOrders when you fetch the order entity. Or if you are using SelfServicing you may just relay on the Lazy Loading.

Please refer to the LLBLgen Pro docs for PrefetchPaths and Lazy Loading.