IIRC hi is created the first time the entity is requested, not when the 
factory is created. in a unit test this could occur at the same time. In 
either case the high value must be created. it's stored in the db to ensure 
uniqueness. without this there is a potential for duplicate keys. NH 
protects the dev from this. What you described is by design and not meant 
to be altered. NH is meant to touch a DB. if you don't want to touch a 
physical db use a sqlite in-memory db. they are lighting fast compared to a 
file DB.

On Friday, June 8, 2012 3:35:11 PM UTC-4, SirSirAaron wrote:
>
> When I am running unit tests I don't want increment the hi when a session 
> factory is created. Does anyone know a way in which to prevent this 
> behavior? Additionally, it would be great if I could set the session 
> factory's hi manually without touching the database. 

-- 
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/nhusers/-/QUO2jlqJjKMJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/nhusers?hl=en.

Reply via email to