开发者

Fluent NHibernate : References a null

The title may be confusing so ill try to elaborate. I have a business object that tracks time for either a manifest or an office. So in my database i have two columns, both are nullable, but only one can be not null. In my mapping i have

References(x=>x.Manifest, 开发者_如何学运维"ManifestId").Cascade.All();
References(x=>x.FieldOffice, "FieldOfficeId").Cascade.All();

Which is causing an error. My question then is this: Is it possible to map this way if the foreign key is null?

Sorry if this is confusing. :S


Figured it out. Nmind.

References(x=>x.Manifest, "ManifestId").Nullable().Cascade.All();

was doing it in the wrong order.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜