2

I want to auto generate a number for an entity from the database with the following mapping:

Map(m => m.No).Not.Nullable().ReadOnly().Unique().Generated.Insert();

Why is no value generated for the property "No" of type int?

This is not an identity column.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Rasmus Christensen
  • 8,321
  • 12
  • 51
  • 78

1 Answers1

1

You have it marked ReadOnly()? So it's not going to insert or update the value.

dougmarcey
  • 11
  • 1