Hi -
Is it possible to query against a local column value if that column is the key in a mapped relationship?
i.e. Option contains
Code:
<many-to-one name="optionType" column="optionTypeId" not-null="false" />
I want all Options where Option.optionTypeId == 0. This should left-outer join the mapped OptionType (because in this database, 0 means record does not exist). Result would be Option with a null OptionType.
I've tried a number of things, but of course the Option.optionTypeId is not really a recognized field, independent its mapping. Should a SQLQuery be able to get around this? So far I have not gotten that to work.
Thanks for ideas.