Question about primary key with identity

I encountered an error :
NHibernate.AssertionFailure - An AssertionFailure occurred - this may indicate a bug in NHibernate or in your custom types.
NHibernate.AssertionFailure: null identifier

After a long search i came to the conclusion that this happens because my property is defined like this:
PrimaryKey(PrimaryKeyType.Assigned, “TRANSNUM”)
But the database column defined like this: (without identity)

Can this issue be the reason for this error?
Also this error occurs at the second request the server is getting forward, the first request is without errors

This is the forum for Hibernate ORM in the Java world. If you have questions about NHibernate you must ask in their communities as that is a different project: