Hi, i said verbose and not wrong.
With verbose i mean:

select-before-update it is by default false
unsaved-value=0 is a default of NH and the type of Id=Int16 will be easily
retrieved by NH even if you don't set it.
Type of every field property will be easily retrieved by NH.

I'm not saying this is wrong, but it gives more information than you need,
and if you change from short to int for example in the code you will need to
change in every mapping the type...it's just more work to do, and we try to
avoid working :).

As i said If you can create a test and send it to the uNHAddins group i will
try to help you. It should work in any case even using the unsaved-value=-1.

Gustavo.

On Mon, Feb 23, 2009 at 9:48 AM, Dcam <[email protected]> wrote:

>
> No tool generated this mapping, it's hand made by me. I don't see what
> should be wrong or verbose with this. Isn't it just the basic
> definitions?
>
> The Id "must" be generated by the database. Using -1 for the unsaved-
> value is because 0 is a default value, so some kind of valid value, if
> you want. But that could be easily changed, if it's only this that
> causes the problem.
>
> What I forgot to say in my first post is, that the exception only
> occures when trying to save using Session.SaveOrUpdate. It works fine
> using Session.Save, but in that case I'd have to handle the state
> myself (finding out if the object/entity is new or changed).
> I don't know if this is important, but on the database, there is also
> a trigger that updates UpdatedUtc whenever the record is changed.
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/nhusers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to