File tree Expand file tree Collapse file tree 3 files changed +8
-1
lines changed Expand file tree Collapse file tree 3 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -185,6 +185,8 @@ Entity(エンティティ)は、データベースのテーブルやクエ
185185
186186 フィールドの型が :doc: `embeddable ` の場合、 ``@Id`` は指定できません。
187187
188+ .. _identity-auto-generation :
189+
188190識別子の自動生成
189191~~~~~~~~~~~~~~~~
190192
@@ -201,7 +203,8 @@ Entity(エンティティ)は、データベースのテーブルやクエ
201203
202204.. note ::
203205
204- プリミティブ型を使う場合、自動生成された値が確実に設定されるようにするには初期値に ``-1 `` など ``0 `` 未満の値を明示してください。
206+ 自動生成された値が識別子フィールドに設定される条件は、フィールドの値が ``null `` もしくは ``0 `` 未満であることです。
207+ プリミティブ型を使う場合は、フィールドの初期値に ``-1 `` など ``0 `` 未満の値を明示してください。
205208
206209IDENTITYを使った識別子の自動生成
207210~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Original file line number Diff line number Diff line change @@ -49,6 +49,8 @@ SQLの自動生成によるバッチ挿入
4949:doc: `../entity ` の識別子に、 ``@GeneratedValue `` が注釈されている場合、
5050識別子が自動的に生成され設定されます。
5151
52+ 注意点については :ref: `identity-auto-generation ` を参照ください。
53+
5254バージョン番号
5355--------------
5456
Original file line number Diff line number Diff line change @@ -55,6 +55,8 @@ SQLの自動生成による挿入
5555:doc: `../entity ` の識別子に、 ``@GeneratedValue `` が注釈されている場合、
5656識別子が自動的に生成され設定されます。
5757
58+ 注意点については :ref: `identity-auto-generation ` を参照ください。
59+
5860バージョン番号
5961--------------
6062
You can’t perform that action at this time.
0 commit comments