$B5WJ]$5$s(B<div><br></div><div>$BAaB.$N%3%a%s%H$"$j$,$H$&$4$6$$$^$7$?!#(B</div><div><br></div><div>$B:G=i$OA0$N6uGr$O$J$5$=$&$K8+$($?$N$G!"99$K$?$7$F$7$^$$$^$7$?!#(B</div><div>$B:FEY6uGr$r:o$j$^$7$?$i!">e<j$/9T$-$^$7$?!#(B</div><div><br></div><div>$B$*<j?t$r$*$+$1$7$^$7$?!#(B</div><div><br></div><div>$B;VB<(B<br><br><div class="gmail_quote">
2009/03/20 19:28 kubo <span dir="ltr">&lt;<a href="mailto:dbflute@gmail.com">dbflute@gmail.com</a>&gt;</span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">$B5WJ]$G$9!#(B<br>

<br>
$B;VB<$5$s!"$3$s$P$s$O(B<br>
<div class="im"><br>
&gt; user_role.loginname = &nbsp;/*pmb.loginname*/ &nbsp; &nbsp;&#39;mike&#39;<br>
&gt; &nbsp; &nbsp;AND transaction_screen.screen = &nbsp; /*pmb.screen*/ &nbsp; &nbsp; &#39;/example/vdr&#39;<br>
<br>
</div>$B%P%$%s%IJQ?t%3%a%s%H$H%F%9%HCM$N4V$K6uGr!V(B &nbsp; &nbsp;$B!W$,(B<br>
$BF~$C$F$$$k$h$&$K8+$($^$9!#$3$A$i$N6uGr$r:o$C$F(B<br>
$B$b$&0lEY;n$7$FD:$1$J$$$G$7$g$&$+!)(B<br>
<br>
$B!V(B/*pmb.loginname*/ &nbsp; &nbsp;&#39;mike&#39;$B!W(B<br>
$B"-(B<br>
$B!V(B/*pmb.loginname*/&#39;mike&#39;$B!W(B<br>
<br>
$B!V(B*pmb.screen*/ &nbsp; &nbsp; &#39;/example/vdr&#39;$B!W(B<br>
$B"-(B<br>
$B!V(B*pmb.screen*/&#39;/example/vdr&#39;$B!W(B<br>
<br>
$B$A$J$_$K4pE@%F!<%V%k$N$H$"$k%+%i%`$N(B<br>
Max$BCM$r<hF@$9$k$N$G$"$l$P!"(B<br>
<br>
transactionScreenBhv.scalarSelect(new ScalarQuery&lt;TransactionScreenCB&gt;{<br>
 &nbsp; &nbsp;public void query(TransactionScreenCB cb) {<br>
 &nbsp; &nbsp; &nbsp; &nbsp;cb.specify().columnLevel();<br>
 &nbsp; &nbsp; &nbsp; &nbsp;cb.query()... // $B$=$NB>9J$j9~$_>r7o(B<br>
 &nbsp; &nbsp;}<br>
});<br>
<br>
$B$G!"<B8=2DG=$G$9!#(B<br>
dbflute-basic-example$B$N(BBehaviorMiddleTest$B$N(B<br>
test_scalarSelect_max_Tx()$B$K(BExample$B<BAu$"$j$^$9!#(B<br>
<br>
2009/3/20 Masanobu Shimura &lt;<a href="mailto:mikeshimura@gmail.com">mikeshimura@gmail.com</a>&gt;:<br>
<div><div></div><div class="h5">&gt; $B5WJ]$5$s(B<br>
&gt; $B$O$^$C$F$7$^$C$?$N$G!"65$($F2<$5$$!#(B<br>
&gt; $B$J$*(B SQL$BJ8$r2<5-$K=$@5$9$l$PDL$j$^$9$N$G!"5^$$$G$O$$$^$;$s$,!#(B<br>
&gt; $B$^$?(B /*IF$B!!$K$7$F$bF1MM$G!"JQ2=$"$j$^$;$s!#(B<br>
&gt; dbflute runtime 0.9.3$B!"(BS2 2.4.33 $B$G!"(B dbflute-basic-example$B$O!"(BERROR$B$J$/DL$j$^$9!#(B<br>
&gt; $B;VB<(B<br>
&gt;<br>
&gt; $BDL$k(B SQL$BJ8(B<br>
&gt; &nbsp;&nbsp; WHERE<br>
&gt; user_role.loginname = &nbsp;/*pmb.loginname*/<br>
&gt; &nbsp;&nbsp; AND transaction_screen.screen = &nbsp; /*pmb.screen*/<br>
&gt;<br>
&gt; ERROR$B!!30$@$7!!(BSQL$BJ8(B<br>
&gt; -- !SelectLevelPmb!<br>
&gt; -- !!String loginname!!<br>
&gt; -- !!String screen!!<br>
&gt; SELECT<br>
&gt; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp;MAX(LEVEL)<br>
&gt; &nbsp;&nbsp; &nbsp;FROM<br>
&gt; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp;transaction_screen<br>
&gt; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;JOIN tran_role<br>
&gt; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ON transaction_screen.transaction = tran_role.transaction<br>
&gt; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;JOIN user_role<br>
&gt; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ON user_role.role = tran_role.role<br>
&gt; &nbsp;&nbsp; &nbsp;WHERE<br>
&gt; user_role.loginname = &nbsp;/*pmb.loginname*/ &nbsp; &nbsp;&#39;mike&#39;<br>
&gt; &nbsp;&nbsp; AND transaction_screen.screen = &nbsp; /*pmb.screen*/ &nbsp; &nbsp; &#39;/example/vdr&#39;<br>
&gt; $B<B9T(BLOG<br>
&gt; DEBUG 2009-03-20 17:39:44,519 [main] $BO@M}E*$J%3%M%/%7%g%s$r<hF@$7$^$7$?!#(Btx=[FormatId=4360,<br>
&gt; GlobalId=1237538384068/0, BranchId=]<br>
&gt; DEBUG 2009-03-20 17:39:44,529 [main]<br>
&gt; -- !SelectLevelPmb!<br>
&gt; -- !!String loginname!!<br>
&gt; -- !!String screen!!<br>
&gt; SELECT<br>
&gt; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp;MAX(LEVEL)<br>
&gt; &nbsp;&nbsp; &nbsp;FROM<br>
&gt; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp;transaction_screen<br>
&gt; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;JOIN tran_role<br>
&gt; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ON transaction_screen.transaction = tran_role.transaction<br>
&gt; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;JOIN user_role<br>
&gt; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ON user_role.role = tran_role.role<br>
&gt; &nbsp;&nbsp; &nbsp;WHERE<br>
&gt; user_role.loginname = &nbsp;&#39;mike&#39; &nbsp; &nbsp;&#39;mike&#39;<br>
&gt; &nbsp;&nbsp; AND transaction_screen.screen = &nbsp; &#39;/example/menu&#39; &nbsp; &nbsp; &#39;/example/vdr&#39;<br>
&gt; DEBUG 2009-03-20 17:39:44,627 [main] $BO@M}E*$J%3%M%/%7%g%s$rJD$8$^$7$?!#(Btx=[FormatId=4360,<br>
&gt; GlobalId=1237538384068/0, BranchId=]<br>
&gt; DEBUG 2009-03-20 17:39:44,627 [main] END<br>
&gt; org.seasar.ef.example.agile.logic.TransactionLogic#GetLevel(mike,<br>
&gt; /example/menu) Throwable:org.seasar.dbflute.exception.SQLFailureException:<br>
&gt; Look! Read the message below.<br>
&gt; /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *<br>
&gt; The SQL failed to execute!<br>
&gt; [Advice]<br>
&gt; Please confirm the SQLException message.<br>
&gt; [SQLState]<br>
&gt; 42601<br>
&gt; [ErrorCode]<br>
&gt; 0<br>
&gt; [SQLException]<br>
&gt; org.seasar.framework.exception.SSQLException<br>
&gt; [ESSR0072]SQL$B$GNc30(B(SQL=[-- !SelectLevelPmb!<br>
&gt; -- !!String loginname!!<br>
&gt; -- !!String screen!!<br>
&gt; SELECT<br>
&gt; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp;MAX(LEVEL)<br>
&gt; &nbsp;&nbsp; &nbsp;FROM<br>
&gt; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp;transaction_screen<br>
&gt; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;JOIN tran_role<br>
&gt; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ON transaction_screen.transaction = tran_role.transaction<br>
&gt; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;JOIN user_role<br>
&gt; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ON user_role.role = tran_role.role<br>
&gt; &nbsp;&nbsp; &nbsp;WHERE<br>
&gt; user_role.loginname = &nbsp;? &nbsp; &nbsp;&#39;mike&#39;<br>
&gt; &nbsp;&nbsp; AND transaction_screen.screen = &nbsp; ? &nbsp; &nbsp; &#39;/example/vdr&#39;], Message=[0],<br>
&gt; ErrorCode=42601, SQLState={3})$B$,H/@8$7$^$7$?(B<br>
&gt; [NextException]<br>
&gt; org.postgresql.util.PSQLException<br>
&gt; ERROR: syntax error at or near &quot;&#39;mike&#39;&quot;<br>
&gt; [Behavior]<br>
&gt; TranRoleBhv.outsideSql().selectList()<br>
&gt; [OutsideSql]<br>
&gt; org/seasar/ef/example/agile/dbflute/exbhv/TranRoleBhv_selectLevel.sql<br>
&gt; [ParameterBean]<br>
&gt; org.seasar.ef.example.agile.dbflute.exbhv.pmbean.SelectLevelPmb<br>
&gt; {mike,/example/menu}<br>
&gt; [Statement]<br>
&gt; org.seasar.extension.jdbc.impl.PreparedStatementWrapper<br>
&gt; [Display SQL]<br>
&gt; -- !SelectLevelPmb!<br>
&gt; -- !!String loginname!!<br>
&gt; -- !!String screen!!<br>
&gt; SELECT<br>
&gt; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp;MAX(LEVEL)<br>
&gt; &nbsp;&nbsp; &nbsp;FROM<br>
&gt; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp;transaction_screen<br>
&gt; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;JOIN tran_role<br>
&gt; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ON transaction_screen.transaction = tran_role.transaction<br>
&gt; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;JOIN user_role<br>
&gt; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ON user_role.role = tran_role.role<br>
&gt; &nbsp;&nbsp; &nbsp;WHERE<br>
&gt; user_role.loginname = &nbsp;&#39;mike&#39; &nbsp; &nbsp;&#39;mike&#39;<br>
&gt; &nbsp;&nbsp; AND transaction_screen.screen = &nbsp; &#39;/example/menu&#39; &nbsp; &nbsp; &#39;/example/vdr&#39;<br>
&gt; * * * * * * * * * */<br>
&gt; DEBUG 2009-03-20 17:39:44,640 [main] $B%H%i%s%6%/%7%g%s$r%m!<%k%P%C%/$7$^$7$?!#(Btx=[FormatId=4360,<br>
&gt; GlobalId=1237538384068/0, BranchId=]<br>
</div></div>&gt; _______________________________________________<br>
&gt; Seasar-user mailing list<br>
&gt; <a href="mailto:Seasar-user@ml.seasar.org">Seasar-user@ml.seasar.org</a><br>
&gt; <a href="https://ml.seasar.org/mailman/listinfo/seasar-user" target="_blank">https://ml.seasar.org/mailman/listinfo/seasar-user</a><br>
&gt;<br>
&gt;<br>
_______________________________________________<br>
Seasar-user mailing list<br>
<a href="mailto:Seasar-user@ml.seasar.org">Seasar-user@ml.seasar.org</a><br>
<a href="https://ml.seasar.org/mailman/listinfo/seasar-user" target="_blank">https://ml.seasar.org/mailman/listinfo/seasar-user</a><br>
</blockquote></div><br></div>