Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem wrong Object Mapper is used in query... #27

Closed
jogibear9988 opened this issue Aug 1, 2013 · 1 comment
Closed

Problem wrong Object Mapper is used in query... #27

jogibear9988 opened this issue Aug 1, 2013 · 1 comment

Comments

@jogibear9988
Copy link
Member

I've the following code:

 public static IQueryable<GlobalTaskExtendedDTO> GetGlobalTasksExtended(BLToolKitSessionWrapper<MFCV2DL> s)
    {
        var qry = s.Query<GlobalTaskDTO>();
        var qry2 = from g in qry
            join rp1 in s.GetTable<ResourcePointDTO>() on g.RPSourceId equals rp1.Id
            join rp2 in s.GetTable<ResourcePointDTO>() on g.RPDestinationId equals rp2.Id
            join res in s.GetTable<ResourceDTO>() on g.ResourceId equals res.Id
            select new GlobalTaskExtendedDTO(g) {RPSource = rp1.Name, RPDestination = rp2.Name, Labels = res.Labels};

        return qry2;
    }

where GlobalTaskDTO, ResourcePointDTO, ResourceDTO are Objects BLToolkit knows.

But GlobalTaskExtendedDTO is unkown to BLToolkit!

now the Problem ist, at query.cs in line 1108, bltoolkit trys to map the value res.Labels via the mapper of GlobalTaskExtendedDTO (wich it does not have)! It should use the mapper of ResourceDTO.

Any Idea whats going wrong here?

@jogibear9988
Copy link
Member Author

Sorry, wrong here, it's a BLToolkitProblem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant