Re: EO_PK_TABLE not being created
"Mike Warren" <[email protected]> Sat, 3 Sep 2011 12:49:48 -0700
| Newsgroups | gmane.comp.web.webobjects.woproject.devel |
|---|---|
| Message-ID | <[email protected]> |
--Apple-Mail-1--382743661 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii Cord, The default behavior I see for creating new EOs is with the selection of a p= rimary key from a db sequence. An easy test would be to create a sequence n= amed registration_seq (for db table registration) and the primary key should= be auto created for you during your insert. The other controls for primary= key are found in the Entity Modeler app.=20 Hope this helps, Mike On Sep 3, 2011, at 12:39 PM, "Cord Sengbusch" <[email protected]> wrot= e: > Hi All - >=20 > I am using Eclipse, WOLips, WebObjects 5.3.3 and MySQL for a small project= . >=20 > I am able to query tables in my database, but as soon as I try to insert a= row using my WebObjects application, I get the following exception: >=20 > Error: java.lang.IllegalStateException: Adaptor com.webobjects.jdb= cadaptor.JDBCAdaptor@a8cf03 failed to provide new primary keys for entity 'R= egistration' > Reason: Adaptor com.webobjects.jdbcadaptor.JDBCAdaptor@a8cf03 faile= d to provide new primary keys for entity 'Registration' >=20 > In Entity Modeler I have com.webobjects.jdbcadaptor.MySQLPlugIn as the the= Plugin in the config file. >=20 > When viewing my database I do not see an EO_PK_TABLE. >=20 > Not sure how to get my application to create/use the eo_pk_table. >=20 > Thanks for the help. >=20 > Cord --Apple-Mail-1--382743661 Content-Transfer-Encoding: 7bit Content-Type: text/html; charset=utf-8 <html><body bgcolor="#FFFFFF"><div>Cord,</div><div><br></div><div>The default behavior I see for creating new EOs is with the selection of a primary key from a db sequence. An easy test would be to create a sequence named registration_seq (for db table registration) and the primary key should be auto created for you during your insert. The other controls for primary key are found in the Entity Modeler app. <br><br>Hope this helps,<br><div>Mike</div></div><div><br>On Sep 3, 2011, at 12:39 PM , "Cord Sengbusch" <<a href="mailto:[email protected]">[email protected]</a>> wrote:<br><br></div><div></div><blockquote type="cite"><div>Hi All -<div><br></div><div>I am using Eclipse, WOLips, WebObjects 5.3.3 and MySQL for a small project.</div><div><br></div><div>I am able to query tables in my database, but as soon as I try to insert a row using my WebObjects application, I get the following exception:</div> <div><br></div><div><span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; font-family: Times; font-size: medium; "><table border="0" width="100%"><tbody><tr><td align="right" valign="top" height="13"> <b>Error:</b></td><td align="left" valign="top" height="13">java.lang.IllegalStateException: Adaptor com.webobjects.jdbcadaptor.JDBCAdaptor@a8cf03 failed to provide new primary keys for entity 'Registration'</td></tr> <tr><td align="right" valign="top"><b>Reason:</b></td><td align="left" valign="top">Adaptor com.webobjects.jdbcadaptor.JDBCAdaptor@a8cf03 failed to provide new primary keys for entity 'Registration'<br></td></tr></tbody></table> <br></span></div><div><span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; font-family: Times; font-size: medium; ">In Entity Modeler I have com.webobjects.jdbcadaptor.MySQLPlugIn as the the Plugin in the config file.</span></div> <div><span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; font-family: Times; font-size: medium; "><br></span></div><div><font class="Apple-style-span" face="Times" size="3"><span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;">When viewing my database I do not see an EO_PK_TABLE.</span></font></div> <div><font class="Apple-style-span" face="Times" size="3"><span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;"><br></span></font></div><div><span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; font-family: Times; font-size: medium; ">Not sure how to get my application to create/use the eo_pk_table.</span></div> <div><span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; font-family: Times; font-size: medium; "><br></span></div><div><span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; font-family: Times; font-size: medium; ">Thanks for the help.</span></div> <div><span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; font-family: Times; font-size: medium; "><br></span></div><div><span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; font-family: Times; font-size: medium; ">Cord</span></div> </div></blockquote></body></html> --Apple-Mail-1--382743661--