[Seasar-user:13091] Re: [S2JDBC]@idのシーケンス発番で制約違反
AGATA Toshitaka
[E-MAIL ADDRESS DELETED]
2008年 2月 28日 (木) 15:24:14 JST
Tomato Kagome $B$5$s(B
$BeQ$G$9!#(B
> $B$7$+$b%a!<%j%s%0%j%9%H$N2a5n%m%0$K$b!D(B
> http://ml.seasar.org/archives/seasar-user/2007-December/012329.html
$B$3$l$O;d$b8+F($7$F$$$^$7$?!#!#!#(B
$B$3$A$i$3$=;29M$K$J$j$^$7$?!#(B
$B0J>e$G$9!#(B
Tomato Kagome $B$5$s$O=q$-$^$7$?(B:
> $BeQ$5$s(B
>
> $B$"$j$,$H$&$4$6$$$^$9!#(B
> JPA$B$K$=$s$J;EMM$,$"$C$?$s$G$9$M!#(B
>
> S2JDBC$B$N%I%-%e%a%s%H$bI,MW$JItJ,$@$1$rHt$P$7FI$_$7$F$$$?$N$G(B
> $BA4$/5$$,$D$-$^$;$s$G$7$?!#(B
> $B$7$+$b%a!<%j%s%0%j%9%H$N2a5n%m%0$K$b!D(B
> http://ml.seasar.org/archives/seasar-user/2007-December/012329.html
>
> $B<!2s$+$i$O$b$C$H$h$/D4$Y$F$+$i<ALd$7$?$$$H;W$$$^$9!#(B
>
> $B0J>e$K$J$j$^$9!#(B
>
>
> 08/02/28 $B$K(B AGATA Toshitaka<[E-MAIL ADDRESS DELETED]> $B$5$s$O=q$-$^$7$?(B:
>> $BeQ$G$9!#$3$s$K$A$O!#(B
>>
>> $B0JA0;d$bF1MM$N8=>]$G:$$C$?$3$H$,$"$j$^$7$?!#(B
>> $B$*$=$i$/(BCREATE SEQUENCE$B$G%$%s%/%j%a%s%HCM$r(B50$B$K(B
>> $B$7$F$$$J$$$+$i$@$H;W$$$^$9!#(B
>>
>> @javax.persistence.SequenceGenerator$B$N(BallocationSize$B$r(B
>> 1$B$K$9$k$3$H$G!"%$%s%/%j%a%s%HCM(B1$B$N%7!<%1%s%9$rMxMQ$9$k$3$H$b$G$-$^$9!#(B
>>
>> @javax.persistence.SequenceGenerator(name="project_seq",
>> sequenceName="project_id", allocationSize=1)
>>
>> $B$3$N$"$?$j$N7P0^$O0J2<$K%a%b$7$F$$$^$9!#;29M$^$G$K!#(B
>>
>> http://d.hatena.ne.jp/agt/20080208#p1
>>
>> $B0J>e$G$9!#(B
>>
>> Tomato Kagome $B$5$s$O=q$-$^$7$?(B:
>>> $B$3$s$K$A$O!#(B
>>>
>>> S2JDBC$B$N([E-MAIL ADDRESS DELETED]$B$N%7!<%1%s%9H/HV$G(B
>>> $B-!$7$P$i$/$OA[DjDL$j$NF0:n$r$7$F$$$k$N$G$9$,!"(B
>>> $B-"2?$+$N%?%$%_%s%0$+$i%7!<%1%s%9$NH/HV$G$J$/$J$j!"(B
>>> $B-#FMA3%7!<%1%s%9$G$NH/HV$KLa$C$[E-MAIL ADDRESS DELETED]@)Ls0cH?$H$J$C$F$7$^$C$F$$$^$9!#(B
>>>
>>> $B0J2<$O!"F0:n;~$N%m%0$rH4$-=P$7$?$b$N$G$9!#(B
>>> $B-!(B
>>> org.seasar.extension.jta.TransactionImpl [TP-Processor2]
>>> $B%H%i%s%6%/%7%g%s$r3+;O$7$^$7$?!#(Btx=[FormatId=4360, GlobalId=1203923088134/10,
>>> BranchId=]
>>> org.seasar.framework.aop.interceptors.TraceInterceptor [TP-Processor2]
>>> BEGIN hoge.logic.ItemLogic#regist([E-MAIL ADDRESS DELETED])
>>> org.seasar.extension.jdbc.query.AutoInsertImpl [TP-Processor2] select
>>> nextval('item_id_seq')
>>> org.seasar.extension.jdbc.query.AutoInsertImpl [TP-Processor2] insert
>>> into ITEM (ID, NAME) values (2, 'hoge')
>>> org.seasar.framework.aop.interceptors.TraceInterceptor [TP-Processor2]
>>> END hoge.logic.ItemLogic#regist([E-MAIL ADDRESS DELETED]) : null
>>> org.seasar.extension.jta.TransactionImpl [TP-Processor2]
>>> $B%H%i%s%6%/%7%g%s$r%3%_%C%H$7$^$7$?!#(Btx=[FormatId=4360, GlobalId=1203923088134/10,
>>> BranchId=]
>>>
>>> $B-"(B
>>> org.seasar.extension.jta.TransactionImpl [TP-Processor3]
>>> $B%H%i%s%6%/%7%g%s$r3+;O$7$^$7$?!#(Btx=[FormatId=4360, GlobalId=1203923088134/167,
>>> BranchId=]
>>> org.seasar.framework.aop.interceptors.TraceInterceptor [TP-Processor3]
>>> BEGIN jp.worksdc.knowledge.logic.ItemLogic#regist([E-MAIL ADDRESS DELETED])
>>> org.seasar.extension.jdbc.query.AutoInsertImpl [TP-Processor3] insert
>>> into ITEM (ID, NAME) values (49, 'hoge')
>>> org.seasar.framework.aop.interceptors.TraceInterceptor [TP-Processor3]
>>> END jp.worksdc.knowledge.logic.ItemLogic#regist([E-MAIL ADDRESS DELETED])
>>> : null
>>> org.seasar.extension.jta.TransactionImpl [TP-Processor3]
>>> $B%H%i%s%6%/%7%g%s$r%3%_%C%H$7$^$7$?!#(Btx=[FormatId=4360, GlobalId=1203923088134/167,
>>> BranchId=]
>>>
>>> $B-#(B
>>> org.seasar.extension.jta.TransactionImpl [TP-Processor2]
>>> $B%H%i%s%6%/%7%g%s$r3+;O$7$^$7$?!#(Btx=[FormatId=4360, GlobalId=1204031054603/24,
>>> BranchId=]
>>> org.seasar.framework.aop.interceptors.TraceInterceptor [TP-Processor2]
>>> BEGIN hoge.logic.ItemLogic#regist([E-MAIL ADDRESS DELETED])
>>> org.seasar.extension.jdbc.query.AutoInsertImpl [TP-Processor2] select
>>> nextval('item_id_seq')
>>> org.seasar.extension.jdbc.query.AutoInsertImpl [TP-Processor2] insert
>>> into ITEM (ID, NAME) values (3, 'hoge')
>>> org.seasar.framework.aop.interceptors.TraceInterceptor [TP-Processor2]
>>> END hoge.logic.ItemLogic#regist([E-MAIL ADDRESS DELETED])
>>> Throwable:org.seasar.extension.jdbc.exception.SEntityExistsException:
>>> [ESSR0745]$B%(%s%F%#%F%#(B([E-MAIL ADDRESS DELETED])$B$O$9$G$KB8:_$7$^$9(B ($B@)Ls0cH?(B)$B!#(BSQL(insert
>>> into ITEM (ID, NAME) values (?, ?))
>>> org.seasar.extension.jta.TransactionImpl [TP-Processor2]
>>> $B%H%i%s%6%/%7%g%s$r%m!<%k%P%C%/$7$^$7$?!#(Btx=[FormatId=4360, GlobalId=1204031054603/24,
>>> BranchId=]
>>> org.seasar.framework.aop.interceptors.TraceInterceptor [TP-Processor2]
>>> END hoge.action.IndexAction#regist()
>>> Throwable:org.seasar.extension.jdbc.exception.SEntityExistsException:
>>> [ESSR0745]$B%(%s%F%#%F%#(B([E-MAIL ADDRESS DELETED])$B$O$9$G$KB8:_$7$^$9(B ($B@)Ls0cH?(B)$B!#(BSQL(insert
>>> into ITEM (ID, NAME) values (?, ?))
>>> org.apache.struts.action.RequestProcessor [TP-Processor2]
>>> $B=hM}$G$-$J$$Nc30$,%9%m!<$5$l$^$7$?(B: class
>>> org.seasar.extension.jdbc.exception.SEntityExistsException
>>> org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/knowledge].[action]
>>> [TP-Processor2] $B%5!<%V%l%C%H(B action $B$N(BServlet.service()$B$,Nc30$rEj$2$^$7$?(B
>>> org.seasar.extension.jdbc.exception.SEntityExistsException:
>>> [ESSR0745]$B%(%s%F%#%F%#(B([E-MAIL ADDRESS DELETED])$B$O$9$G$KB8:_$7$^$9(B ($B@)Ls0cH?(B)$B!#(BSQL(insert
>>> into ITEM (ID, NAME) values (?, ?))
>>> at org.seasar.extension.jdbc.query.AbstractAutoUpdate.execute(AbstractAutoUpdate.java:93)
>>> at hoge.logic.ItemLogic.regist(ItemLogic.java:41)
>>>
>>>
>>> $B-"$N(Bselect nextval('item_id_seq')$B$,H/9T$5$l$J$/$J$C$?$b$N$,$7$P$i$/B3$$$F!"(B
>>> $BFMA3%7!<%1%s%9$NH/HV$KLa$j!"0JA0$N%7!<%1%s%9$NB3$-$J$N$G@)Ls0cH?$H$J$j$^$9!#(B
>>> $B%7!<%1%s%9H/HV$5$l$J$/$J$C$F$$$k:GCf$O!"(Bid$B$O>!<j$K%$%s%/%j%a%s%H$5$l$?CM$G(B
>>> insert$B$5$l$F$$$k$h$&$G$9!#(B
>>>
>>> $B4D6-$O0J2<$NDL$j$G$9!#(B
>>> S2Framework 2.2.22
>>> S2Struts 1.0.1-rc3
>>> PostgreSQL 8.1
>>>
>>> $B%(%s%F%#%F%#$N(Bid$B$O2<5-$NDL$j$K$J$C$F$$$^$9!#(B
>>> @Id
>>> @GeneratedValue(strategy = GenerationType.SEQUENCE, generator =
>>> "item_id_seq_gen")
>>> @SequenceGenerator(name = "item_id_seq_gen", sequenceName = "item_id_seq")
>>> public Long id;
>>>
>>> $B2?$+J,$+$k$3$H$O$"$j$^$9$G$7$g$&$+!#(B
>>>
>>> $B0J>e!"$h$m$7$/$*4j$$$$$?$7$^$9!#(B
>>>
>>>
>>> ------------------------------------------------------------------------
>>>
>>> _______________________________________________
>>> Seasar-user mailing list
>>> [E-MAIL ADDRESS DELETED]
>>> https://ml.seasar.org/mailman/listinfo/seasar-user
>>
>> --
>> -------------------------------
>> $B3t<02q<R%L!<%i%\!!eQ!!=S5.(B
>> Mail : [E-MAIL ADDRESS DELETED]
>> HP : http://www.nulab.co.jp/
>> TEL : 03-5766-6256($BEl5~(B)
>> 092-724-0020($BJ!2,(B)
>> -------------------------------
>>
>> _______________________________________________
>> Seasar-user mailing list
>> [E-MAIL ADDRESS DELETED]
>> https://ml.seasar.org/mailman/listinfo/seasar-user
>>
>>
>>
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> Seasar-user mailing list
>> [E-MAIL ADDRESS DELETED]
>> https://ml.seasar.org/mailman/listinfo/seasar-user
--
-------------------------------
$B3t<02q<R%L!<%i%\!!eQ!!=S5.(B
Mail : [E-MAIL ADDRESS DELETED]
HP : http://www.nulab.co.jp/
TEL : 03-5766-6256($BEl5~(B)
092-724-0020($BJ!2,(B)
-------------------------------
Seasar-user メーリングリストの案内