Back to list
Views:   9.3K
Replies:  1

What is the use of the Hi/Lo method in NHibernate?

Hello NHibernate gurus. I have worked with NHibernate for a relavitely short time and have a question.

My understanding is that Hi/Lo is used to generate auto-increment numbers for primary keys. But I cannot think of a real-world situation where you would need this. Why not just rely on the underlying database identity or autonumber facilities?  And, does this not interfere with the database generated autonumbers (Identities)?

Craig Johnston, Mar 09, 2011
Reply 1
The primary use that I can think of when using hi/lo is in a disconnected state. Meaning a client can request a hi number and then generate as many lo numbers as it needs when disconnected.

There is also a performance gain, basically it's less chatter between the client and the database.
See post here ->
Robert Blixt, Mar 09, 2011
Stay Inspired!
Join other developers and designers who have already signed up for our mailing list.
Terms     Privacy     Cookies       Do Not Sell       Licensing      
Made with    in Austin, Texas.  - vsn 44.0.0
© Data & Object Factory, LLC.