Ha,<br><br>MemberCB cb = new MemberCB();<br>
<span style="background-color: rgb(255, 153, 102);">cb.setupSelect_MemberStatus(); </span><br>
<br><span style="background-color: rgb(255, 204, 204);">//cb.query.setMemberId(&quot;AAA&quot;);</span><br><br>
List&lt;Member&gt; memberList = memberBhv.selectList(cb);<br>
for (Member member : memberList) {<br>
 &nbsp; &nbsp;// columns of MEMBER table<br>
 &nbsp; &nbsp;Integer memberId = member.getMemberId();<br>
 &nbsp; &nbsp;String memberName = member.getMemberName();<br>
<br>
 &nbsp; &nbsp;// columns of MEMBER_STATUS table<br>
 &nbsp; &nbsp;MemberStatus memberStatus = member.getMemberStatus(); // *Point!<br>
 &nbsp; &nbsp;String memberStatusName = memberStatus.<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">getMemberStatusName();<br>
 &nbsp; &nbsp;...<br>
}</blockquote><div><br>by using cb.query.setXXXXXX(), i can set conditions only for Member Tabel. <br></div><div><br>How can i set the condition for memberstatus table?<br>Is it Possible in DBFlute ConditionBean?<br><br>
Thanks in advance,<br>トマス&nbsp; <br></div><br><br><br><br><br><br><div class="gmail_quote">2009/6/12 thomas <span dir="ltr">&lt;<a href="mailto:jp.mcy.10@gmail.com">jp.mcy.10@gmail.com</a>&gt;</span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hai,<br><br>Thanks for your reply...<div class="im"><br><br>/= = = = = = = = = = = = = = = = = = = = = = = = = = = =<br>
MemberCB cb = new MemberCB();<br>
cb.setupSelect_MemberStatus(); // *Point!<br>
<br>
List&lt;Member&gt; memberList = memberBhv.selectList(cb);<br>
for (Member member : memberList) {<br>
 &nbsp; &nbsp;// columns of MEMBER table<br>
 &nbsp; &nbsp;Integer memberId = member.getMemberId();<br>
 &nbsp; &nbsp;String memberName = member.getMemberName();<br>
<br>
 &nbsp; &nbsp;// columns of MEMBER_STATUS table<br>
 &nbsp; &nbsp;MemberStatus memberStatus = member.getMemberStatus(); // *Point!<br>
 &nbsp; &nbsp;String memberStatusName = memberStatus.<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">getMemberStatusName();<br>
 &nbsp; &nbsp;...<br>
}</blockquote><br><br><br></div>This is what i want...<br><br>Thank you very much.<br><br><br>Regards,<br>トマス<div><div></div><div class="h5"><br><br><br><br><br><br><br><div class="gmail_quote">On Fri, Jun 12, 2009 at 1:03 AM, kubo <span dir="ltr">&lt;<a href="mailto:dbflute@gmail.com" target="_blank">dbflute@gmail.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hello,<br>
<br>
Sorry, it&#39;s about time for me to go to bed...<br>
I can not make my reply for several hours.<br>
(until next morning in Japan)<br>
So I&#39;m trying to write what I can write now.<br>
<br>
<br>
If you want to select MEMBER and MEMBER_STATUS,<br>
(MEMBER and MEMBER_STATUS : many-to-one)<br>
you can implement in condition-bean like this:<br>
<br>
/= = = = = = = = = = = = = = = = = = = = = = = = = = = =<br>
MemberCB cb = new MemberCB();<br>
cb.setupSelect_MemberStatus(); // *Point!<br>
<br>
List&lt;Member&gt; memberList = memberBhv.selectList(cb);<br>
for (Member member : memberList) {<br>
 &nbsp; &nbsp;// columns of MEMBER table<br>
 &nbsp; &nbsp;Integer memberId = member.getMemberId();<br>
 &nbsp; &nbsp;String memberName = member.getMemberName();<br>
<br>
 &nbsp; &nbsp;// columns of MEMBER_STATUS table<br>
 &nbsp; &nbsp;MemberStatus memberStatus = member.getMemberStatus(); // *Point!<br>
 &nbsp; &nbsp;String memberStatusName = memberStatus.getMemberStatusName();<br>
 &nbsp; &nbsp;...<br>
}<br>
- - - - - - - -<br>
Please watch the method &#39;ConditionBeanBasicTest.test_basic_Tx()&#39;.<br>
<a href="https://www.seasar.org/svn/sandbox/dbflute/trunk/dbflute-basic-example/src/test/java/com/example/dbflute/basic/dbflute/howto/jp/ConditionBeanBasicTest.java" target="_blank">https://www.seasar.org/svn/sandbox/dbflute/trunk/dbflute-basic-example/src/test/java/com/example/dbflute/basic/dbflute/howto/jp/ConditionBeanBasicTest.java</a><br>


= = = = = = = = = =/<br>
<br>
<br>
If you want to select MEMBER and PURCHASE,<br>
(MEMBER and PURCHASE : one-to-many)<br>
you can implement in condition-bean like this:<br>
<br>
/= = = = = = = = = = = = = = = = = = = = = = = = = = = =<br>
MemberCB cb = new MemberCB();<br>
<br>
// At first, it selects the list of Member.<br>
ListResultBean&lt;Member&gt; memberList = memberBhv.selectList(cb);<br>
<br>
// And it loads the list of Purchase with its conditions.<br>
memberBhv.loadPurchaseList(memberList, new ConditionBeanSetupper&lt;PurchaseCB&gt;() {<br>
 &nbsp; &nbsp;public void setup(PurchaseCB cb) {<br>
 &nbsp; &nbsp; &nbsp; &nbsp;cb.query().setPurchaseCount_GreaterEqual(2);<br>
 &nbsp; &nbsp; &nbsp; &nbsp;cb.query().addOrderBy_PurchaseCount_Desc();<br>
 &nbsp; &nbsp;}<br>
}); // *Point!<br>
<br>
for (Member member : memberList) {<br>
 &nbsp; &nbsp;// columns of MEMBER table<br>
 &nbsp; &nbsp;Integer memberId = member.getMemberId();<br>
 &nbsp; &nbsp;String memberName = member.getMemberName();<br>
<br>
 &nbsp; &nbsp;// list of purchase for current member.<br>
 &nbsp; &nbsp;List&lt;Purchase&gt; purchaseList = member.getPurchaseList(); // *Point!<br>
 &nbsp; &nbsp;for (Purchase purchase : purchaseList) {<br>
 &nbsp; &nbsp; &nbsp; &nbsp;// columns of Purchase table<br>
 &nbsp; &nbsp; &nbsp; &nbsp;Integer purchaseId = purchase.getPurchaseId();<br>
 &nbsp; &nbsp; &nbsp; &nbsp;...<br>
 &nbsp; &nbsp;}<br>
}<br>
- - - - - - - -<br>
Please watch the method &#39;BehaviorMiddleTest.test_loadReferrer_Tx()&#39;.<br>
<a href="https://www.seasar.org/svn/sandbox/dbflute/trunk/dbflute-basic-example/src/test/java/com/example/dbflute/basic/dbflute/howto/jp/BehaviorMiddleTest.java" target="_blank">https://www.seasar.org/svn/sandbox/dbflute/trunk/dbflute-basic-example/src/test/java/com/example/dbflute/basic/dbflute/howto/jp/BehaviorMiddleTest.java</a><br>


= = = = = = = = = =/<br>
<div><div></div><div><br>
On Thu, Jun 11, 2009 at 11:56 PM, kubo&lt;<a href="mailto:dbflute@gmail.com" target="_blank">dbflute@gmail.com</a>&gt; wrote:<br>
&gt; Hello, this is jflute<br>
&gt;<br>
&gt; I&#39;m sorry that I can not accurately understand your question.<br>
&gt; What does it mean &quot;more than one table&quot;?<br>
&gt;<br>
&gt; Let me show this example database for our communication.<br>
&gt; <a href="http://dbflute.sandbox.seasar.org/view/exampledb/index.html?goto=1" target="_blank">http://dbflute.sandbox.seasar.org/view/exampledb/index.html?goto=1</a><br>
&gt;<br>
&gt; Does it means, for example,<br>
&gt; &quot;MEMBER and MEMBER_STATUS&quot;?<br>
&gt; (related two tables)<br>
&gt;<br>
&gt; select mbr.MEMBER.MEMBER_ID<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;mbr.MEMBER.MEMBER_NAME<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;mstat.MEMBER_STATUS_NAME<br>
&gt; &nbsp;from MEMBER mbr<br>
&gt; &nbsp; &nbsp;left outer join MEMBER_STATUS mstat<br>
&gt; &nbsp; &nbsp; &nbsp;on mbr.MEMBER_STATUS_CODE = mstat.MEMBER_STATUS_CODE<br>
&gt;<br>
&gt;<br>
&gt; 2009/6/11 thomas &lt;<a href="mailto:jp.mcy.10@gmail.com" target="_blank">jp.mcy.10@gmail.com</a>&gt;:<br>
&gt;&gt; hai,<br>
&gt;&gt;<br>
&gt;&gt; I want to clarify one thing.<br>
&gt;&gt; Is there any other way to select values from more than one table without<br>
&gt;&gt; using outside SQL?<br>
&gt;&gt;<br>
&gt;&gt; If there is any way how can i get the values from more than one table?<br>
&gt;&gt;<br>
&gt;&gt; Regards,<br>
&gt;&gt; トマス<br>
&gt;&gt;<br>
&gt;&gt; _______________________________________________<br>
&gt;&gt; Seasar-user mailing list<br>
&gt;&gt; <a href="mailto:Seasar-user@ml.seasar.org" target="_blank">Seasar-user@ml.seasar.org</a><br>
&gt;&gt; <a href="https://ml.seasar.org/mailman/listinfo/seasar-user" target="_blank">https://ml.seasar.org/mailman/listinfo/seasar-user</a><br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;<br>
_______________________________________________<br>
Seasar-user mailing list<br>
<a href="mailto:Seasar-user@ml.seasar.org" target="_blank">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>
</div></div></blockquote></div><br>
</div></div></blockquote></div><br>