Inner join between two views

Posts   
 
    
SaX
User
Posts: 42
Joined: 29-Apr-2004
# Posted on: 26-Oct-2005 10:34:22   

How can I create a filter that would result in something like


Select view1.* from view1 inner join view2 on view1.Id = view2.Id

I need the inner join because I would like to filter on the columns from the view2

Version of the generator that we are using is 1.0.2004.2 Final (released 26.05.2005) and the code is generated using the Adapter scenario.

Walaa avatar
Walaa
Support Team
Posts: 14995
Joined: 21-Aug-2005
# Posted on: 26-Oct-2005 15:43:24   

Did you try to map those views to Entities? So you can define relation between them.

And then build your RelationPredicateBucket and pass it to the FetchEntity()

SaX
User
Posts: 42
Joined: 29-Apr-2004
# Posted on: 27-Oct-2005 10:32:55   

I can't do that because I already have all the views mapped in the LLBLGen as Typed views and they are used as datasource for the grids throughout the application. That would cause too many changes in the application so I'm looking for a different solution.

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39933
Joined: 17-Aug-2003
# Posted on: 27-Oct-2005 11:28:19   

You can add an EntityRelation object manually in code, see for details one of the generated Relation classes in the generated code.

To fetch the typedview data, you then use teh dynamic list syntaxis.

Frans Bouma | Lead developer LLBLGen Pro
SaX
User
Posts: 42
Joined: 29-Apr-2004
# Posted on: 27-Oct-2005 12:48:23   

You da Man simple_smile