<div dir="ltr">$B>.NS(B (koichik) $BMM(B<br><br>conpota$B$G$9!#(B<br><br>$B$G$-$^$7$?!*(B<br>$B2sEz$"$j$,$H$&$4$6$$$^$7$?!#(B<br><br><div class="gmail_quote">2008/09/09 18:00 Koichi Kobayashi <span dir="ltr">&lt;<a href="mailto:koichik@improvement.jp">koichik@improvement.jp</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;">$B>.NS(B (koichik) $B$G$9!%(B<br>
<br>
Date: &nbsp; &nbsp;Tue, 9 Sep 2008 17:15:15 +0900<br>
From: &nbsp; &nbsp;<a href="mailto:conpota@gmail.com">conpota@gmail.com</a><br>
To: &nbsp; &nbsp; &nbsp;<a href="mailto:Seasar-user@ml.seasar.org">Seasar-user@ml.seasar.org</a><br>
Subject: [Seasar-user:15710] [S2JDBC]$BJ#?t%F!<%V%k$N7k9g(B<br>
<div class="Ih2E3d"><br>
&gt; $B$5$i$K%F!<%V%k$r7k9g$7$F(B<br>
&gt; Two two =<br>
&gt; jdbcManager.from(Two.class).innerJoin(&quot;oneTwo&quot;).innerJoin(&quot;oneTwo.oneList&quot;).where(&quot;name<br>
&gt; = ?&quot;, &quot;two1&quot;).getSingleResult();<br>
&gt; $B$H$9$k$H0J2<%(%i!<$K$J$j$^$9!#(B<br>
&gt; $B%(%s%F%#%F%#(B(One)$B$N%W%m%Q%F%#(B(oneTwo)$B$,IT@5$G$9!#(BJoinColumn$B$N(Bname$B$G;XDj$5$l$F$$$k30It%-!<(B(ONE_TWO_ID)$B$,B8:_$7$^$;$s!#(B<br>
<br>
</div><div class="Ih2E3d">&gt; One$B%(%s%F%#%F%#(B<br>
&gt; @ManyToOne<br>
&gt; public OneTwo oneTwo;<br>
<br>
</div>One $B$+$i(B OneTwo $B$X$N4XO"$,B?BP(B 1 $B$J$i!$(B<br>
one $B$+$i(B one_two $B$X$N30It%-!<$,I,MW$G$9$,!$(B<br>
<div class="Ih2E3d"><br>
&gt; CREATE TABLE one(<br>
&gt; &nbsp; id SERIAL PRIMARY KEY,<br>
&gt; &nbsp; name VARCHAR(64) NOT NULL<br>
&gt; );<br>
<br>
</div>$B$"$j$^$;$s!%(B<br>
$B!V30It%-!<(B(ONE_TWO_ID)$B$,B8:_$7$^$;$s!W$O(B<br>
$B$=$&$$$&0UL#$G$9!%(B<br>
<br>
$B<B:]$O(B one_two $B%F!<%V%k$,4XO"%F!<%V%k$G$7$g$&$+$i!$(B<br>
one $B%F!<%V%k$K30It%-!<$r;}$A$?$$$o$1$G$O$J$/!$(B<br>
One#oneTwho $B$NB?=EEY$N;XDj$,4V0c$C$F$$$k$N$@$H(B<br>
$B;W$$$^$9!%(B<br>
<br>
$BNc$($P!$4XO"%F!<%V%k$r30$7$F9M$($?>l9g$K(B<br>
# &#39;*&#39; $B$OB?$NB&(B<br>
<br>
+-----+ &nbsp; &nbsp;+-----+ &nbsp; &nbsp;+-------+<br>
| One |*---| Two |---*| Three |<br>
+-----+ &nbsp; &nbsp;+-----+ &nbsp; &nbsp;+-------+<br>
<br>
$B$H$7$?$$>l9g!$4XO"%F!<%V%k$r4^$a$k$H(B<br>
<br>
+-----+ &nbsp; &nbsp;+--------+ &nbsp; &nbsp;+-----+ &nbsp; &nbsp;+----------+ &nbsp; &nbsp;+-------+<br>
| One |----| OneTwo |*---| Two |---*| TwoThree |----| Three |<br>
+-----+ &nbsp; &nbsp;+--------+ &nbsp; &nbsp;+-----+ &nbsp; &nbsp;+----------+ &nbsp; &nbsp;+-------+<br>
<br>
$B$H$J$j$^$9!%(B<br>
$B$^$?!$4XO"$O30It%-!<$r;}$C$F$$$kB&$,=jM-B&$J$N$G!$(B<br>
One$B!$(BTwo$B!$(BThree $B$N;}$D4XO"$OA4$FHo=jM-B&$H$J$j!$(B<br>
mappedBy $B$,I,MW$K$J$j$^$9!%(B<br>
<br>
One$B%(%s%F%#%F%#(B<br>
@OneToOne(mappedBy = &quot;one&quot;)<br>
public OneTwo oneTwo;<br>
<br>
Two$B%(%s%F%#%F%#(B<br>
@OneToMany(mappedBy = &quot;two&quot;)<br>
public List&lt;OneTwo&gt; oneTwoList;<br>
@OneToMany(mappedBy = &quot;two&quot;)<br>
public List&lt;TwoThree&gt; twoThreeList;<br>
<br>
Three$B%(%s%F%#%F%#(B<br>
@OneToOne(mappedBy = &quot;three&quot;)<br>
<div class="Ih2E3d">public TwoThree twoThree;<br>
<br>
OneTwo$B%(%s%F%#%F%#(B<br>
@OneToOne<br>
</div>public One one;<br>
@ManyToOne<br>
public Two two;<br>
<br>
TwoThree$B%(%s%F%#%F%#(B<br>
@ManyToOne<br>
public Two two;<br>
@OneToOne<br>
public Three three;<br>
<br>
<br>
--<br>
&lt;component name=&quot;koichik&quot;&gt;<br>
 &nbsp; &nbsp;&lt;property name=&quot;fullName&quot;&gt;&quot;Koichi Kobayashi&quot;&lt;/property&gt;<br>
 &nbsp; &nbsp;&lt;property name=&quot;email&quot;&gt;&quot;<a href="mailto:koichik@improvement.jp">koichik@improvement.jp</a>&quot;&lt;/property&gt;<br>
 &nbsp; &nbsp;&lt;property name=&quot;blog&quot;&gt;&quot;<a href="http://d.hatena.ne.jp/koichik" target="_blank">http://d.hatena.ne.jp/koichik</a>&quot;&lt;/property&gt;<br>
&lt;/component&gt;<br>
<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><br clear="all"><br>-- <br>conpota &lt;<a href="mailto:conpota@gmail.com">conpota@gmail.com</a>&gt;<br>
</div>