blob: b65e6388a0d487e7e68378094385fd670290b4ec [file] [log] [blame]
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>18.&nbsp; Sybase Adaptive Server</title><link rel="stylesheet" href="css/docbook.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.72.0"><link rel="start" href="manual.html" title="Apache OpenJPA 1.2 User's Guide"><link rel="up" href="supported_databases.html" title="Appendix&nbsp;2.&nbsp; Supported Databases"><link rel="prev" href="dbsupport_postgresql.html" title="17.&nbsp; PostgreSQL"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">18.&nbsp;
Sybase Adaptive Server
</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="dbsupport_postgresql.html">Prev</a>&nbsp;</td><th width="60%" align="center">Appendix&nbsp;2.&nbsp;
Supported Databases
</th><td width="20%" align="right">&nbsp;</td></tr></table><hr></div><div class="section" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="dbsupport_sybase"></a>18.&nbsp;
Sybase Adaptive Server
</h2></div></div></div><div class="toc"><dl><dt><span class="section"><a href="dbsupport_sybase.html#dbsupport_sybase_issues">18.1.
Known issues with Sybase
</a></span></dt></dl></div><div class="example"><a name="example_props_sybase"></a><p class="title"><b>Example&nbsp;2.19.&nbsp;
Example properties for Sybase
</b></p><div class="example-contents"><pre class="programlisting">
openjpa.ConnectionDriverName: com.sybase.jdbc2.jdbc.SybDriver
openjpa.ConnectionURL: \
jdbc:sybase:Tds:SERVER_NAME:4100/DB_NAME?ServiceName=DB_NAME&amp;BE_AS_JDBC_COMPLIANT_AS_POSSIBLE=true
</pre></div></div><br class="example-break"><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="dbsupport_sybase_issues"></a>18.1.&nbsp;
Known issues with Sybase
</h3></div></div></div><div class="itemizedlist"><ul type="disc"><li><p>
The "<code class="literal">DYNAMIC_PREPARE</code>" parameter of the Sybase JDBC driver
cannot be used with OpenJPA.
</p></li><li><p>
Datastore locking cannot be used when manipulating many-to-many relations using
the default OpenJPA schema created by the schematool, unless an auto-increment
primary key field is manually added to the table.
</p></li><li><p>
Persisting a zero-length string results in a string with a single space
characted being returned from Sybase, Inc.'s JDBC driver.
</p></li><li><p>
The <code class="literal">BE_AS_JDBC_COMPLIANT_AS_POSSIBLE</code> is required in order to
use datastore (pessimistic) locking. Failure to set this property may lead to
obscure errors like " <code class="literal">FOR UPDATE can not be used in a SELECT which is
not part of the declaration of a cursor or which is not inside a stored
procedure.</code> ".
</p></li><li><p>
Applications performing update/insert data of the BigDecimal java type may fail
with OptimisticException if the data exceeds the scale or precision of the
column on Sybase. To avoid this problem, applications can specify the precision
and scale for the numeric type by setting numericTypeName='NUMERIC(p,s)' for
the column type mapped by the BigDecimal java type. See
<a href="ref_guide_conf_jdbc.html#openjpa.jdbc.DBDictionary" title="6.2.&nbsp; openjpa.jdbc.DBDictionary">openjpa.jdbc.DBDictionary</a> for
more detail. Alternatively, application can set the precision and scale using
the standard <code class="classname">Column</code> annotation, described in
<a href="jpa_overview_mapping_column.html" title="3.&nbsp; Column">Section&nbsp;3, &#8220;
Column
&#8221;</a>.
</p></li></ul></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="dbsupport_postgresql.html">Prev</a>&nbsp;</td><td width="20%" align="center"><a accesskey="u" href="supported_databases.html">Up</a></td><td width="40%" align="right">&nbsp;</td></tr><tr><td width="40%" align="left" valign="top">17.&nbsp;
PostgreSQL
&nbsp;</td><td width="20%" align="center"><a accesskey="h" href="manual.html">Home</a></td><td width="40%" align="right" valign="top">&nbsp;</td></tr></table></div></body></html>