English 中文(简体)
2. 哪一条款载于《国家地图》
原标题:Where clause in nhibernate map
  • 时间:2010-06-03 09:43:54
  •  标签:
  • nhibernate

我有一个Nhibernate hbm,描述了许多关系。 数据库简明扼要,它使用袋子上的条款过滤合并表。

在我开始测试之前,这项工作顺利进行,我利用手提文件从制作的图表中建立一个数据库。 根子和用户栏是固定的。

在黑板档案中,我如何界定这两栏,从而在chem中产生?

最佳回答

这对我来说是可行的(如果你不喜欢描述,但我认为你应该了解这一想法)。 重要的是,要具体说明这两栏,否则就包括一列奇怪的栏目(阀,一行一行一栏),以放弃确切的名称,而不是我想要的栏目。

[Bag(0, Cascade = "all", Table = "item_hierarchy")]
[Key(1, Column = "child")]
[ManyToMany(2, ClassType = typeof(Item), Column="parent",NotFound = NotFoundMode.Ignore)]
public virtual IList<Item> Parent { get; set; }
问题回答

暂无回答




相关问题
nHibernate one-to-many inserts but doesnt update

Instead of getting into code, I have a simple question. Default behavior for a simple one-to-many is that it inserts the child record then updates the foreign key column with the parent key. Has ...

How Do I copy an existing nhibernate object as a new object?

I a persisted NHibernate object that I would like to repersist as a new entity. How do I get NHibernate to save this object as if it was a new? I am thinking I might create a session interceptor to ...

join across databases with nhibernate

I am trying to join two tables that reside in two different databases. Every time, I try to join I get the following error: An association from the table xxx refers to an unmapped class. If the ...

WPF - MVVM - NHibernate Validation

Im facing a bit of an issue when trying to validate a decimal property on domain object which is bound to a textbox on the view through the viewmodel. I am using NHibernate to decorate my property on ...

NHibernate Search in a List using ICriteria

I have my class X : public class ClassX { public virtual IList<ClassY> ListY { get; set; } ... } My ClassX mapping (using Fluent) ... HasMany<ClassX>(x => x.ListY ) ....

热门标签