views:

845

answers:

1

I have the following mapping class that requires the use of a composite id. The issue I am having is that the exposed related entities (OrganizationSurvey) and (Section) are both coming back as null. However, the entities do exist in their respective tables...

What am I not seeing or doing wrong..??

        public SectionResponseMap()
        {
            CompositeId()
                .KeyProperty(x => x.OrganizationSurveyID)
                .KeyProperty(x => x.SectionID);

            Map(x => x.Comments);
            Map(x => x.LastModified);
            Map(x => x.LastModifiedBy);
            Map(x => x.MarkedReviewQuestionCount);
            Map(x => x.RequireFeedbackQuestionCount);
            Map(x => x.RespondedQuestionCount);
            Map(x => x.Score);
            Map(x => x.SectionStatusCode);


            References<OrganizationSurvey>(x => x.OrganizationSurvey).Column("OrganizationSurveyID");
            References<Section>(x => x.Section).Column("SectionID");
        }

Thanks..!

+1  A: 

I think you should try to profile first, to see what's actually going on with db.

Nikolay R
You can also try to save mappings via xml. http://wiki.fluentnhibernate.org/Fluent_configuration#Exporting_mappings
Sly
Yep, profiling definetly helped... Put me on the right path to tracking down the real underlying issues. Actually had nothing to do with the mapping...
Jason
non-answer - and bad on you too Jason: you took the time to say what the problem wasn't but what it was. how does that help those that land on this q looking for something. even if it is what it isn't. lol.
Sky Sanders