views:

271

answers:

1

The title says it all. I have a composite key in a database table / NHibernate entity. Can I somehow use the .Get method to grab a specific entity or do I have to use HQL / Criteria due to the composite key?

+1  A: 

You can only use Session.Get() if you used a key class as suggested here: http://stackoverflow.com/questions/1329068/nhibernate-composite-key-class-type-mismatch

lcranf