blob: 462799fb162d096026297c5cf5a6604119e24946 [file] [log] [blame]
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>10.&nbsp; Default Schema</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 User's Guide"><link rel="up" href="ref_guide_dbsetup.html" title="Chapter&nbsp;4.&nbsp; JDBC"><link rel="prev" href="ref_guide_dbsetup_lrs.html" title="9.&nbsp; Large Result Sets"><link rel="next" href="ref_guide_schema_info.html" title="11.&nbsp; Schema Reflection"></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">10.&nbsp;
Default Schema
</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ref_guide_dbsetup_lrs.html">Prev</a>&nbsp;</td><th width="60%" align="center">Chapter&nbsp;4.&nbsp;
JDBC
</th><td width="20%" align="right">&nbsp;<a accesskey="n" href="ref_guide_schema_info.html">Next</a></td></tr></table><hr></div><div class="section" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="ref_guide_schema_def"></a>10.&nbsp;
Default Schema
</h2></div></div></div><a class="indexterm" name="d0e20188"></a><p>
It is common to duplicate a database model in multiple schemas. You may have one
schema for development and another for production, or different database users
may access different schemas. OpenJPA facilitates these patterns with the
<a href="ref_guide_conf_jdbc.html#openjpa.jdbc.Schema" title="6.11.&nbsp; openjpa.jdbc.Schema"><code class="literal">openjpa.jdbc.Schema</code>
</a> configuration property. This property establishes a default schema for
any unqualified table names, allowing you to leave schema names out of your
mapping definitions.
</p><p>
The <code class="literal">Schema</code> property also establishes the default schema for
new tables created through OpenJPA tools, such as the mapping tool covered in
<a href="ref_guide_mapping.html#ref_guide_mapping_mappingtool" title="1.&nbsp; Forward Mapping">Section&nbsp;1, &#8220;
Forward Mapping
&#8221;</a>.
</p></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ref_guide_dbsetup_lrs.html">Prev</a>&nbsp;</td><td width="20%" align="center"><a accesskey="u" href="ref_guide_dbsetup.html">Up</a></td><td width="40%" align="right">&nbsp;<a accesskey="n" href="ref_guide_schema_info.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">9.&nbsp;
Large Result Sets
&nbsp;</td><td width="20%" align="center"><a accesskey="h" href="manual.html">Home</a></td><td width="40%" align="right" valign="top">&nbsp;11.&nbsp;
Schema Reflection
</td></tr></table></div></body></html>