vintem wrote:
What about the enum cases? Because I can't map an enum as a many-to-one, I have to map it as a property.
If it is a enum, you:
a) do not have foreign key in database, so no problems during save.
b) Related database table contains all possible values (Probably including the 0 for unspecified enum value), so again no problems.
But as You map did specify class for produto, I did not think about this possibility.
vintem wrote:
And I haven't made any changes at all, I just binded de results from the getbycriteria method to a gridview.
I ahve no experience with gridview and NHIbernate, but maybe the gridview is creating a new instance of object? (To be shown as empty or new item)
Gertt