I have a mapping like the bellow for a Candidate object:
References(x => x.Country).Column("CountryId").NotFound().Ignore()
the problem here is, if I select * Candidates I get a extra select for each of them, not a good thing, so I pull out the NotFound().Ignore() bit but now the following code fails with ObjectNotFoundException exception:
if (entity.Country != null)
{
bos.CountryName = entity.Country.Name;
}
Is there a way to force Hhibernate do the select when I compare County != null ?
Thank you,