Typedlist error

Posts   
 
    
Posts: 54
Joined: 22-Jun-2010
# Posted on: 23-Aug-2010 14:59:50   

LLBLGEN V 3.0 .net Framework 2.0 Oracle 9i/10g

Hi, I have created a typed list and getting error invalid identifier. I have created typedlist earlier also but never had such problem. I tried executing query in DB directly "SELECT BCLUB1868.AFFILIATEMEMBER.USAGECONTINIOUSDAY FROM BCLUB1868.AFFILIATEMEMBER" it works fine but in LLBLGEN getting error. I have attached stack trace

Attachments
Filename File size Added on Approval
stacktrace.txt 10,619 23-Aug-2010 15:02.15 Approved
Otis avatar
Otis
LLBLGen Pro Team
Posts: 39903
Joined: 17-Aug-2003
# Posted on: 23-Aug-2010 15:36:43   

Please show the code you're using to fetch the typed list.

Frans Bouma | Lead developer LLBLGen Pro
Walaa avatar
Walaa
Support Team
Posts: 14995
Joined: 21-Aug-2005
# Posted on: 23-Aug-2010 15:42:01   

The generated SQL is not correct as it doesn't conatin any relation (Join) to the AFFILIATEMEMBER table.

Posts: 54
Joined: 22-Jun-2010
# Posted on: 23-Aug-2010 15:49:40   

Otis wrote:

Please show the code you're using to fetch the typed list.

Here is the code

public static DataTable returnaffiliatemember(string affiliateclubno, string affiliatememberno) {

        var TlistAffiliateMember = new TlaffiliateMemberTypedList();

        var adapteraffiliatemember = new DataAccessAdapter();
        adapteraffiliatemember.FetchTypedList(TlistAffiliateMember.GetFieldsInfo(), TlistAffiliateMember, null, 0, null,true);
        DataTable DataTablesaffiliateclub = TlistAffiliateMember;
        return DataTablesaffiliateclub;
    }
Posts: 54
Joined: 22-Jun-2010
# Posted on: 23-Aug-2010 16:06:19   

yogesh_shtty wrote:

Walaa wrote:

The generated SQL is not correct as it doesn't conatin any relation (Join) to the AFFILIATEMEMBER table.

Dear Walaa, Attached project shows relationship exists

Well My stupid mistake. Just didnt add

var bucketaffiliatemember = new RelationPredicateBucket(); bucketaffiliatemember.Relations.Add( AffiliatememberEntity.Relations.AffiliateclubEntityUsingAffiliatememberclubno);

It is fine now