Link Details

Link 1140373 thumbnail
User 225256 avatar

By mswatcher
Submitted: Apr 14 2014 / 13:10

NHibernate’s HiLo (High-Low) id generation algorithm is one of the most commonly used, and for good reasons: It is database-independent, that is, does not rely on any database-specific functionality such as SQL Server’s IDENTITY and Oracle’s SEQUENCE; It allows batching of inserts; It complies with the Unit of Work pattern, because it sends all writes at the same time (when the session is flushed); Your code does not need to know or care about it.
  • 2
  • 0
  • 158
  • 272

Add your comment

Html tags not supported. Reply is editable for 5 minutes. Use [code lang="java|ruby|sql|css|xml"][/code] to post code snippets.

Voters For This Link (2)

Voters Against This Link (0)

    Java Performance Optimization
    Written by: Pierre-Hugues Charbonneau
    Featured Refcardz: Top Refcardz:
    1. Design Patterns
    2. OO JS
    3. Cont. Delivery
    4. Java EE7
    5. HTML5 Mobile
    1. Node.js
    2. Debugging JavaScript
    3. OO JS
    4. JSON
    5. Ajax