Castle ActiveRecord Error With View: NHibernate.PropertyNotFoundException for generated key
问题 I'm mapping a view using ActiveRecord, which means I need a primary key. I don't have one, so I'm using ROW_NUMBER() to create one in the view definition to placate the system. However, I don't seem to know how to map it properly. I'm getting: Could not find field 'stupidID' in class 'blah_blah' NHibernate.PropertyNotFoundException: Could not find field 'stupidID' in class 'blah_blah' My mapping looks like this. There is no public long? stupidID; [PrimaryKey("StupidId", Access =