Tips and Tricks in a world of Mix

I was following some bloges about creating the mapping through the fluent nhibernate.
I’ve managed the connection to oracle , and have began building the entities , and than it hit me. I couldn’t go on , because the entity was defined as Guid and my PK in the mapping was int64 – long type , we are working with existing db , and increamenting through sequences .
It took me a while , but the solution was very simple , I’ve just adjusted the entity father, so that it would be with a long type ID property. The mapping in the mapping classes connecing he ID with column that i choose , defining he sequence which should increament the recid number .
The only down side , that you”ll have to rewrite the Entity.Equals and the Entity.GetHashCode .


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Tag Cloud

%d bloggers like this: