How to use queryover (Join) for same table...example

    if (!string.IsNullOrEmpty(ufResidencia) ||
        !string.IsNullOrEmpty(cidadeResidencia))
    {
        EnderecoProspect endPros = null;
        TipoEndereco tipoEnd = null;
        query
            .JoinQueryOver<EnderecoProspect>(x => x.Enderecos,()=>
endPros)
                .And(()=> endPros.Uf ==ufResidencia)
                    .JoinQueryOver<TipoEndereco>(x => x.TipoEndereco,
()=> tipoEnd)
                        .And(()=> tipoEnd.Descricao != "Fazenda");
    }

    if (!string.IsNullOrEmpty(ufFazenda) ||
        !string.IsNullOrEmpty(cidadeFazenda))
    {
        EnderecoProspect endPros1 = null;
        TipoEndereco tipoEnd1 = null;
        query
            .JoinQueryOver<EnderecoProspect>(x => x.Enderecos,()=>
endPros1)
                .And(()=> endPros1.Uf ==ufFazenda)
                    .JoinQueryOver<TipoEndereco>(x => x.TipoEndereco,
()=> tipoEnd1)
                        .And(()=> tipoEnd1.Descricao == "Fazenda");

    }
When I try to run I get the message that the path is duplicated. Im
using alias correct? what problem? havy ideal? exception is "duplicate
association path"

Help me please!

-- 
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/nhusers?hl=en.

Reply via email to