FindMatches problem

Posts   
 
    
Posts: 14
Joined: 13-Apr-2009
# Posted on: 10-Dec-2009 16:04:10   

I have following code:

foreach (String recEmitida in m_listaRecEmitidas) { ChaveRecomendacao chaveEstrut = new ChaveRecomendacao(recEmitida);

            List<Int32> indices = col.FindMatches(ZRecomendacoesSignificadosFields.Idrecomendacao == chaveEstrut.ChaveExtenso);
            if (indices.Count == 0) continue;

            retorno.Add(chaveEstrut.EntrePar, col.Items[indices[0]].Significado);
        }

ZRecomendacoesSignificadosFields.Idrecomendacao is a String field. For all cases indices.Count is equal to zero but this is not the logical result, what could be wrong (col.Count is greater then zero)?

Regards

Desbaratizador

MTrinder
User
Posts: 1461
Joined: 08-Oct-2008
# Posted on: 10-Dec-2009 21:07:33   

Case sensitivty leaps to mind as the obvious problem as you are using string fields - is this a possiblity ?

Matt

Posts: 14
Joined: 13-Apr-2009
# Posted on: 11-Dec-2009 19:13:42   

Strange...

Getting the entities one by one using the class constructor works even with the same string value...

ZRecomendacoesSignificadosEntity recSignif = new ZRecomendacoesSignificadosEntity(chaveEstrut.ChaveExtenso);

daelmo avatar
daelmo
Support Team
Posts: 8245
Joined: 28-Nov-2005
# Posted on: 12-Dec-2009 02:52:40   

Please tell us these things to try to reproduce your problem:

David Elizondo | LLBLGen Support Team