English 中文(简体)
HiLo:如何控制 低价值
原标题:HiLo: how to control Low values

在我的S#rpArchitecture/NHibernate项目中使用HiLo发电机,Im从事大型进口批量。

我已经读到了某个地方,即有可能预测任何新记录的低价值,因为它们是客户产生的。 我认为,这意味着我能够控制低价值,或至少从某个地方夺去下一个低价值。

我想利用的是,我想与即将插入的其他实体建立关系。 这些问题尚未存在,但将在批量交易完成之前插入。

然而,我无法找到如何确定低价值或如何获得低价值的信息。

任何想法?

最佳回答

你们不需要预测任何东西来建立你们的关系。 它们是根据域模型而不是IDs确定的。

使用HiLo的好处是,这些身份证是客户(向您转口)的,因此维护工作单位(在流动/通勤之前没有行文),与身份不同,即时插入。

建议改为:http://fabiomaulo.blogspot.com/2009/02/nh210-generators-behavior-explained.html

问题回答

暂无回答




相关问题
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 ) ....

热门标签