在我的S#rpArchitecture/NHibernate项目中使用HiLo发电机,Im从事大型进口批量。
我已经读到了某个地方,即有可能预测任何新记录的低价值,因为它们是客户产生的。 我认为,这意味着我能够控制低价值,或至少从某个地方夺去下一个低价值。
我想利用的是,我想与即将插入的其他实体建立关系。 这些问题尚未存在,但将在批量交易完成之前插入。
然而,我无法找到如何确定低价值或如何获得低价值的信息。
任何想法?
在我的S#rpArchitecture/NHibernate项目中使用HiLo发电机,Im从事大型进口批量。
我已经读到了某个地方,即有可能预测任何新记录的低价值,因为它们是客户产生的。 我认为,这意味着我能够控制低价值,或至少从某个地方夺去下一个低价值。
我想利用的是,我想与即将插入的其他实体建立关系。 这些问题尚未存在,但将在批量交易完成之前插入。
然而,我无法找到如何确定低价值或如何获得低价值的信息。
任何想法?
你们不需要预测任何东西来建立你们的关系。 它们是根据域模型而不是IDs确定的。
使用HiLo的好处是,这些身份证是客户(向您转口)的,因此维护工作单位(在流动/通勤之前没有行文),与身份不同,即时插入。
建议改为:http://fabiomaulo.blogspot.com/2009/02/nh210-generators-behavior-explained.html
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 ...
Given the following Fluent NHibernate maps: public class FastTrackPackageClassMap : ClassMap<FastTrackPackage> { public FastTrackPackageClassMap() { Id(x => x.Id); ...
I had a scenario in Oracle where i need to match a substring part of column with a list of values. i was using sqlfunction projection for applying the substring on the required column, and added that ...
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 ...
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 ...
I have two associated business objects - A and B. the association is (A->B)many-to-one, with B.Id a foreign key in A (so A has A.B_id in the DB). I m using lazy=true and solved most of my problems, ...
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 ...
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 ) ....