• Fluent Nhibernate

    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 .

0 comments:

Leave a Reply

Thanks for sharing your feedback! If your feedback doesn't appear right away, please be patient as it may take a few minutes to publish - or longer if the blogger is moderating comments.