Display two entities in the same row

Posts   
 
    
sgm0369
User
Posts: 6
Joined: 18-Jan-2007
# Posted on: 18-Jan-2007 11:38:39   

Hi all, I am an absolute newbie in LLBLGenPro, and after some long docs/forum searches I decided to post my question here.

I have to build a financial software in which two tables are related 1:n (security -> orders). The two tables are located in different catalogs, but since I am using LLBLGenPro 2.0.0.0 Final I have no issue with it.

My issue is a bit different: I need to show the orders in an Infragistics grid, together with their corresponding security. And they have to be in the same row. I am able to show the orders itself (using Adapter), but I have to show all the security data rather than just the security's ID (PK in security table, FK in orders table). How am I supposed to do it?

Even worse, there may be some more entities that behave in the same way, (think currency of the security, state of the order, and so on).

Thanks in advance for your help.

Walaa avatar
Walaa
Support Team
Posts: 14995
Joined: 21-Aug-2005
# Posted on: 18-Jan-2007 14:56:05   

Either to use a TypedList, DynamicList to construct the dataTable you want to fetch and display.

Or if you want to stick with entities (entity collections) then you should use the LLBLGen Pro Designer to map those fields from the security table into the Order entity as Fields on Related Fields.

Regenerate the code, now the order entity contains fields mapped from the security entity.

Then by using a prefetchPath to the security entity when fetching Orders, these fields get loaded with data.

sgm0369
User
Posts: 6
Joined: 18-Jan-2007
# Posted on: 18-Jan-2007 17:22:18   

Walaa wrote:

Either to use a TypedList, DynamicList to construct the dataTable you want to fetch and display.

Or if you want to stick with entities (entity collections) then you should use the LLBLGen Pro Designer to map those fields from the security table into the Order entity as Fields on Related Fields.

Regenerate the code, now the order entity contains fields mapped from the security entity.

Then by using a prefetchPath to the security entity when fetching Orders, these fields get loaded with data.

Walaa,

many thanks for the tips. I'll try the "Fields on Related Fields" approach first. Love the product.