{"id":1948,"date":"2017-09-07T11:36:33","date_gmt":"2017-09-07T03:36:33","guid":{"rendered":"http:\/\/www.xttblog.com\/?p=1948"},"modified":"2017-09-07T11:36:33","modified_gmt":"2017-09-07T03:36:33","slug":"hibernate%e4%b8%bb%e9%94%ae%e7%ad%96%e7%95%a5%e7%94%9f%e6%88%90%e5%99%a8generatedvalue%e5%92%8cgenericgenerator","status":"publish","type":"post","link":"https:\/\/www.xttblog.com\/?p=1948","title":{"rendered":"Hibernate\u4e3b\u952e\u7b56\u7565\u751f\u6210\u5668@GeneratedValue\u548c@GenericGenerator"},"content":{"rendered":"<p>\n\t\u6700\u8fd1\u9879\u76ee\u4f7f\u7528\u7684\u6570\u636e\u5e93\u8981\u4ece<a href=\"https:\/\/www.xttblog.com\/?tag=PostGreSQL\" name=\"PostGreSQL\" target=\"_blank\" title=\"PostGreSQL\">PostGreSQL<\/a>\u6362\u6210<a href=\"https:\/\/www.xttblog.com\/?tag=MySQL\" name=\"MySQL\" target=\"_blank\" title=\"MySQL\">MySQL<\/a>\uff0c\u6301\u4e45\u5c42\u7528\u7684\u6846\u67b6\u662f<a href=\"https:\/\/www.xttblog.com\/?tag=Hibernate\" name=\"Hibernate\" target=\"_blank\" title=\"Hibernate\">Hibernate<\/a>\u3002\u5b9e\u4f53\u7c7b\u7528\u7684\u90fd\u662f\u6ce8\u89e3\uff0c\u7531\u4e8ePostGreSQL\u548cMySQL\u7684\u4e00\u4e9b\u51fd\u6570\u8fd8\u7528\u6cd5\u4e0a\u7684\u4e0d\u540c\uff0c\u5bfc\u81f4\u4e86\u8f83\u5927\u7684\u5de5\u4f5c\u91cf\uff0c\u5176\u4e2d\u6bd4\u8f83\u7a81\u51fa\u7684\u5c31\u662f\u4e3b\u952e\u7b56\u7565\u751f\u6210\u5668\u3002\u672c\u6587\u6b63\u662f\u57fa\u4e8e\u6b64\u6765\u590d\u4e60\u4e00\u4e0bHibernate\u7684\u4e3b\u952e\u7b56\u7565\u751f\u6210\u5668\u3002\n<\/p>\n<p>\n\t<img decoding=\"async\" alt=\"Hibernate\" src=\"http:\/\/img.blog.csdn.net\/20141103200721390\" style=\"width: 554px;height: 285px\" \/>\n<\/p>\n<p>\n\t\u901a\u8fc7annotation\u6765\u6620\u5c04hibernate\u5b9e\u4f53\u7684,\u57fa\u4e8eannotation\u7684hibernate\u4e3b\u952e\u6807\u8bc6\u4e3a@Id\uff0c\u5176\u751f\u6210\u89c4\u5219\u7531@GeneratedValue\u8bbe\u5b9a\u7684.\u8fd9\u91cc\u7684@id\u548c@GeneratedValue\u90fd\u662fJPA\u7684\u6807\u51c6\u7528\u6cd5\uff0cJPA\u63d0\u4f9b\u7684\u56db\u79cd\u6807\u51c6\u7528\u6cd5\u4e3aTABLE\uff0cSEQUENCE\uff0cIDENTITY\uff0cAUTO\u3002\n<\/p>\n<ul>\n<li>\n\t\tTABLE\uff1a\u4f7f\u7528\u4e00\u4e2a\u7279\u5b9a\u7684\u6570\u636e\u5e93\u8868\u683c\u6765\u4fdd\u5b58\u4e3b\u952e\u3002&nbsp;\n\t<\/li>\n<li>\n\t\tSEQUENCE\uff1a\u6839\u636e\u5e95\u5c42\u6570\u636e\u5e93\u7684\u5e8f\u5217\u6765\u751f\u6210\u4e3b\u952e\uff0c\u6761\u4ef6\u662f\u6570\u636e\u5e93\u652f\u6301\u5e8f\u5217\u3002&nbsp;\n\t<\/li>\n<li>\n\t\tIDENTITY\uff1a\u4e3b\u952e\u7531\u6570\u636e\u5e93\u81ea\u52a8\u751f\u6210\uff08\u4e3b\u8981\u662f\u81ea\u52a8\u589e\u957f\u578b\uff09&nbsp;\n\t<\/li>\n<li>\n\t\tAUTO\uff1a\u4e3b\u952e\u7531\u7a0b\u5e8f\u63a7\u5236\u3002\n\t<\/li>\n<\/ul>\n<h2>\n\t@TableGenerator\u7684\u5b9a\u4e49<br \/>\n<\/h2>\n<pre class=\"brush:java;\">\r\n@Target({TYPE, METHOD, FIELD})   \r\n@Retention(RUNTIME)  \r\npublic @interface TableGenerator {  \r\n  String name();  \r\n  String table() default &quot;&quot;;  \r\n  String catalog() default &quot;&quot;;  \r\n  String schema() default &quot;&quot;;  \r\n  String pkColumnName() default &quot;&quot;;  \r\n  String valueColumnName() default &quot;&quot;;  \r\n  String pkColumnValue() default &quot;&quot;;  \r\n  int initialValue() default 0;  \r\n  int allocationSize() default 50;  \r\n  UniqueConstraint[] uniqueConstraints() default {};  \r\n}  <\/pre>\n<p>\n\t\u5176\u4e2d\u5c5e\u6027\u8bf4\u660e\uff1a\n<\/p>\n<ul>\n<li>\n\t\tname\uff1a\u8868\u793a\u8be5\u8868\u4e3b\u952e\u751f\u6210\u7b56\u7565\u7684\u540d\u79f0\uff0c\u5b83\u88ab\u5f15\u7528\u5728@GeneratedValue\u4e2d\u8bbe\u7f6e\u7684&ldquo;generator&rdquo;\u503c\u4e2d\u3002&nbsp;\n\t<\/li>\n<li>\n\t\ttable\uff1a\u8868\u793a\u8868\u751f\u6210\u7b56\u7565\u6240\u6301\u4e45\u5316\u7684\u8868\u540d\uff0c\u4f8b\u5982\uff0c\u8fd9\u91cc\u8868\u4f7f\u7528\u7684\u662f\u6570\u636e\u5e93\u4e2d\u7684&ldquo;tb_generator&rdquo;\u3002&nbsp;\n\t<\/li>\n<li>\n\t\tcatalog:\u548cschema\u5177\u4f53\u6307\u5b9a\u8868\u6240\u5728\u7684\u76ee\u5f55\u540d\u6216\u662f\u6570\u636e\u5e93\u540d\u3002&nbsp;\n\t<\/li>\n<li>\n\t\tpkColumnName\uff1a\u8868\u793a\u5728\u6301\u4e45\u5316\u8868\u4e2d\uff0c\u8be5\u4e3b\u952e\u751f\u6210\u7b56\u7565\u6240\u5bf9\u5e94\u952e\u503c\u7684\u540d\u79f0\u3002\u4f8b\u5982\u5728&ldquo;tb_generator&rdquo;\u4e2d\u5c06&ldquo;gen_name&rdquo;\u4f5c\u4e3a\u4e3b\u952e\u7684\u952e\u503c&nbsp;\n\t<\/li>\n<li>\n\t\tvalueColumnName\uff1a\u8868\u793a\u5728\u6301\u4e45\u5316\u8868\u4e2d\uff0c\u8be5\u4e3b\u952e\u5f53\u524d\u6240\u751f\u6210\u7684\u503c\uff0c\u5b83\u7684\u503c\u5c06\u4f1a\u968f\u7740\u6bcf\u6b21\u521b\u5efa\u7d2f\u52a0\u3002\u4f8b\u5982\uff0c\u5728&ldquo;tb_generator&rdquo;\u4e2d\u5c06&ldquo;gen_value&rdquo;\u4f5c\u4e3a\u4e3b\u952e\u7684\u503c&nbsp;\n\t<\/li>\n<li>\n\t\tpkColumnValue\uff1a\u8868\u793a\u5728\u6301\u4e45\u5316\u8868\u4e2d\uff0c\u8be5\u751f\u6210\u7b56\u7565\u6240\u5bf9\u5e94\u7684\u4e3b\u952e\u3002\u4f8b\u5982\u5728&ldquo;tb_generator&rdquo;\u8868\u4e2d\uff0c\u5c06&ldquo;gen_name&rdquo;\u7684\u503c\u4e3a&ldquo;CUSTOMER_PK&rdquo;\u3002&nbsp;\n\t<\/li>\n<li>\n\t\tinitialValue\uff1a\u8868\u793a\u4e3b\u952e\u521d\u8bc6\u503c\uff0c\u9ed8\u8ba4\u4e3a0\u3002&nbsp;\n\t<\/li>\n<li>\n\t\tallocationSize\uff1a\u8868\u793a\u6bcf\u6b21\u4e3b\u952e\u503c\u589e\u52a0\u7684\u5927\u5c0f\uff0c\u4f8b\u5982\u8bbe\u7f6e\u62101\uff0c\u5219\u8868\u793a\u6bcf\u6b21\u521b\u5efa\u65b0\u8bb0\u5f55\u540e\u81ea\u52a8\u52a01\uff0c\u9ed8\u8ba4\u4e3a50\u3002&nbsp;\n\t<\/li>\n<li>\n\t\tUniqueConstraint\uff1a\u4e0e@Table\u6807\u8bb0\u4e2d\u7684\u7528\u6cd5\u7c7b\u4f3c\u3002\n\t<\/li>\n<\/ul>\n<h2>\n\t@SequenceGenerator\u7684\u5b9a\u4e49<br \/>\n<\/h2>\n<pre class=\"brush:java;\">\r\n@Target({TYPE, METHOD, FIELD})   \r\n@Retention(RUNTIME)  \r\npublic @interface SequenceGenerator {  \r\n String name();  \r\n String sequenceName() default &quot;&quot;;  \r\n int initialValue() default 0;  \r\n int allocationSize() default 50;  \r\n}<\/pre>\n<p>\n\t\u76f8\u5173\u5c5e\u6027\u8bf4\u660e\u5982\u4e0b\uff1a\n<\/p>\n<ul>\n<li>\n\t\tname\uff1a\u8868\u793a\u8be5\u8868\u4e3b\u952e\u751f\u6210\u7b56\u7565\u7684\u540d\u79f0\uff0c\u5b83\u88ab\u5f15\u7528\u5728@GeneratedValue\u4e2d\u8bbe\u7f6e\u7684&ldquo;generator&rdquo;\u503c\u4e2d\u3002&nbsp;\n\t<\/li>\n<li>\n\t\tsequenceName\uff1a\u8868\u793a\u751f\u6210\u7b56\u7565\u7528\u5230\u7684\u6570\u636e\u5e93\u5e8f\u5217\u540d\u79f0\u3002&nbsp;\n\t<\/li>\n<li>\n\t\tinitialValue\uff1a\u8868\u793a\u4e3b\u952e\u521d\u8bc6\u503c\uff0c\u9ed8\u8ba4\u4e3a0\u3002&nbsp;\n\t<\/li>\n<li>\n\t\tallocationSize\uff1a\u8868\u793a\u6bcf\u6b21\u4e3b\u952e\u503c\u589e\u52a0\u7684\u5927\u5c0f\uff0c\u4f8b\u5982\u8bbe\u7f6e\u62101\uff0c\u5219\u8868\u793a\u6bcf\u6b21\u521b\u5efa\u65b0\u8bb0\u5f55\u540e\u81ea\u52a8\u52a01\uff0c\u9ed8\u8ba4\u4e3a50\u3002\n\t<\/li>\n<\/ul>\n<h2>\n\thibernate\u4e3b\u952e\u7b56\u7565\u751f\u6210\u5668<br \/>\n<\/h2>\n<ul>\n<li>\n\t\thibernate\u63d0\u4f9b\u591a\u79cd\u4e3b\u952e\u751f\u6210\u7b56\u7565\uff0c\u6709\u70b9\u662f\u7c7b\u4f3c\u4e8eJPA\uff0c\u6709\u7684\u662fhibernate\u7279\u6709\uff1a&nbsp;\n\t<\/li>\n<li>\n\t\tnative: \u5bf9\u4e8e oracle \u91c7\u7528 Sequence \u65b9\u5f0f\uff0c\u5bf9\u4e8eMySQL \u548c SQL Server \u91c7\u7528identity\uff08\u81ea\u589e\u4e3b\u952e\u751f\u6210\u673a\u5236\uff09\uff0cnative\u5c31\u662f\u5c06\u4e3b\u952e\u7684\u751f\u6210\u5de5\u4f5c\u4ea4\u7531\u6570\u636e\u5e93\u5b8c\u6210\uff0chibernate\u4e0d\u7ba1\uff08\u5f88\u5e38\u7528\uff09\u3002&nbsp;\n\t<\/li>\n<li>\n\t\tuuid: \u91c7\u7528128\u4f4d\u7684uuid\u7b97\u6cd5\u751f\u6210\u4e3b\u952e\uff0cuuid\u88ab\u7f16\u7801\u4e3a\u4e00\u4e2a32\u4f4d16\u8fdb\u5236\u6570\u5b57\u7684\u5b57\u7b26\u4e32\u3002\u5360\u7528\u7a7a\u95f4\u5927\uff08\u5b57\u7b26\u4e32\u7c7b\u578b\uff09\u3002&nbsp;\n\t<\/li>\n<li>\n\t\thilo: \u4f7f\u7528hilo\u751f\u6210\u7b56\u7565\uff0c\u8981\u5728\u6570\u636e\u5e93\u4e2d\u5efa\u7acb\u4e00\u5f20\u989d\u5916\u7684\u8868\uff0c\u9ed8\u8ba4\u8868\u540d\u4e3ahibernate_unique_key,\u9ed8\u8ba4\u5b57\u6bb5\u4e3ainteger\u7c7b\u578b\uff0c\u540d\u79f0\u662fnext_hi\uff08\u6bd4\u8f83\u5c11\u7528\uff09\u3002&nbsp;\n\t<\/li>\n<li>\n\t\tassigned: \u5728\u63d2\u5165\u6570\u636e\u7684\u65f6\u5019\u4e3b\u952e\u7531\u7a0b\u5e8f\u5904\u7406\uff08\u5f88\u5e38\u7528\uff09\uff0c\u8fd9\u662f &lt;generator&gt;\u5143\u7d20\u6ca1\u6709\u6307\u5b9a\u65f6\u7684\u9ed8\u8ba4\u751f\u6210\u7b56\u7565\u3002\u7b49\u540c\u4e8eJPA\u4e2d\u7684AUTO\u3002&nbsp;\n\t<\/li>\n<li>\n\t\tidentity: \u4f7f\u7528SQL Server \u548c MySQL \u7684\u81ea\u589e\u5b57\u6bb5\uff0c\u8fd9\u4e2a\u65b9\u6cd5\u4e0d\u80fd\u653e\u5230 Oracle \u4e2d\uff0cOracle \u4e0d\u652f\u6301\u81ea\u589e\u5b57\u6bb5\uff0c\u8981\u8bbe\u5b9asequence\uff08MySQL \u548c SQL Server \u4e2d\u5f88\u5e38\u7528\uff09\u3002 \u7b49\u540c\u4e8eJPA\u4e2d\u7684INDENTITY\u3002&nbsp;\n\t<\/li>\n<li>\n\t\tselect: \u4f7f\u7528\u89e6\u53d1\u5668\u751f\u6210\u4e3b\u952e\uff08\u4e3b\u8981\u7528\u4e8e\u65e9\u671f\u7684\u6570\u636e\u5e93\u4e3b\u952e\u751f\u6210\u673a\u5236\uff0c\u5c11\u7528\uff09\u3002&nbsp;\n\t<\/li>\n<li>\n\t\tsequence: \u8c03\u7528\u5e95\u5c42\u6570\u636e\u5e93\u7684\u5e8f\u5217\u6765\u751f\u6210\u4e3b\u952e\uff0c\u8981\u8bbe\u5b9a\u5e8f\u5217\u540d\uff0c\u4e0d\u7136hibernate\u65e0\u6cd5\u627e\u5230\u3002&nbsp;\n\t<\/li>\n<li>\n\t\tseqhilo: \u901a\u8fc7hilo\u7b97\u6cd5\u5b9e\u73b0\uff0c\u4f46\u662f\u4e3b\u952e\u5386\u53f2\u4fdd\u5b58\u5728Sequence\u4e2d\uff0c\u9002\u7528\u4e8e\u652f\u6301 Sequence \u7684\u6570\u636e\u5e93\uff0c\u5982 Oracle\uff08\u6bd4\u8f83\u5c11\u7528\uff09&nbsp;\n\t<\/li>\n<li>\n\t\tincrement: \u63d2\u5165\u6570\u636e\u7684\u65f6\u5019hibernate\u4f1a\u7ed9\u4e3b\u952e\u6dfb\u52a0\u4e00\u4e2a\u81ea\u589e\u7684\u4e3b\u952e\uff0c\u4f46\u662f\u4e00\u4e2ahibernate\u5b9e\u4f8b\u5c31\u7ef4\u62a4\u4e00\u4e2a\u8ba1\u6570\u5668\uff0c\u6240\u4ee5\u5728\u591a\u4e2a\u5b9e\u4f8b\u8fd0\u884c\u7684\u65f6\u5019\u4e0d\u80fd\u4f7f\u7528\u8fd9\u4e2a\u65b9\u6cd5\u3002&nbsp;\n\t<\/li>\n<li>\n\t\tforeign: \u4f7f\u7528\u53e6\u5916\u4e00\u4e2a\u76f8\u5173\u8054\u7684\u5bf9\u8c61\u7684\u4e3b\u952e\u3002\u901a\u5e38\u548c&lt;one-to-one&gt;\u8054\u5408\u8d77\u6765\u4f7f\u7528\u3002&nbsp;\n\t<\/li>\n<li>\n\t\tguid: \u91c7\u7528\u6570\u636e\u5e93\u5e95\u5c42\u7684guid\u7b97\u6cd5\u673a\u5236\uff0c\u5bf9\u5e94MYSQL\u7684uuid()\u51fd\u6570\uff0cSQL Server\u7684newid()\u51fd\u6570\uff0cORACLE\u7684rawtohex(sys_guid())\u51fd\u6570\u7b49\u3002&nbsp;\n\t<\/li>\n<li>\n\t\tuuid.hex: \u770buuid\uff0c\u5efa\u8bae\u7528uuid\u66ff\u6362\u3002&nbsp;\n\t<\/li>\n<li>\n\t\tsequence-identity: sequence\u7b56\u7565\u7684\u6269\u5c55\uff0c\u91c7\u7528\u7acb\u5373\u68c0\u7d22\u7b56\u7565\u6765\u83b7\u53d6sequence\u503c\uff0c\u9700\u8981JDBC3.0\u548cJDK4\u4ee5\u4e0a\uff08\u542b1.4\uff09\u7248\u672c\n\t<\/li>\n<\/ul>\n<p>\n\t\u56db\u79cd\u6570\u636e\u5e93\u7684\u652f\u6301\u60c5\u51b5\u5982\u4e0b\uff1a\n<\/p>\n<table>\n<tbody>\n<tr>\n<td>\n<p>\n\t\t\t\t\t\u6570\u636e\u5e93\u540d\u79f0\n\t\t\t\t<\/p>\n<\/td>\n<td>\n<p>\n\t\t\t\t\t\u652f\u6301\u7684id\u7b56\u7565\n\t\t\t\t<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>\n\t\t\t\t\tmysql\n\t\t\t\t<\/p>\n<\/td>\n<td>\n<p>\n\t\t\t\t\tGenerationType.<em>TABLE<\/em>\n\t\t\t\t<\/p>\n<p>\n\t\t\t\t\tGenerationType.<em>AUTO<\/em>\n\t\t\t\t<\/p>\n<p>\n\t\t\t\t\tGenerationType.<em>IDENTITY<\/em>\n\t\t\t\t<\/p>\n<p>\n\t\t\t\t\t<em>\u4e0d\u652f\u6301<\/em>GenerationType.<em>SEQUENCE<\/em>\n\t\t\t\t<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>\n\t\t\t\t\toracle\n\t\t\t\t<\/p>\n<\/td>\n<td>\n<p>\n\t\t\t\t\tstrategy=GenerationType.<em>AUTO<\/em>\n\t\t\t\t<\/p>\n<p>\n\t\t\t\t\tGenerationType.<em>SEQUENCE<\/em>\n\t\t\t\t<\/p>\n<p>\n\t\t\t\t\tGenerationType.<em>TABLE<\/em>\n\t\t\t\t<\/p>\n<p>\n\t\t\t\t\t<em>\u4e0d\u652f\u6301<\/em>GenerationType.<em>IDENTITY<\/em>\n\t\t\t\t<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>\n\t\t\t\t\tpostgreSQL\n\t\t\t\t<\/p>\n<\/td>\n<td>\n<p>\n\t\t\t\t\tGenerationType.<em>TABLE<\/em>\n\t\t\t\t<\/p>\n<p>\n\t\t\t\t\tGenerationType.<em>AUTO<\/em>\n\t\t\t\t<\/p>\n<p>\n\t\t\t\t\tGenerationType.<em>IDENTITY<\/em>\n\t\t\t\t<\/p>\n<p>\n\t\t\t\t\tGenerationType.<em>SEQUENCE<\/em>\n\t\t\t\t<\/p>\n<p>\n\t\t\t\t\t<em>\u90fd\u652f\u6301<\/em>\n\t\t\t\t<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>\n\t\t\t\t\tkingbase\n\t\t\t\t<\/p>\n<\/td>\n<td>\n<p>\n\t\t\t\t\tGenerationType.<em>TABLE<\/em>\n\t\t\t\t<\/p>\n<p>\n\t\t\t\t\tGenerationType.<em>SEQUENCE<\/em>\n\t\t\t\t<\/p>\n<p>\n\t\t\t\t\tGenerationType.<em>IDENTITY<\/em>\n\t\t\t\t<\/p>\n<p>\n\t\t\t\t\tGenerationType.<em>AUTO<\/em>\n\t\t\t\t<\/p>\n<p>\n\t\t\t\t\t<em>\u90fd\u652f\u6301<\/em>\n\t\t\t\t<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<!-- <audio autoplay=\"autoplay\" height=\"100\" width=\"100\" hidden=\"true\"><source src=\"https:\/\/c.coka.la\/orAvPR.mp3\" type=\"audio\/mp3\"\/><\/audio><img decoding=\"async\" src=\"https:\/\/images.weserv.nl\/?url=https:\/\/ws3.sinaimg.cn\/large\/8fa5dcfcgy1g4em3rzar5j20ib089ae0.jpg\" alt=\"\u4e1a\u4f59\u8349\u516c\u4f17\u53f7\"\/> --><p><!-- <img decoding=\"async\" src=\"https:\/\/raw.githubusercontent.com\/xmt1139057136\/xttblog\/master\/8fa5dcfcgy1g4em3rzar5j20ib089ae0.jpg\" alt=\"\u4e1a\u4f59\u8349\u516c\u4f17\u53f7\"\/>--><img decoding=\"async\" src=\"https:\/\/saas.51autoparts.cn\/api\/admin\/sys-file\/oss\/file?fileName=84db51f8561e448f9a4fda2eff0811f9.jpg\" alt=\"\u4e1a\u4f59\u8349\u516c\u4f17\u53f7\"\/><\/p><p>\u6700\u540e\uff0c\u6b22\u8fce\u5173\u6ce8\u6211\u7684\u4e2a\u4eba\u5fae\u4fe1\u516c\u4f17\u53f7\uff1a\u4e1a\u4f59\u8349\uff08yyucao\uff09\uff01<b>\u53ef\u52a0\u4f5c\u8005\u5fae\u4fe1\u53f7\uff1a<font color=\"red\">xttblog2<\/font>\u3002\u5907\u6ce8\uff1a\u201c1\u201d\uff0c\u6dfb\u52a0\u535a\u4e3b\u5fae\u4fe1\u62c9\u4f60\u8fdb\u5fae\u4fe1\u7fa4\u3002\u5907\u6ce8\u9519\u8bef\u4e0d\u4f1a\u540c\u610f\u597d\u53cb\u7533\u8bf7\u3002<\/b>\u518d\u6b21\u611f\u8c22\u60a8\u7684\u5173\u6ce8\uff01\u540e\u7eed\u6709\u7cbe\u5f69\u5185\u5bb9\u4f1a\u7b2c\u4e00\u65f6\u95f4\u53d1\u7ed9\u60a8\uff01\u539f\u521b\u6587\u7ae0\u6295\u7a3f\u8bf7\u53d1\u9001\u81f3532009913@qq.com\u90ae\u7bb1\u3002\u5546\u52a1\u5408\u4f5c\u4e5f\u53ef\u6dfb\u52a0\u4f5c\u8005\u5fae\u4fe1\u8fdb\u884c\u8054\u7cfb\uff01<\/p><p>\u672c\u6587\u539f\u6587\u51fa\u5904\uff1a<a href=\"https:\/\/www.xttblog.com\">\u4e1a\u4f59\u8349<\/a>\uff1a &raquo; <a href=\"https:\/\/www.xttblog.com\/?p=1948\">Hibernate\u4e3b\u952e\u7b56\u7565\u751f\u6210\u5668@GeneratedValue\u548c@GenericGenerator<\/a><\/p><!-- <div class=\"bd-reward-stl\"><button id=\"bdRewardBtn\"><span><\/span><\/button><\/div> -->","protected":false},"excerpt":{"rendered":"<p>\u6700\u8fd1\u9879\u76ee\u4f7f\u7528\u7684\u6570\u636e\u5e93\u8981\u4ecePostGreSQL\u6362\u6210MySQL\uff0c\u6301\u4e45\u5c42\u7528\u7684\u6846\u67b6\u662fHibernate\u3002\u5b9e\u4f53\u7c7b\u7528\u7684\u90fd\u662f [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[1486,1487,845,429],"class_list":["post-1948","post","type-post","status-publish","format-standard","hentry","category-java","tag-generatedvalue","tag-genericgenerator","tag-hibernate","tag-postgresql"],"_links":{"self":[{"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/posts\/1948","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1948"}],"version-history":[{"count":1,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/posts\/1948\/revisions"}],"predecessor-version":[{"id":1949,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/posts\/1948\/revisions\/1949"}],"wp:attachment":[{"href":"https:\/\/www.xttblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1948"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1948"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1948"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}