What's the best way to use NHibernate for objects without ID?

Posted by Khash on Stack Overflow See other posts from Stack Overflow or by Khash
Published on 2010-04-13T22:47:45Z Indexed on 2010/04/13 22:52 UTC
Read the original article Hit count: 231

Filed under:

I have some classes in my app that don't require an ID to be persisted. These could be things like user logs or audit records. I can add an arbitaty id to them but I would like to avoid that as they don't mean anything.

The retrieval of these objects is always on another key (like UserId) which is not unique to the record.

© Stack Overflow or respective owner

Related posts about nhibernate