We have a table on the database where we want to map the ID as Guid. Our project should run over two databases, Sql Server and Oracle. For Sql Server, we define the column type as uniqueidentifier and it works fine. For Oracle, we try to define it as char(36), raw(36), varchar2(36) but it does not work properly.
After the commit of the transaction, NHibernate generate an ID different what we have on the ID property of the model mapped.
We are mapping it using Fluent NHibernate:
Id(x => x.Id).Column("ID").GeneratedBy.GuidComb();
The question is, how can we map it on Oracle? What is the best column dataType to define? Should we create an IUserType to map it?
Felipe B Oriani