Click here to Skip to main content
15,891,253 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Trying join table process_log and table visit but didnt show a data
personal is the relationship column

mapping
C#
Table("process");
Id(x => x.process_date, "date");
Map(x => x.personal_id, "personal");
Map(x => x.exam_started_on, "started_on");

// Map(x => x.error_msg, "error_msg");
Join("visit ", v =>
{
    v.Fetch.Join();
    v.KeyColumn("personal");
    v.Map(t => t.record_id, "record_id");
});



C#
dateexameList = session.CreateCriteria<DateExamLog>()
            .Add(Expression.Eq("started", Examdate))
            .Add(Expression.Or(
                  Expression.Eq("personal", nric),
                  Expression.IsNull("personal")))
            .CreateCriteria("Patron", "patron", JoinType.LeftOuterJoin)
            .CreateCriteria("personal", "personal", JoinType.LeftOuterJoin)
            .List<DateExamLog>();


What I have tried:

I try google but can not find wat is worng
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900