File: group__dbo.html

package info (click to toggle)
witty 3.1.2-3
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 45,512 kB
  • ctags: 35,832
  • sloc: cpp: 69,469; ansic: 66,945; xml: 4,383; sh: 594; perl: 108; makefile: 106
file content (290 lines) | stat: -rw-r--r-- 21,476 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>Wt: Database Objects library (Dbo)</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.6 -->
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
      <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
    </ul>
  </div>
</div>
<div class="contents">
<h1>Database Objects library (Dbo)</h1>An implemenation of an Object Relational Mapping layer.  
<a href="#_details">More...</a><table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Classes</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">struct &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structWt_1_1Dbo_1_1ptr__tuple.html">Wt::Dbo::ptr_tuple&lt; T0, T1,, T9 &gt;</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">A utility class for defining a tuple of database objects.  <a href="structWt_1_1Dbo_1_1ptr__tuple.html#_details">More...</a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">class &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Dbo_1_1SqlStatement.html">Wt::Dbo::SqlStatement</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Abstract base class for a prepared SQL statement.  <a href="classWt_1_1Dbo_1_1SqlStatement.html#_details">More...</a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">class &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Dbo_1_1backend_1_1Postgres.html">Wt::Dbo::backend::Postgres</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">A PostgreSQL connection.  <a href="classWt_1_1Dbo_1_1backend_1_1Postgres.html#_details">More...</a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">class &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Dbo_1_1backend_1_1Sqlite3.html">Wt::Dbo::backend::Sqlite3</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">An SQLite3 connection.  <a href="classWt_1_1Dbo_1_1backend_1_1Sqlite3.html#_details">More...</a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">class &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Dbo_1_1collection.html">Wt::Dbo::collection&lt; C &gt;</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">An STL container for iterating query results.  <a href="classWt_1_1Dbo_1_1collection.html#_details">More...</a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">class &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Dbo_1_1Exception.html">Wt::Dbo::Exception</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Exception base class for Wt::Dbo.  <a href="classWt_1_1Dbo_1_1Exception.html#_details">More...</a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">class &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Dbo_1_1StaleObjectException.html">Wt::Dbo::StaleObjectException</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Exception thrown when Wt::Dbo detects a concurrent modification  <a href="classWt_1_1Dbo_1_1StaleObjectException.html#_details">More...</a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">class &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Dbo_1_1ObjectNotFoundException.html">Wt::Dbo::ObjectNotFoundException</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Exception thrown when trying to load a non-existing object.  <a href="classWt_1_1Dbo_1_1ObjectNotFoundException.html#_details">More...</a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">class &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Dbo_1_1NoUniqueResultException.html">Wt::Dbo::NoUniqueResultException</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Exception thrown when a query unexpectedly finds a non-unique result.  <a href="classWt_1_1Dbo_1_1NoUniqueResultException.html#_details">More...</a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">class &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Dbo_1_1Dbo.html">Wt::Dbo::Dbo</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">A base class for database objects.  <a href="classWt_1_1Dbo_1_1Dbo.html#_details">More...</a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">class &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Dbo_1_1ptr.html">Wt::Dbo::ptr&lt; C &gt;</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">A smart pointer for database objects.  <a href="classWt_1_1Dbo_1_1ptr.html#_details">More...</a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">class &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Dbo_1_1Query.html">Wt::Dbo::Query&lt; Result &gt;</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">A database query.  <a href="classWt_1_1Dbo_1_1Query.html#_details">More...</a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">class &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Dbo_1_1Session.html">Wt::Dbo::Session</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">A database session.  <a href="classWt_1_1Dbo_1_1Session.html#_details">More...</a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">class &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Dbo_1_1SqlConnection.html">Wt::Dbo::SqlConnection</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Abstract base class for an SQL connection.  <a href="classWt_1_1Dbo_1_1SqlConnection.html#_details">More...</a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">class &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structWt_1_1Dbo_1_1sql__value__traits.html">Wt::Dbo::sql_value_traits&lt; V, Enable &gt;</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Traits class for value types.  <a href="structWt_1_1Dbo_1_1sql__value__traits.html#_details">More...</a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">class &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structWt_1_1Dbo_1_1sql__result__traits.html">Wt::Dbo::sql_result_traits&lt; Result &gt;</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Traits class for result types.  <a href="structWt_1_1Dbo_1_1sql__result__traits.html#_details">More...</a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">class &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Dbo_1_1Transaction.html">Wt::Dbo::Transaction</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">A database transaction.  <a href="classWt_1_1Dbo_1_1Transaction.html#_details">More...</a><br></td></tr>
<tr><td colspan="2"><br><h2>Enumerations</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">enum &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__dbo.html#g1d0ec6819b1bf5b7a88ad030b91ca564">Wt::Dbo::RelationType</a> { <a class="el" href="group__dbo.html#gg1d0ec6819b1bf5b7a88ad030b91ca56432d7393c325724244671b18be53058fa">Wt::Dbo::ManyToOne</a>, 
<a class="el" href="group__dbo.html#gg1d0ec6819b1bf5b7a88ad030b91ca564d0bd477ec215a878e0758cce8494af24">Wt::Dbo::ManyToMany</a>
 }</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Type of an SQL relation.  <a href="group__dbo.html#g1d0ec6819b1bf5b7a88ad030b91ca564">More...</a><br></td></tr>
<tr><td colspan="2"><br><h2>Functions</h2></td></tr>
<tr><td class="memTemplParams" nowrap colspan="2">template&lt;class Action, typename V&gt; </td></tr>
<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="group__dbo.html#g8a2b653ff57f1459dfa2e556badd71d6">Wt::Dbo::field</a> (Action &amp;action, V &amp;value, const std::string &amp;name, int size=-1)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Maps a database object field.  <a href="#g8a2b653ff57f1459dfa2e556badd71d6"></a><br></td></tr>
<tr><td class="memTemplParams" nowrap colspan="2">template&lt;class Action, class C&gt; </td></tr>
<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="group__dbo.html#gb4d8cd501e0e5bcb7e590315758f05d8">Wt::Dbo::belongsTo</a> (Action &amp;action, ptr&lt; C &gt; &amp;value, const std::string &amp;name)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Maps the "One"-side of a ManyToOne relation.  <a href="#gb4d8cd501e0e5bcb7e590315758f05d8"></a><br></td></tr>
<tr><td class="memTemplParams" nowrap colspan="2">template&lt;class Action, class C&gt; </td></tr>
<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="group__dbo.html#g1a086b583fb150dbd4c5b4ba92bc177f">Wt::Dbo::hasMany</a> (Action &amp;action, collection&lt; ptr&lt; C &gt; &gt; &amp;value, RelationType type, const std::string &amp;joinName, const std::string &amp;joinId=&quot;&quot;)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Maps the "Many"-side of a ManyToOne or ManyToMany relation.  <a href="#g1a086b583fb150dbd4c5b4ba92bc177f"></a><br></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
An implemenation of an Object Relational Mapping layer. 
<p>
For an introduction, see the <a href="../../tutorial/dbo/tutorial.html">tutorial</a>. <hr><h2>Enumeration Type Documentation</h2>
<a class="anchor" name="g1d0ec6819b1bf5b7a88ad030b91ca564"></a><!-- doxytag: member="Wt::Dbo::RelationType" ref="g1d0ec6819b1bf5b7a88ad030b91ca564" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="group__dbo.html#g1d0ec6819b1bf5b7a88ad030b91ca564">Wt::Dbo::RelationType</a>          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Type of an SQL relation. 
<p>
<dl compact><dt><b>Enumerator: </b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><em><a class="anchor" name="gg1d0ec6819b1bf5b7a88ad030b91ca56432d7393c325724244671b18be53058fa"></a><!-- doxytag: member="ManyToOne" ref="gg1d0ec6819b1bf5b7a88ad030b91ca56432d7393c325724244671b18be53058fa" args="" -->ManyToOne</em>&nbsp;</td><td>
Many-to-One relationship. </td></tr>
<tr><td valign="top"><em><a class="anchor" name="gg1d0ec6819b1bf5b7a88ad030b91ca564d0bd477ec215a878e0758cce8494af24"></a><!-- doxytag: member="ManyToMany" ref="gg1d0ec6819b1bf5b7a88ad030b91ca564d0bd477ec215a878e0758cce8494af24" args="" -->ManyToMany</em>&nbsp;</td><td>
Many-to-Many relationship. </td></tr>
</table>
</dl>

</div>
</div><p>
<hr><h2>Function Documentation</h2>
<a class="anchor" name="gb4d8cd501e0e5bcb7e590315758f05d8"></a><!-- doxytag: member="Wt::Dbo::belongsTo" ref="gb4d8cd501e0e5bcb7e590315758f05d8" args="(Action &amp;action, ptr&lt; C &gt; &amp;value, const std::string &amp;name)" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class Action, class C&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">void Wt::Dbo::belongsTo           </td>
          <td>(</td>
          <td class="paramtype">Action &amp;&nbsp;</td>
          <td class="paramname"> <em>action</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">ptr&lt; C &gt; &amp;&nbsp;</td>
          <td class="paramname"> <em>value</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::string &amp;&nbsp;</td>
          <td class="paramname"> <em>name</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Maps the "One"-side of a ManyToOne relation. 
<p>
This function binds the pointer field <code>value</code> to the database field <code>name</code> <code>+ "_id"</code>.<p>
A <a class="el" href="group__dbo.html#gb4d8cd501e0e5bcb7e590315758f05d8" title="Maps the &quot;One&quot;-side of a ManyToOne relation.">belongsTo()</a> will usually have a counter-part <a class="el" href="group__dbo.html#g1a086b583fb150dbd4c5b4ba92bc177f" title="Maps the &quot;Many&quot;-side of a ManyToOne or ManyToMany relation.">hasMany()</a> declaration in the referenced class <code>C</code>.<p>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="group__dbo.html#g1a086b583fb150dbd4c5b4ba92bc177f" title="Maps the &quot;Many&quot;-side of a ManyToOne or ManyToMany relation.">hasMany()</a> </dd></dl>

</div>
</div><p>
<a class="anchor" name="g8a2b653ff57f1459dfa2e556badd71d6"></a><!-- doxytag: member="Wt::Dbo::field" ref="g8a2b653ff57f1459dfa2e556badd71d6" args="(Action &amp;action, V &amp;value, const std::string &amp;name, int size=-1)" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class Action, typename V&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">void Wt::Dbo::field           </td>
          <td>(</td>
          <td class="paramtype">Action &amp;&nbsp;</td>
          <td class="paramname"> <em>action</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">V &amp;&nbsp;</td>
          <td class="paramname"> <em>value</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::string &amp;&nbsp;</td>
          <td class="paramname"> <em>name</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>size</em> = <code>-1</code></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Maps a database object field. 
<p>
This function binds the field <code>value</code> to the database field <code>name</code>.<p>
The optional <code>size</code> may be used as a hint for the needed storage. It is only useful for <em>std::string</em> or <em><a class="el" href="classWt_1_1WString.html" title="A unicode string class, with support for localization.">WString</a></em> fields, and causes the schema to use a <code>varchar(</code><em><code>size</code></em><code>)</code> for storing the field instead of an unlimited length string type.<p>
You may want to specialize this method for a particular value type, if it is for example a composite type which should be persisted in multiple database fields.<p>
For example: <div class="fragment"><pre class="fragment"> <span class="keyword">struct </span>Coordinate {
   <span class="keywordtype">int</span> x, y;
 };

 <span class="keyword">namespace </span>Wt {
     <span class="keyword">namespace </span>Dbo {

         <span class="keyword">template</span> &lt;<span class="keyword">class</span> Action&gt;
         <span class="keywordtype">void</span> <a class="code" href="group__dbo.html#g8a2b653ff57f1459dfa2e556badd71d6" title="Maps a database object field.">field</a>(Action&amp; action, Coordinate&amp; coordinate, <span class="keyword">const</span> std::string&amp; name)
         {
             <a class="code" href="group__dbo.html#g8a2b653ff57f1459dfa2e556badd71d6" title="Maps a database object field.">field</a>(action, coordinate.x, name + <span class="stringliteral">"_x"</span>);
             <a class="code" href="group__dbo.html#g8a2b653ff57f1459dfa2e556badd71d6" title="Maps a database object field.">field</a>(action, coordinate.y, name + <span class="stringliteral">"_y"</span>);
         }

     }
 }
</pre></div> 
</div>
</div><p>
<a class="anchor" name="g1a086b583fb150dbd4c5b4ba92bc177f"></a><!-- doxytag: member="Wt::Dbo::hasMany" ref="g1a086b583fb150dbd4c5b4ba92bc177f" args="(Action &amp;action, collection&lt; ptr&lt; C &gt; &gt; &amp;value, RelationType type, const std::string &amp;joinName, const std::string &amp;joinId=&quot;&quot;)" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class Action, class C&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">void Wt::Dbo::hasMany           </td>
          <td>(</td>
          <td class="paramtype">Action &amp;&nbsp;</td>
          <td class="paramname"> <em>action</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">collection&lt; ptr&lt; C &gt; &gt; &amp;&nbsp;</td>
          <td class="paramname"> <em>value</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">RelationType&nbsp;</td>
          <td class="paramname"> <em>type</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::string &amp;&nbsp;</td>
          <td class="paramname"> <em>joinName</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::string &amp;&nbsp;</td>
          <td class="paramname"> <em>joinId</em> = <code>&quot;&quot;</code></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Maps the "Many"-side of a ManyToOne or ManyToMany relation. 
<p>
This function binds the <a class="el" href="classWt_1_1Dbo_1_1collection.html" title="An STL container for iterating query results.">collection</a> field <code>value</code> to contain objects (of type <code>C</code>).<p>
For a <a class="el" href="group__dbo.html#gg1d0ec6819b1bf5b7a88ad030b91ca56432d7393c325724244671b18be53058fa">ManyToOne</a> relation, the query is defined by the database field <code>joinName</code> <code>+ "_id"</code> in the table that matches <code>C</code>. This should be the same name as passed to the matching <a class="el" href="group__dbo.html#gb4d8cd501e0e5bcb7e590315758f05d8" title="Maps the &quot;One&quot;-side of a ManyToOne relation.">belongsTo()</a> method for the other side of the relation.<p>
For a <a class="el" href="group__dbo.html#gg1d0ec6819b1bf5b7a88ad030b91ca564d0bd477ec215a878e0758cce8494af24">ManyToMany</a> relation, the <code>joinName</code> is the name of a linker table (this linker table may be schema qualified, e.g. <code>"myschema.posts_tags"</code>. Thus, also for a ManyToMany relation, both sides of the relationship will have the same joinName passed to them. You may optionally specify the <code>joinId</code> which is used to reference this side of the relationship in the join table. If <code>joinId</code> is left blank, the value will be table name of the current class + "_id".<p>
A <a class="el" href="group__dbo.html#g1a086b583fb150dbd4c5b4ba92bc177f" title="Maps the &quot;Many&quot;-side of a ManyToOne or ManyToMany relation.">hasMany()</a> must have a counter-part <a class="el" href="group__dbo.html#gb4d8cd501e0e5bcb7e590315758f05d8" title="Maps the &quot;One&quot;-side of a ManyToOne relation.">belongsTo()</a> or <a class="el" href="group__dbo.html#g1a086b583fb150dbd4c5b4ba92bc177f" title="Maps the &quot;Many&quot;-side of a ManyToOne or ManyToMany relation.">hasMany()</a> declaration in the referenced class <code>C</code>.<p>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="group__dbo.html#gb4d8cd501e0e5bcb7e590315758f05d8" title="Maps the &quot;One&quot;-side of a ManyToOne relation.">belongsTo()</a> </dd></dl>

</div>
</div><p>
</div>
<hr size="1"><address style="align: right;"><small>
Generated on Fri Mar 26 17:12:06 2010 for <a href="http://www.webtoolkit.eu/wt/">Wt</a> by&nbsp;<a href="http://www.doxygen.org/index.html"><img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.6</small></address>
</body>
</html>