How to prefetch a collections with no relations

Posts   
 
    
Aidan
User
Posts: 8
Joined: 20-Mar-2006
# Posted on: 20-Mar-2006 16:06:34   

Hi

I am designing as workqueue screen for my application and I need to display information from several tables in a gridview.

I have created a view in my database (SQL Server2000) named WorkQueueand I am populating it using the method WorkQueue.GetMulti() .

This covers 90% of the data I need however I also need to retrieve an additional collection for each row in the grid and display it..

Is there a way to prefetch this collection?

Thanks

Aidan

Posts: 1268
Joined: 10-Mar-2006
# Posted on: 20-Mar-2006 16:23:41   

Can you not define the relation in the GUI designer? Once you do that, you can do a normal prefetch.

Aidan
User
Posts: 8
Joined: 20-Mar-2006
# Posted on: 20-Mar-2006 17:04:29   

WayneBrantley wrote:

Can you not define the relation in the GUI designer? Once you do that, you can do a normal prefetch.

Hi Wayne,

I cant defien the relationship because its a 1:N relationship and the designed doesn't let me define a 1:N relationship on a view because a view doesn't have a primary key ....

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39928
Joined: 17-Aug-2003
# Posted on: 20-Mar-2006 17:34:13   

You can specify the PK field(s) for an entity mapped on a view in the designer as well simple_smile Just open the entity in the editor, select the field, and check the PK checkbox.

Frans Bouma | Lead developer LLBLGen Pro
Aidan
User
Posts: 8
Joined: 20-Mar-2006
# Posted on: 20-Mar-2006 18:22:00   

Otis wrote:

You can specify the PK field(s) for an entity mapped on a view in the designer as well simple_smile Just open the entity in the editor, select the field, and check the PK checkbox.

That solves my problem

Many Thanks !!!!

Aidan