{"id":602,"date":"2004-06-03T10:21:56","date_gmt":"2004-06-03T14:21:56","guid":{"rendered":"http:\/\/wordpress.cephas.net\/?p=602"},"modified":"2004-06-03T10:21:56","modified_gmt":"2004-06-03T14:21:56","slug":"hibernate-using-native-identifier-generation","status":"publish","type":"post","link":"https:\/\/cephas.net\/blog\/2004\/06\/03\/hibernate-using-native-identifier-generation\/","title":{"rendered":"Hibernate: Using &#8216;native&#8217; identifier generation"},"content":{"rendered":"<p>The nice folks at <a href=\"http:\/\/www.apress.com\/\">Apress<\/a> sent me a couple books (<a href=\"http:\/\/www.apress.com\/book\/bookDisplay.html?bID=197\">Enterprise Java Development on a Budget: Leveraging Java Open Source Technologies<\/a>, <a href=\"http:\/\/www.apress.com\/book\/bookDisplay.html?bID=228\">Pro Jakarta Struts<\/a> and <a href=\"http:\/\/www.apress.com\/book\/bookDisplay.html?bID=305\">Beginning J2EE 1.4: From Novice to Professional<\/a>) to review. Last night I was glancing through the object relational mapping chapter of the Enterprise Java Development on a Budget book and read about <a href=\"http:\/\/www.hibernate.org\/hib_docs\/reference\/en\/html\/mapping.html#mapping-declaration-id-generator\">mapping identity columns<\/a> using Hibernate.  The sites I work on are mostly SQL Server and MySQL, so I&#8217;ve been using the &#8216;identity&#8217; generator, which &#8220;&#8230;  supports identity columns in DB2, MySQL, MS SQL Server, Sybase and HypersonicSQL.&#8221; (in contrast to the sequence generator which uses a sequence in DB2, PostgreSQL, Oracle, SAP DB, McKoi or a generator in Interbase)  The book mentioned that the &#8216;native&#8217; generator &#8220;<em>&#8230; intelligently chooses the appropriate strategy<\/em>&#8221; from among the identity, sequence or hilo generators.  Hibernate never ceases to amaze.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The nice folks at Apress sent me a couple books (Enterprise Java Development on a Budget: Leveraging Java Open Source Technologies, Pro Jakarta Struts and Beginning J2EE 1.4: From Novice to Professional) to review. Last night I was glancing through the object relational mapping chapter of the Enterprise Java Development on a Budget book and &hellip; <a href=\"https:\/\/cephas.net\/blog\/2004\/06\/03\/hibernate-using-native-identifier-generation\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Hibernate: Using &#8216;native&#8217; identifier generation<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[3],"tags":[],"_links":{"self":[{"href":"https:\/\/cephas.net\/blog\/wp-json\/wp\/v2\/posts\/602"}],"collection":[{"href":"https:\/\/cephas.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cephas.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cephas.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/cephas.net\/blog\/wp-json\/wp\/v2\/comments?post=602"}],"version-history":[{"count":0,"href":"https:\/\/cephas.net\/blog\/wp-json\/wp\/v2\/posts\/602\/revisions"}],"wp:attachment":[{"href":"https:\/\/cephas.net\/blog\/wp-json\/wp\/v2\/media?parent=602"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cephas.net\/blog\/wp-json\/wp\/v2\/categories?post=602"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cephas.net\/blog\/wp-json\/wp\/v2\/tags?post=602"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}