The code above will work:

Id(x => 
x.PIMP_ID).GeneratedBy.Custom<global::NHibernate.Id.SequenceGenerator>(builder 
=> builder.AddParam("sequence", "PIMP_SEQ")); 






On Wednesday, October 14, 2009 6:02:57 PM UTC-3, thnk2wn wrote:
>
> In my mapping class I used: 
>
> Id(x => x.PIMP_ID).GeneratedBy.Native("PIMP_SEQ"); 
>
> where PIMP_ID is decimal.  It is decimal for a couple of reasons, 
> because of the way Oracle works with its NUMBER datatype and because 
> of a legacy constraint where I am having to take my POCO and 
> generically convert the results back into a typed dataset that has the 
> PIMP_ID as a decimal. 
>
> When the ID generation runs I get the exception: "Identity type must 
> be integral (int, long, uint, ulong)".  Is this a "look ahead" / 
> upfront type exception that truly needs to be there or is there not 
> some way it can do the conversion between long and decimal and give me 
> a decimal that won't have any fractional portion? 
>
> I changed my POCO field to a long but then that creates a problem 
> generically converting it back.  Sequences work with standard ODP.NET 
> and decimal data types so I was hoping the same would work here. 
>
> If necessary I suppose I could role my own generator?

-- 
You received this message because you are subscribed to the Google Groups 
"Fluent NHibernate" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to fluent-nhibernate+unsubscr...@googlegroups.com.
To post to this group, send email to fluent-nhibernate@googlegroups.com.
Visit this group at http://groups.google.com/group/fluent-nhibernate.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to