I posted the question in the Fluent-NHibernate newgroup but so far there has been no answer from the void.
Is there a Fluent NHibernate mapping for the NHibernate "trigger-identity" method of generating primary keys.
Thanks
I posted the question in the Fluent-NHibernate newgroup but so far there has been no answer from the void.
Is there a Fluent NHibernate mapping for the NHibernate "trigger-identity" method of generating primary keys.
Thanks
Just to keep this discussion up-to-date :
this.Id(x => x.Id, "id").GeneratedBy.TriggerIdentity();
-> Fluent NHibernate V.1.1.0.685
Try this:
this.Id(x => x.Id).Column("ID").GeneratedBy.Custom("trigger-identity");
So it turns out that trigger-identity is not currently supported.
So far, the only solution I ve found is to use an hbm.xml file for those entities that require trigger-identity generators. However, we ran into another problem when using trigger-identity and "long" ids and our Oracle database . There is a bug where NHibernate does not translate the Id values returned from properly. Here is the JIRA entry:
I have tried with FluentNHibernate v2.0.50727
Following mapping works fine: this.Id(x => x.Id, "id").GeneratedBy.TriggerIdentity();
Following mapping is not supported anymore: this.Id(x => x.Id).Column("ID").GeneratedBy.Custom("trigger-identity");
Given the following Fluent NHibernate maps: public class FastTrackPackageClassMap : ClassMap<FastTrackPackage> { public FastTrackPackageClassMap() { Id(x => x.Id); ...
I have a class with a bounding box, and I want to have subclasses that set the values of the bounding box, based on their attributes public class LocationBase : BaseEntity { public virtual int ...
I posted the question in the Fluent-NHibernate newgroup but so far there has been no answer from the void. Is there a Fluent NHibernate mapping for the NHibernate "trigger-identity" method of ...
Im making the switch from Fluent Mapping to Automapping in my current project. If I have the following domain: public class Matter{ public Client Client{get;set;} } public class Client { ...
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 ) ....
I m trying to convert my data layer from Linq2Sql to nHibernate. I think Xml the configuration in nHibernate is pretty backwards so I m using Fluent. I ve managed to get fluent, add in a repository ...
We have a fairly robust system using NHibernate, we re in the middle of migrating from a single database server to having two servers, one for administration and one for our public facing web site. ...
I have two tables in my database "Styles" and "BannedStyles". They have a reference via the ItemNo. Now styles can be banned per store. So if style x is banned at store Y then its very possible that ...