[hibernate-commits] Hibernate SVN: r14653 - in
core/trunk/documentation/manual/src/main/docbook/pot: content
and 1 other directory.
hibernate-commits at lists.jboss.org
hibernate-commits at lists.jboss.org
Wed May 7 17:02:36 EDT 2008
Author: steve.ebersole at jboss.com
Date: 2008-05-07 17:02:35 -0400 (Wed, 07 May 2008)
New Revision: 14653
Modified:
core/trunk/documentation/manual/src/main/docbook/pot/content/architecture.pot
core/trunk/documentation/manual/src/main/docbook/pot/content/association_mapping.pot
core/trunk/documentation/manual/src/main/docbook/pot/content/basic_mapping.pot
core/trunk/documentation/manual/src/main/docbook/pot/content/batch.pot
core/trunk/documentation/manual/src/main/docbook/pot/content/best_practices.pot
core/trunk/documentation/manual/src/main/docbook/pot/content/collection_mapping.pot
core/trunk/documentation/manual/src/main/docbook/pot/content/component_mapping.pot
core/trunk/documentation/manual/src/main/docbook/pot/content/configuration.pot
core/trunk/documentation/manual/src/main/docbook/pot/content/events.pot
core/trunk/documentation/manual/src/main/docbook/pot/content/example_mappings.pot
core/trunk/documentation/manual/src/main/docbook/pot/content/example_parentchild.pot
core/trunk/documentation/manual/src/main/docbook/pot/content/example_weblog.pot
core/trunk/documentation/manual/src/main/docbook/pot/content/filters.pot
core/trunk/documentation/manual/src/main/docbook/pot/content/inheritance_mapping.pot
core/trunk/documentation/manual/src/main/docbook/pot/content/performance.pot
core/trunk/documentation/manual/src/main/docbook/pot/content/persistent_classes.pot
core/trunk/documentation/manual/src/main/docbook/pot/content/preface.pot
core/trunk/documentation/manual/src/main/docbook/pot/content/query_criteria.pot
core/trunk/documentation/manual/src/main/docbook/pot/content/query_hql.pot
core/trunk/documentation/manual/src/main/docbook/pot/content/query_sql.pot
core/trunk/documentation/manual/src/main/docbook/pot/content/session_api.pot
core/trunk/documentation/manual/src/main/docbook/pot/content/toolset_guide.pot
core/trunk/documentation/manual/src/main/docbook/pot/content/transactions.pot
core/trunk/documentation/manual/src/main/docbook/pot/content/tutorial.pot
core/trunk/documentation/manual/src/main/docbook/pot/content/xml.pot
core/trunk/documentation/manual/src/main/docbook/pot/legal_notice.pot
Log:
HHH-3270 : documentation license
Modified: core/trunk/documentation/manual/src/main/docbook/pot/content/architecture.pot
===================================================================
--- core/trunk/documentation/manual/src/main/docbook/pot/content/architecture.pot 2008-05-07 20:59:35 UTC (rev 14652)
+++ core/trunk/documentation/manual/src/main/docbook/pot/content/architecture.pot 2008-05-07 21:02:35 UTC (rev 14653)
@@ -1,256 +1,322 @@
+# SOME DESCRIPTIVE TITLE.
+# FIRST AUTHOR <EMAIL at ADDRESS>, YEAR.
+#
+#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
-"POT-Creation-Date: 2007-10-19 10:28-0500\n"
+"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
+"POT-Creation-Date: 2008-05-07 21:01+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL at ADDRESS>\n"
-"Language-Team: LANGUAGE <LL at li.org>\n"
+"Language-Team: LANGUAGE <kde-i18n-doc at kde.org>\n"
"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Type: application/x-xml2pot; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-#. When image changes, this message will be marked fuzzy or untranslated for you.
-#. It doesn't matter what you translate it to: it's not used at all.
-#: architecture.xml:32(None)
-msgid "@@image: '../images/overview.svg'; md5=2d9211eace02ecef615f7dd42beec14c"
-msgstr ""
-
-#. When image changes, this message will be marked fuzzy or untranslated for you.
-#. It doesn't matter what you translate it to: it's not used at all.
-#: architecture.xml:35(None)
-msgid "@@image: '../images/overview.png'; md5=a2b5f0f7dc75d9773305d4d824880e8c"
-msgstr ""
-
-#. When image changes, this message will be marked fuzzy or untranslated for you.
-#. It doesn't matter what you translate it to: it's not used at all.
-#: architecture.xml:54(None)
-msgid "@@image: '../images/lite.svg'; md5=2178e70b3b165736d33b085dcad93699"
-msgstr ""
-
-#. When image changes, this message will be marked fuzzy or untranslated for you.
-#. It doesn't matter what you translate it to: it's not used at all.
-#: architecture.xml:57(None)
-msgid "@@image: '../images/lite.png'; md5=7dd864188937e2dfef42a706235f74c3"
-msgstr ""
-
-#. When image changes, this message will be marked fuzzy or untranslated for you.
-#. It doesn't matter what you translate it to: it's not used at all.
-#: architecture.xml:68(None)
-msgid "@@image: '../images/full_cream.svg'; md5=4ef192f03e90e451e5dcb287d2709687"
-msgstr ""
-
-#. When image changes, this message will be marked fuzzy or untranslated for you.
-#. It doesn't matter what you translate it to: it's not used at all.
-#: architecture.xml:71(None)
-msgid "@@image: '../images/full_cream.png'; md5=c3ee197b49364a876bc5867d5c2c6db7"
-msgstr ""
-
-#: architecture.xml:21(title)
+#. Tag: title
+#: architecture.xml:30
+#, no-c-format
msgid "Architecture"
msgstr ""
-#: architecture.xml:24(title)
+#. Tag: title
+#: architecture.xml:33
+#, no-c-format
msgid "Overview"
msgstr ""
-#: architecture.xml:26(para)
+#. Tag: para
+#: architecture.xml:35
+#, no-c-format
msgid "A (very) high-level view of the Hibernate architecture:"
msgstr ""
-#: architecture.xml:39(para)
+#. Tag: para
+#: architecture.xml:48
+#, no-c-format
msgid "This diagram shows Hibernate using the database and configuration data to provide persistence services (and persistent objects) to the application."
msgstr ""
-#: architecture.xml:44(para)
+#. Tag: para
+#: architecture.xml:53
+#, no-c-format
msgid "We would like to show a more detailed view of the runtime architecture. Unfortunately, Hibernate is flexible and supports several approaches. We will show the two extremes. The \"lite\" architecture has the application provide its own JDBC connections and manage its own transactions. This approach uses a minimal subset of Hibernate's APIs:"
msgstr ""
-#: architecture.xml:61(para)
+#. Tag: para
+#: architecture.xml:70
+#, no-c-format
msgid "The \"full cream\" architecture abstracts the application away from the underlying JDBC/JTA APIs and lets Hibernate take care of the details."
msgstr ""
-#: architecture.xml:80(term)
+#. Tag: para
+#: architecture.xml:84
+#, no-c-format
+msgid "Heres some definitions of the objects in the diagrams:"
+msgstr ""
+
+#. Tag: term
+#: architecture.xml:89
+#, no-c-format
msgid "SessionFactory (<literal>org.hibernate.SessionFactory</literal>)"
msgstr ""
-#: architecture.xml:82(para)
+#. Tag: para
+#: architecture.xml:91
+#, no-c-format
msgid "A threadsafe (immutable) cache of compiled mappings for a single database. A factory for <literal>Session</literal> and a client of <literal>ConnectionProvider</literal>. Might hold an optional (second-level) cache of data that is reusable between transactions, at a process- or cluster-level."
msgstr ""
-#: architecture.xml:92(term)
+#. Tag: term
+#: architecture.xml:101
+#, no-c-format
msgid "Session (<literal>org.hibernate.Session</literal>)"
msgstr ""
-#: architecture.xml:94(para)
+#. Tag: para
+#: architecture.xml:103
+#, no-c-format
msgid "A single-threaded, short-lived object representing a conversation between the application and the persistent store. Wraps a JDBC connection. Factory for <literal>Transaction</literal>. Holds a mandatory (first-level) cache of persistent objects, used when navigating the object graph or looking up objects by identifier."
msgstr ""
-#: architecture.xml:104(term)
+#. Tag: term
+#: architecture.xml:113
+#, no-c-format
msgid "Persistent objects and collections"
msgstr ""
-#: architecture.xml:106(para)
+#. Tag: para
+#: architecture.xml:115
+#, no-c-format
msgid "Short-lived, single threaded objects containing persistent state and business function. These might be ordinary JavaBeans/POJOs, the only special thing about them is that they are currently associated with (exactly one) <literal>Session</literal>. As soon as the <literal>Session</literal> is closed, they will be detached and free to use in any application layer (e.g. directly as data transfer objects to and from presentation)."
msgstr ""
-#: architecture.xml:117(term)
+#. Tag: term
+#: architecture.xml:126
+#, no-c-format
msgid "Transient and detached objects and collections"
msgstr ""
-#: architecture.xml:119(para)
+#. Tag: para
+#: architecture.xml:128
+#, no-c-format
msgid "Instances of persistent classes that are not currently associated with a <literal>Session</literal>. They may have been instantiated by the application and not (yet) persisted or they may have been instantiated by a closed <literal>Session</literal>."
msgstr ""
-#: architecture.xml:128(term)
+#. Tag: term
+#: architecture.xml:137
+#, no-c-format
msgid "Transaction (<literal>org.hibernate.Transaction</literal>)"
msgstr ""
-#: architecture.xml:130(para)
+#. Tag: para
+#: architecture.xml:139
+#, no-c-format
msgid "(Optional) A single-threaded, short-lived object used by the application to specify atomic units of work. Abstracts application from underlying JDBC, JTA or CORBA transaction. A <literal>Session</literal> might span several <literal>Transaction</literal>s in some cases. However, transaction demarcation, either using the underlying API or <literal>Transaction</literal>, is never optional!"
msgstr ""
-#: architecture.xml:141(term)
+#. Tag: term
+#: architecture.xml:150
+#, no-c-format
msgid "ConnectionProvider (<literal>org.hibernate.connection.ConnectionProvider</literal>)"
msgstr ""
-#: architecture.xml:143(para)
+#. Tag: para
+#: architecture.xml:152
+#, no-c-format
msgid "(Optional) A factory for (and pool of) JDBC connections. Abstracts application from underlying <literal>Datasource</literal> or <literal>DriverManager</literal>. Not exposed to application, but can be extended/implemented by the developer."
msgstr ""
-#: architecture.xml:151(term)
+#. Tag: term
+#: architecture.xml:160
+#, no-c-format
msgid "TransactionFactory (<literal>org.hibernate.TransactionFactory</literal>)"
msgstr ""
-#: architecture.xml:153(para)
+#. Tag: para
+#: architecture.xml:162
+#, no-c-format
msgid "(Optional) A factory for <literal>Transaction</literal> instances. Not exposed to the application, but can be extended/implemented by the developer."
msgstr ""
-#: architecture.xml:160(emphasis)
+#. Tag: emphasis
+#: architecture.xml:169
+#, no-c-format
msgid "Extension Interfaces"
msgstr ""
-#: architecture.xml:162(para)
+#. Tag: para
+#: architecture.xml:171
+#, no-c-format
msgid "Hibernate offers many optional extension interfaces you can implement to customize the behavior of your persistence layer. See the API documentation for details."
msgstr ""
-#: architecture.xml:75(para)
-msgid "Heres some definitions of the objects in the diagrams: <placeholder-1/>"
-msgstr ""
-
-#: architecture.xml:171(para)
+#. Tag: para
+#: architecture.xml:180
+#, no-c-format
msgid "Given a \"lite\" architecture, the application bypasses the <literal>Transaction</literal>/<literal>TransactionFactory</literal> and/or <literal>ConnectionProvider</literal> APIs to talk to JTA or JDBC directly."
msgstr ""
-#: architecture.xml:179(title)
+#. Tag: title
+#: architecture.xml:188
+#, no-c-format
msgid "Instance states"
msgstr ""
-#: architecture.xml:180(para)
+#. Tag: para
+#: architecture.xml:189
+#, no-c-format
msgid "An instance of a persistent classes may be in one of three different states, which are defined with respect to a <emphasis>persistence context</emphasis>. The Hibernate <literal>Session</literal> object is the persistence context:"
msgstr ""
-#: architecture.xml:188(term)
+#. Tag: term
+#: architecture.xml:197
+#, no-c-format
msgid "transient"
msgstr ""
-#: architecture.xml:190(para)
+#. Tag: para
+#: architecture.xml:199
+#, no-c-format
msgid "The instance is not, and has never been associated with any persistence context. It has no persistent identity (primary key value)."
msgstr ""
-#: architecture.xml:198(term)
+#. Tag: term
+#: architecture.xml:207
+#, no-c-format
msgid "persistent"
msgstr ""
-#: architecture.xml:200(para)
+#. Tag: para
+#: architecture.xml:209
+#, no-c-format
msgid "The instance is currently associated with a persistence context. It has a persistent identity (primary key value) and, perhaps, a corresponding row in the database. For a particular persistence context, Hibernate <emphasis>guarantees</emphasis> that persistent identity is equivalent to Java identity (in-memory location of the object)."
msgstr ""
-#: architecture.xml:212(term)
+#. Tag: term
+#: architecture.xml:221
+#, no-c-format
msgid "detached"
msgstr ""
-#: architecture.xml:214(para)
-msgid "The instance was once associated with a persistence context, but that context was closed, or the instance was serialized to another process. It has a persistent identity and, perhaps, a corrsponding row in the database. For detached instances, Hibernate makes no guarantees about the relationship between persistent identity and Java identity."
+#. Tag: para
+#: architecture.xml:223
+#, no-c-format
+msgid "The instance was once associated with a persistence context, but that context was closed, or the instance was serialized to another process. It has a persistent identity and, perhaps, a corresponding row in the database. For detached instances, Hibernate makes no guarantees about the relationship between persistent identity and Java identity."
msgstr ""
-#: architecture.xml:229(title)
+#. Tag: title
+#: architecture.xml:238
+#, no-c-format
msgid "JMX Integration"
msgstr ""
-#: architecture.xml:231(para)
+#. Tag: para
+#: architecture.xml:240
+#, no-c-format
msgid "JMX is the J2EE standard for management of Java components. Hibernate may be managed via a JMX standard service. We provide an MBean implementation in the distribution, <literal>org.hibernate.jmx.HibernateService</literal>."
msgstr ""
-#: architecture.xml:237(para)
+#. Tag: para
+#: architecture.xml:246
+#, no-c-format
msgid "For an example how to deploy Hibernate as a JMX service on the JBoss Application Server, please see the JBoss User Guide. On JBoss AS, you also get these benefits if you deploy using JMX:"
msgstr ""
-#: architecture.xml:245(para)
+#. Tag: para
+#: architecture.xml:254
+#, no-c-format
msgid "<emphasis>Session Management:</emphasis> The Hibernate <literal>Session</literal>'s life cycle can be automatically bound to the scope of a JTA transaction. This means you no longer have to manually open and close the <literal>Session</literal>, this becomes the job of a JBoss EJB interceptor. You also don't have to worry about transaction demarcation in your code anymore (unless you'd like to write a portable persistence layer of course, use the optional Hibernate <literal>Transaction</literal> API for this). You call the <literal>HibernateContext</literal> to access a <literal>Session</literal>."
msgstr ""
-#: architecture.xml:257(para)
+#. Tag: para
+#: architecture.xml:266
+#, no-c-format
msgid "<emphasis>HAR deployment:</emphasis> Usually you deploy the Hibernate JMX service using a JBoss service deployment descriptor (in an EAR and/or SAR file), it supports all the usual configuration options of a Hibernate <literal>SessionFactory</literal>. However, you still have to name all your mapping files in the deployment descriptor. If you decide to use the optional HAR deployment, JBoss will automatically detect all mapping files in your HAR file."
msgstr ""
-#: architecture.xml:268(para)
+#. Tag: para
+#: architecture.xml:277
+#, no-c-format
msgid "Consult the JBoss AS user guide for more information about these options."
msgstr ""
-#: architecture.xml:272(para)
+#. Tag: para
+#: architecture.xml:281
+#, no-c-format
msgid "Another feature available as a JMX service are runtime Hibernate statistics. See <xref linkend=\"configuration-optional-statistics\"/>."
msgstr ""
-#: architecture.xml:279(title)
+#. Tag: title
+#: architecture.xml:288
+#, no-c-format
msgid "JCA Support"
msgstr ""
-#: architecture.xml:280(para)
+#. Tag: para
+#: architecture.xml:289
+#, no-c-format
msgid "Hibernate may also be configured as a JCA connector. Please see the website for more details. Please note that Hibernate JCA support is still considered experimental."
msgstr ""
-#: architecture.xml:287(title)
+#. Tag: title
+#: architecture.xml:296
+#, no-c-format
msgid "Contextual Sessions"
msgstr ""
-#: architecture.xml:288(para)
+#. Tag: para
+#: architecture.xml:297
+#, no-c-format
msgid "Most applications using Hibernate need some form of \"contextual\" sessions, where a given session is in effect throughout the scope of a given context. However, across applications the definition of what constitutes a context is typically different; and different contexts define different scopes to the notion of current. Applications using Hibernate prior to version 3.0 tended to utilize either home-grown <literal>ThreadLocal</literal>-based contextual sessions, helper classes such as <literal>HibernateUtil</literal>, or utilized third-party frameworks (such as Spring or Pico) which provided proxy/interception-based contextual sessions."
msgstr ""
-#: architecture.xml:297(para)
+#. Tag: para
+#: architecture.xml:306
+#, no-c-format
msgid "Starting with version 3.0.1, Hibernate added the <literal>SessionFactory.getCurrentSession()</literal> method. Initially, this assumed usage of <literal>JTA</literal> transactions, where the <literal>JTA</literal> transaction defined both the scope and context of a current session. The Hibernate team maintains that, given the maturity of the numerous stand-alone <literal>JTA TransactionManager</literal> implementations out there, most (if not all) applications should be using <literal>JTA</literal> transaction management whether or not they are deployed into a <literal>J2EE</literal> container. Based on that, the <literal>JTA</literal>-based contextual sessions is all you should ever need to use."
msgstr ""
-#: architecture.xml:307(para)
+#. Tag: para
+#: architecture.xml:316
+#, no-c-format
msgid "However, as of version 3.1, the processing behind <literal>SessionFactory.getCurrentSession()</literal> is now pluggable. To that end, a new extension interface (<literal>org.hibernate.context.CurrentSessionContext</literal>) and a new configuration parameter (<literal>hibernate.current_session_context_class</literal>) have been added to allow pluggability of the scope and context of defining current sessions."
msgstr ""
-#: architecture.xml:314(para)
+#. Tag: para
+#: architecture.xml:323
+#, no-c-format
msgid "See the Javadocs for the <literal>org.hibernate.context.CurrentSessionContext</literal> interface for a detailed discussion of its contract. It defines a single method, <literal>currentSession()</literal>, by which the implementation is responsible for tracking the current contextual session. Out-of-the-box, Hibernate comes with three implementations of this interface."
msgstr ""
-#: architecture.xml:324(para)
+#. Tag: para
+#: architecture.xml:333
+#, no-c-format
msgid "<literal>org.hibernate.context.JTASessionContext</literal> - current sessions are tracked and scoped by a <literal>JTA</literal> transaction. The processing here is exactly the same as in the older JTA-only approach. See the Javadocs for details."
msgstr ""
-#: architecture.xml:332(para)
+#. Tag: para
+#: architecture.xml:341
+#, no-c-format
msgid "<literal>org.hibernate.context.ThreadLocalSessionContext</literal> - current sessions are tracked by thread of execution. Again, see the Javadocs for details."
msgstr ""
-#: architecture.xml:338(para)
+#. Tag: para
+#: architecture.xml:347
+#, no-c-format
msgid "<literal>org.hibernate.context.ManagedSessionContext</literal> - current sessions are tracked by thread of execution. However, you are responsible to bind and unbind a <literal>Session</literal> instance with static methods on this class, it does never open, flush, or close a <literal>Session</literal>."
msgstr ""
-#: architecture.xml:347(para)
-msgid "The first two implementations provide a \"one session - one database transaction\" programming model, also known and used as <emphasis>session-per-request</emphasis>. The beginning and end of a Hibernate session is defined by the duration of a database transaction. If you use programatic transaction demarcation in plain JSE without JTA, you are adviced to use the Hibernate <literal>Transaction</literal> API to hide the underlying transaction system from your code. If you use JTA, use the JTA interfaces to demarcate transactions. If you execute in an EJB container that supports CMT, transaction boundaries are defined declaratively and you don't need any transaction or session demarcation operations in your code. Refer to <xref linkend=\"transactions\"/> for more information and code examples."
+#. Tag: para
+#: architecture.xml:356
+#, no-c-format
+msgid "The first two implementations provide a \"one session - one database transaction\" programming model, also known and used as <emphasis>session-per-request</emphasis>. The beginning and end of a Hibernate session is defined by the duration of a database transaction. If you use programmatic transaction demarcation in plain JSE without JTA, you are advised to use the Hibernate <literal>Transaction</literal> API to hide the underlying transaction system from your code. If you use JTA, use the JTA interfaces to demarcate transactions. If you execute in an EJB container that supports CMT, transaction boundaries are defined declaratively and you don't need any transaction or session demarcation operations in your code. Refer to <xref linkend=\"transactions\"/> for more information and code examples."
msgstr ""
-#: architecture.xml:359(para)
+#. Tag: para
+#: architecture.xml:368
+#, no-c-format
msgid "The <literal>hibernate.current_session_context_class</literal> configuration parameter defines which <literal>org.hibernate.context.CurrentSessionContext</literal> implementation should be used. Note that for backwards compatibility, if this config param is not set but a <literal>org.hibernate.transaction.TransactionManagerLookup</literal> is configured, Hibernate will use the <literal>org.hibernate.context.JTASessionContext</literal>. Typically, the value of this parameter would just name the implementation class to use; for the three out-of-the-box implementations, however, there are three corresponding short names, \"jta\", \"thread\", and \"managed\"."
msgstr ""
-#. Put one translator per line, in the form of NAME <EMAIL>, YEAR1, YEAR2.
-#: architecture.xml:0(None)
-msgid "translator-credits"
-msgstr ""
-
Modified: core/trunk/documentation/manual/src/main/docbook/pot/content/association_mapping.pot
===================================================================
--- core/trunk/documentation/manual/src/main/docbook/pot/content/association_mapping.pot 2008-05-07 20:59:35 UTC (rev 14652)
+++ core/trunk/documentation/manual/src/main/docbook/pot/content/association_mapping.pot 2008-05-07 21:02:35 UTC (rev 14653)
@@ -1,160 +1,738 @@
+# SOME DESCRIPTIVE TITLE.
+# FIRST AUTHOR <EMAIL at ADDRESS>, YEAR.
+#
+#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
-"POT-Creation-Date: 2007-10-19 10:28-0500\n"
+"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
+"POT-Creation-Date: 2008-05-07 21:01+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL at ADDRESS>\n"
-"Language-Team: LANGUAGE <LL at li.org>\n"
+"Language-Team: LANGUAGE <kde-i18n-doc at kde.org>\n"
"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Type: application/x-xml2pot; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-#: association_mapping.xml:6(title)
+#. Tag: title
+#: association_mapping.xml:30
+#, no-c-format
msgid "Association Mappings"
msgstr ""
-#: association_mapping.xml:9(title)
+#. Tag: title
+#: association_mapping.xml:33
+#, no-c-format
msgid "Introduction"
msgstr ""
-#: association_mapping.xml:11(para)
+#. Tag: para
+#: association_mapping.xml:35
+#, no-c-format
msgid "Association mappings are the often most difficult thing to get right. In this section we'll go through the canonical cases one by one, starting with unidirectional mappings, and then considering the bidirectional cases. We'll use <literal>Person</literal> and <literal>Address</literal> in all the examples."
msgstr ""
-#: association_mapping.xml:19(para)
+#. Tag: para
+#: association_mapping.xml:43
+#, no-c-format
msgid "We'll classify associations by whether or not they map to an intervening join table, and by multiplicity."
msgstr ""
-#: association_mapping.xml:24(para)
+#. Tag: para
+#: association_mapping.xml:48
+#, no-c-format
msgid "Nullable foreign keys are not considered good practice in traditional data modelling, so all our examples use not null foreign keys. This is not a requirement of Hibernate, and the mappings will all work if you drop the nullability constraints."
msgstr ""
-#: association_mapping.xml:34(title)
+#. Tag: title
+#: association_mapping.xml:58
+#, no-c-format
msgid "Unidirectional associations"
msgstr ""
-#: association_mapping.xml:37(title) association_mapping.xml:195(title)
+#. Tag: title
+#: association_mapping.xml:61 association_mapping.xml:132
+#, no-c-format
msgid "many to one"
msgstr ""
-#: association_mapping.xml:39(para)
+#. Tag: para
+#: association_mapping.xml:63
+#, no-c-format
msgid "A <emphasis>unidirectional many-to-one association</emphasis> is the most common kind of unidirectional association."
msgstr ""
-#: association_mapping.xml:66(title) association_mapping.xml:229(title) association_mapping.xml:373(title) association_mapping.xml:479(title)
+#. Tag: programlisting
+#: association_mapping.xml:68
+#, no-c-format
+msgid ""
+ "<![CDATA[<class name=\"Person\">\n"
+ " <id name=\"id\" column=\"personId\">\n"
+ " <generator class=\"native\"/>\n"
+ " </id>\n"
+ " <many-to-one name=\"address\" \n"
+ " column=\"addressId\"\n"
+ " not-null=\"true\"/>\n"
+ "</class>\n"
+ "\n"
+ "<class name=\"Address\">\n"
+ " <id name=\"id\" column=\"addressId\">\n"
+ " <generator class=\"native\"/>\n"
+ " </id>\n"
+ "</class>]]>"
+msgstr ""
+
+#. Tag: programlisting
+#: association_mapping.xml:69 association_mapping.xml:185
+#, no-c-format
+msgid ""
+ "<![CDATA[\n"
+ "create table Person ( personId bigint not null primary key, addressId bigint not null )\n"
+ "create table Address ( addressId bigint not null primary key )\n"
+ " ]]>"
+msgstr ""
+
+#. Tag: title
+#: association_mapping.xml:74 association_mapping.xml:145 association_mapping.xml:209 association_mapping.xml:249
+#, no-c-format
msgid "one to one"
msgstr ""
-#: association_mapping.xml:68(para)
+#. Tag: para
+#: association_mapping.xml:76
+#, no-c-format
msgid "A <emphasis>unidirectional one-to-one association on a foreign key</emphasis> is almost identical. The only difference is the column unique constraint."
msgstr ""
-#: association_mapping.xml:93(para)
+#. Tag: programlisting
+#: association_mapping.xml:81
+#, no-c-format
+msgid ""
+ "<![CDATA[<class name=\"Person\">\n"
+ " <id name=\"id\" column=\"personId\">\n"
+ " <generator class=\"native\"/>\n"
+ " </id>\n"
+ " <many-to-one name=\"address\" \n"
+ " column=\"addressId\" \n"
+ " unique=\"true\"\n"
+ " not-null=\"true\"/>\n"
+ "</class>\n"
+ "\n"
+ "<class name=\"Address\">\n"
+ " <id name=\"id\" column=\"addressId\">\n"
+ " <generator class=\"native\"/>\n"
+ " </id>\n"
+ "</class>]]>"
+msgstr ""
+
+#. Tag: programlisting
+#: association_mapping.xml:82 association_mapping.xml:217
+#, no-c-format
+msgid ""
+ "<![CDATA[\n"
+ "create table Person ( personId bigint not null primary key, addressId bigint not null unique )\n"
+ "create table Address ( addressId bigint not null primary key )\n"
+ " ]]>"
+msgstr ""
+
+#. Tag: para
+#: association_mapping.xml:84
+#, no-c-format
msgid "A <emphasis>unidirectional one-to-one association on a primary key</emphasis> usually uses a special id generator. (Notice that we've reversed the direction of the association in this example.)"
msgstr ""
-#: association_mapping.xml:121(title) association_mapping.xml:161(title)
+#. Tag: programlisting
+#: association_mapping.xml:90
+#, no-c-format
+msgid ""
+ "<![CDATA[<class name=\"Person\">\n"
+ " <id name=\"id\" column=\"personId\">\n"
+ " <generator class=\"native\"/>\n"
+ " </id>\n"
+ "</class>\n"
+ "\n"
+ "<class name=\"Address\">\n"
+ " <id name=\"id\" column=\"personId\">\n"
+ " <generator class=\"foreign\">\n"
+ " <param name=\"property\">person</param>\n"
+ " </generator>\n"
+ " </id>\n"
+ " <one-to-one name=\"person\" constrained=\"true\"/>\n"
+ "</class>]]>"
+msgstr ""
+
+#. Tag: programlisting
+#: association_mapping.xml:91 association_mapping.xml:225
+#, no-c-format
+msgid ""
+ "<![CDATA[\n"
+ "create table Person ( personId bigint not null primary key )\n"
+ "create table Address ( personId bigint not null primary key )\n"
+ " ]]>"
+msgstr ""
+
+#. Tag: title
+#: association_mapping.xml:96 association_mapping.xml:118
+#, no-c-format
msgid "one to many"
msgstr ""
-#: association_mapping.xml:123(para)
+#. Tag: para
+#: association_mapping.xml:98
+#, no-c-format
msgid "A <emphasis>unidirectional one-to-many association on a foreign key</emphasis> is a very unusual case, and is not really recommended."
msgstr ""
-#: association_mapping.xml:149(para)
+#. Tag: programlisting
+#: association_mapping.xml:103
+#, no-c-format
+msgid ""
+ "<![CDATA[<class name=\"Person\">\n"
+ " <id name=\"id\" column=\"personId\">\n"
+ " <generator class=\"native\"/>\n"
+ " </id>\n"
+ " <set name=\"addresses\">\n"
+ " <key column=\"personId\" \n"
+ " not-null=\"true\"/>\n"
+ " <one-to-many class=\"Address\"/>\n"
+ " </set>\n"
+ "</class>\n"
+ "\n"
+ "<class name=\"Address\">\n"
+ " <id name=\"id\" column=\"addressId\">\n"
+ " <generator class=\"native\"/>\n"
+ " </id>\n"
+ "</class>]]>"
+msgstr ""
+
+#. Tag: programlisting
+#: association_mapping.xml:104
+#, no-c-format
+msgid ""
+ "<![CDATA[\n"
+ "create table Person ( personId bigint not null primary key )\n"
+ "create table Address ( addressId bigint not null primary key, personId bigint not null )\n"
+ " ]]>"
+msgstr ""
+
+#. Tag: para
+#: association_mapping.xml:106
+#, no-c-format
msgid "We think it's better to use a join table for this kind of association."
msgstr ""
-#: association_mapping.xml:158(title)
+#. Tag: title
+#: association_mapping.xml:115
+#, no-c-format
msgid "Unidirectional associations with join tables"
msgstr ""
-#: association_mapping.xml:163(para)
+#. Tag: para
+#: association_mapping.xml:120
+#, no-c-format
msgid "A <emphasis>unidirectional one-to-many association on a join table</emphasis> is much preferred. Notice that by specifying <literal>unique=\"true\"</literal>, we have changed the multiplicity from many-to-many to one-to-many."
msgstr ""
-#: association_mapping.xml:197(para)
+#. Tag: programlisting
+#: association_mapping.xml:126
+#, no-c-format
+msgid ""
+ "<![CDATA[<class name=\"Person\">\n"
+ " <id name=\"id\" column=\"personId\">\n"
+ " <generator class=\"native\"/>\n"
+ " </id>\n"
+ " <set name=\"addresses\" table=\"PersonAddress\">\n"
+ " <key column=\"personId\"/>\n"
+ " <many-to-many column=\"addressId\"\n"
+ " unique=\"true\"\n"
+ " class=\"Address\"/>\n"
+ " </set>\n"
+ "</class>\n"
+ "\n"
+ "<class name=\"Address\">\n"
+ " <id name=\"id\" column=\"addressId\">\n"
+ " <generator class=\"native\"/>\n"
+ " </id>\n"
+ "</class>]]>"
+msgstr ""
+
+#. Tag: programlisting
+#: association_mapping.xml:127
+#, no-c-format
+msgid ""
+ "<![CDATA[\n"
+ "create table Person ( personId bigint not null primary key )\n"
+ "create table PersonAddress ( personId not null, addressId bigint not null primary key )\n"
+ "create table Address ( addressId bigint not null primary key )\n"
+ " ]]>"
+msgstr ""
+
+#. Tag: para
+#: association_mapping.xml:134
+#, no-c-format
msgid "A <emphasis>unidirectional many-to-one association on a join table</emphasis> is quite common when the association is optional."
msgstr ""
-#: association_mapping.xml:231(para)
+#. Tag: programlisting
+#: association_mapping.xml:139
+#, no-c-format
+msgid ""
+ "<![CDATA[<class name=\"Person\">\n"
+ " <id name=\"id\" column=\"personId\">\n"
+ " <generator class=\"native\"/>\n"
+ " </id>\n"
+ " <join table=\"PersonAddress\" \n"
+ " optional=\"true\">\n"
+ " <key column=\"personId\" unique=\"true\"/>\n"
+ " <many-to-one name=\"address\"\n"
+ " column=\"addressId\" \n"
+ " not-null=\"true\"/>\n"
+ " </join>\n"
+ "</class>\n"
+ "\n"
+ "<class name=\"Address\">\n"
+ " <id name=\"id\" column=\"addressId\">\n"
+ " <generator class=\"native\"/>\n"
+ " </id>\n"
+ "</class>]]>"
+msgstr ""
+
+#. Tag: programlisting
+#: association_mapping.xml:140
+#, no-c-format
+msgid ""
+ "<![CDATA[\n"
+ "create table Person ( personId bigint not null primary key )\n"
+ "create table PersonAddress ( personId bigint not null primary key, addressId bigint not null )\n"
+ "create table Address ( addressId bigint not null primary key )\n"
+ " ]]>"
+msgstr ""
+
+#. Tag: para
+#: association_mapping.xml:147
+#, no-c-format
msgid "A <emphasis>unidirectional one-to-one association on a join table</emphasis> is extremely unusual, but possible."
msgstr ""
-#: association_mapping.xml:265(title) association_mapping.xml:525(title)
+#. Tag: programlisting
+#: association_mapping.xml:152
+#, no-c-format
+msgid ""
+ "<![CDATA[<class name=\"Person\">\n"
+ " <id name=\"id\" column=\"personId\">\n"
+ " <generator class=\"native\"/>\n"
+ " </id>\n"
+ " <join table=\"PersonAddress\" \n"
+ " optional=\"true\">\n"
+ " <key column=\"personId\" \n"
+ " unique=\"true\"/>\n"
+ " <many-to-one name=\"address\"\n"
+ " column=\"addressId\" \n"
+ " not-null=\"true\"\n"
+ " unique=\"true\"/>\n"
+ " </join>\n"
+ "</class>\n"
+ "\n"
+ "<class name=\"Address\">\n"
+ " <id name=\"id\" column=\"addressId\">\n"
+ " <generator class=\"native\"/>\n"
+ " </id>\n"
+ "</class>]]>"
+msgstr ""
+
+#. Tag: programlisting
+#: association_mapping.xml:153 association_mapping.xml:257
+#, no-c-format
+msgid ""
+ "<![CDATA[\n"
+ "create table Person ( personId bigint not null primary key )\n"
+ "create table PersonAddress ( personId bigint not null primary key, addressId bigint not null unique )\n"
+ "create table Address ( addressId bigint not null primary key )\n"
+ " ]]>"
+msgstr ""
+
+#. Tag: title
+#: association_mapping.xml:158 association_mapping.xml:262
+#, no-c-format
msgid "many to many"
msgstr ""
-#: association_mapping.xml:267(para)
+#. Tag: para
+#: association_mapping.xml:160
+#, no-c-format
msgid "Finally, we have a <emphasis>unidirectional many-to-many association</emphasis>."
msgstr ""
-#: association_mapping.xml:298(title)
+#. Tag: programlisting
+#: association_mapping.xml:164
+#, no-c-format
+msgid ""
+ "<![CDATA[<class name=\"Person\">\n"
+ " <id name=\"id\" column=\"personId\">\n"
+ " <generator class=\"native\"/>\n"
+ " </id>\n"
+ " <set name=\"addresses\" table=\"PersonAddress\">\n"
+ " <key column=\"personId\"/>\n"
+ " <many-to-many column=\"addressId\"\n"
+ " class=\"Address\"/>\n"
+ " </set>\n"
+ "</class>\n"
+ "\n"
+ "<class name=\"Address\">\n"
+ " <id name=\"id\" column=\"addressId\">\n"
+ " <generator class=\"native\"/>\n"
+ " </id>\n"
+ "</class>]]>"
+msgstr ""
+
+#. Tag: programlisting
+#: association_mapping.xml:165 association_mapping.xml:270
+#, no-c-format
+msgid ""
+ "<![CDATA[\n"
+ "create table Person ( personId bigint not null primary key )\n"
+ "create table PersonAddress ( personId bigint not null, addressId bigint not null, primary key (personId, addressId) )\n"
+ "create table Address ( addressId bigint not null primary key )\n"
+ " ]]>"
+msgstr ""
+
+#. Tag: title
+#: association_mapping.xml:172
+#, no-c-format
msgid "Bidirectional associations"
msgstr ""
-#: association_mapping.xml:301(title) association_mapping.xml:436(title)
+#. Tag: title
+#: association_mapping.xml:175 association_mapping.xml:235
+#, no-c-format
msgid "one to many / many to one"
msgstr ""
-#: association_mapping.xml:303(para)
+#. Tag: para
+#: association_mapping.xml:177
+#, no-c-format
msgid "A <emphasis>bidirectional many-to-one association</emphasis> is the most common kind of association. (This is the standard parent/child relationship.)"
msgstr ""
-#: association_mapping.xml:333(para)
+#. Tag: programlisting
+#: association_mapping.xml:183
+#, no-c-format
+msgid ""
+ "<![CDATA[<class name=\"Person\">\n"
+ " <id name=\"id\" column=\"personId\">\n"
+ " <generator class=\"native\"/>\n"
+ " </id>\n"
+ " <many-to-one name=\"address\" \n"
+ " column=\"addressId\"\n"
+ " not-null=\"true\"/>\n"
+ "</class>\n"
+ "\n"
+ "<class name=\"Address\">\n"
+ " <id name=\"id\" column=\"addressId\">\n"
+ " <generator class=\"native\"/>\n"
+ " </id>\n"
+ " <set name=\"people\" inverse=\"true\">\n"
+ " <key column=\"addressId\"/>\n"
+ " <one-to-many class=\"Person\"/>\n"
+ " </set>\n"
+ "</class>]]>"
+msgstr ""
+
+#. Tag: para
+#: association_mapping.xml:187
+#, no-c-format
msgid "If you use a <literal>List</literal> (or other indexed collection) you need to set the <literal>key</literal> column of the foreign key to <literal>not null</literal>, and let Hibernate manage the association from the collections side to maintain the index of each element (making the other side virtually inverse by setting <literal>update=\"false\"</literal> and <literal>insert=\"false\"</literal>):"
msgstr ""
-#: association_mapping.xml:361(para)
+#. Tag: programlisting
+#: association_mapping.xml:195
+#, no-c-format
+msgid ""
+ "<![CDATA[<class name=\"Person\">\n"
+ " <id name=\"id\"/>\n"
+ " ...\n"
+ " <many-to-one name=\"address\"\n"
+ " column=\"addressId\"\n"
+ " not-null=\"true\"\n"
+ " insert=\"false\"\n"
+ " update=\"false\"/>\n"
+ "</class>\n"
+ "\n"
+ "<class name=\"Address\">\n"
+ " <id name=\"id\"/>\n"
+ " ...\n"
+ " <list name=\"people\">\n"
+ " <key column=\"addressId\" not-null=\"true\"/>\n"
+ " <list-index column=\"peopleIdx\"/>\n"
+ " <one-to-many class=\"Person\"/>\n"
+ " </list>\n"
+ "</class>]]>"
+msgstr ""
+
+#. Tag: para
+#: association_mapping.xml:197
+#, no-c-format
msgid "It is important that you define <literal>not-null=\"true\"</literal> on the <literal><key></literal> element of the collection mapping if the underlying foreign key column is <literal>NOT NULL</literal>. Don't only declare <literal>not-null=\"true\"</literal> on a possible nested <literal><column></literal> element, but on the <literal><key></literal> element."
msgstr ""
-#: association_mapping.xml:375(para)
+#. Tag: para
+#: association_mapping.xml:211
+#, no-c-format
msgid "A <emphasis>bidirectional one-to-one association on a foreign key</emphasis> is quite common."
msgstr ""
-#: association_mapping.xml:402(para)
+#. Tag: programlisting
+#: association_mapping.xml:216
+#, no-c-format
+msgid ""
+ "<![CDATA[<class name=\"Person\">\n"
+ " <id name=\"id\" column=\"personId\">\n"
+ " <generator class=\"native\"/>\n"
+ " </id>\n"
+ " <many-to-one name=\"address\" \n"
+ " column=\"addressId\" \n"
+ " unique=\"true\"\n"
+ " not-null=\"true\"/>\n"
+ "</class>\n"
+ "\n"
+ "<class name=\"Address\">\n"
+ " <id name=\"id\" column=\"addressId\">\n"
+ " <generator class=\"native\"/>\n"
+ " </id>\n"
+ " <one-to-one name=\"person\" \n"
+ " property-ref=\"address\"/>\n"
+ "</class>]]>"
+msgstr ""
+
+#. Tag: para
+#: association_mapping.xml:219
+#, no-c-format
msgid "A <emphasis>bidirectional one-to-one association on a primary key</emphasis> uses the special id generator."
msgstr ""
-#: association_mapping.xml:433(title)
+#. Tag: programlisting
+#: association_mapping.xml:224
+#, no-c-format
+msgid ""
+ "<![CDATA[<class name=\"Person\">\n"
+ " <id name=\"id\" column=\"personId\">\n"
+ " <generator class=\"native\"/>\n"
+ " </id>\n"
+ " <one-to-one name=\"address\"/>\n"
+ "</class>\n"
+ "\n"
+ "<class name=\"Address\">\n"
+ " <id name=\"id\" column=\"personId\">\n"
+ " <generator class=\"foreign\">\n"
+ " <param name=\"property\">person</param>\n"
+ " </generator>\n"
+ " </id>\n"
+ " <one-to-one name=\"person\" \n"
+ " constrained=\"true\"/>\n"
+ "</class>]]>"
+msgstr ""
+
+#. Tag: title
+#: association_mapping.xml:232
+#, no-c-format
msgid "Bidirectional associations with join tables"
msgstr ""
-#: association_mapping.xml:438(para)
+#. Tag: para
+#: association_mapping.xml:237
+#, no-c-format
msgid "A <emphasis>bidirectional one-to-many association on a join table</emphasis>. Note that the <literal>inverse=\"true\"</literal> can go on either end of the association, on the collection, or on the join."
msgstr ""
-#: association_mapping.xml:481(para)
+#. Tag: programlisting
+#: association_mapping.xml:243
+#, no-c-format
+msgid ""
+ "<![CDATA[<class name=\"Person\">\n"
+ " <id name=\"id\" column=\"personId\">\n"
+ " <generator class=\"native\"/>\n"
+ " </id>\n"
+ " <set name=\"addresses\" \n"
+ " table=\"PersonAddress\">\n"
+ " <key column=\"personId\"/>\n"
+ " <many-to-many column=\"addressId\"\n"
+ " unique=\"true\"\n"
+ " class=\"Address\"/>\n"
+ " </set>\n"
+ "</class>\n"
+ "\n"
+ "<class name=\"Address\">\n"
+ " <id name=\"id\" column=\"addressId\">\n"
+ " <generator class=\"native\"/>\n"
+ " </id>\n"
+ " <join table=\"PersonAddress\" \n"
+ " inverse=\"true\" \n"
+ " optional=\"true\">\n"
+ " <key column=\"addressId\"/>\n"
+ " <many-to-one name=\"person\"\n"
+ " column=\"personId\"\n"
+ " not-null=\"true\"/>\n"
+ " </join>\n"
+ "</class>]]>"
+msgstr ""
+
+#. Tag: programlisting
+#: association_mapping.xml:244
+#, no-c-format
+msgid ""
+ "<![CDATA[\n"
+ "create table Person ( personId bigint not null primary key )\n"
+ "create table PersonAddress ( personId bigint not null, addressId bigint not null primary key )\n"
+ "create table Address ( addressId bigint not null primary key )\n"
+ " ]]>"
+msgstr ""
+
+#. Tag: para
+#: association_mapping.xml:251
+#, no-c-format
msgid "A <emphasis>bidirectional one-to-one association on a join table</emphasis> is extremely unusual, but possible."
msgstr ""
-#: association_mapping.xml:527(para)
+#. Tag: programlisting
+#: association_mapping.xml:256
+#, no-c-format
+msgid ""
+ "<![CDATA[<class name=\"Person\">\n"
+ " <id name=\"id\" column=\"personId\">\n"
+ " <generator class=\"native\"/>\n"
+ " </id>\n"
+ " <join table=\"PersonAddress\" \n"
+ " optional=\"true\">\n"
+ " <key column=\"personId\" \n"
+ " unique=\"true\"/>\n"
+ " <many-to-one name=\"address\"\n"
+ " column=\"addressId\" \n"
+ " not-null=\"true\"\n"
+ " unique=\"true\"/>\n"
+ " </join>\n"
+ "</class>\n"
+ "\n"
+ "<class name=\"Address\">\n"
+ " <id name=\"id\" column=\"addressId\">\n"
+ " <generator class=\"native\"/>\n"
+ " </id>\n"
+ " <join table=\"PersonAddress\" \n"
+ " optional=\"true\"\n"
+ " inverse=\"true\">\n"
+ " <key column=\"addressId\" \n"
+ " unique=\"true\"/>\n"
+ " <many-to-one name=\"person\"\n"
+ " column=\"personId\" \n"
+ " not-null=\"true\"\n"
+ " unique=\"true\"/>\n"
+ " </join>\n"
+ "</class>]]>"
+msgstr ""
+
+#. Tag: para
+#: association_mapping.xml:264
+#, no-c-format
msgid "Finally, we have a <emphasis>bidirectional many-to-many association</emphasis>."
msgstr ""
-#: association_mapping.xml:564(title)
+#. Tag: programlisting
+#: association_mapping.xml:268
+#, no-c-format
+msgid ""
+ "<![CDATA[<class name=\"Person\">\n"
+ " <id name=\"id\" column=\"personId\">\n"
+ " <generator class=\"native\"/>\n"
+ " </id>\n"
+ " <set name=\"addresses\" table=\"PersonAddress\">\n"
+ " <key column=\"personId\"/>\n"
+ " <many-to-many column=\"addressId\"\n"
+ " class=\"Address\"/>\n"
+ " </set>\n"
+ "</class>\n"
+ "\n"
+ "<class name=\"Address\">\n"
+ " <id name=\"id\" column=\"addressId\">\n"
+ " <generator class=\"native\"/>\n"
+ " </id>\n"
+ " <set name=\"people\" inverse=\"true\" table=\"PersonAddress\">\n"
+ " <key column=\"addressId\"/>\n"
+ " <many-to-many column=\"personId\"\n"
+ " class=\"Person\"/>\n"
+ " </set>\n"
+ "</class>]]>"
+msgstr ""
+
+#. Tag: title
+#: association_mapping.xml:277
+#, no-c-format
msgid "More complex association mappings"
msgstr ""
-#: association_mapping.xml:566(para)
+#. Tag: para
+#: association_mapping.xml:279
+#, no-c-format
msgid "More complex association joins are <emphasis>extremely</emphasis> rare. Hibernate makes it possible to handle more complex situations using SQL fragments embedded in the mapping document. For example, if a table with historical account information data defines <literal>accountNumber</literal>, <literal>effectiveEndDate</literal> and <literal>effectiveStartDate</literal>columns, mapped as follows:"
msgstr ""
-#: association_mapping.xml:584(para)
+#. Tag: programlisting
+#: association_mapping.xml:288
+#, no-c-format
+msgid ""
+ "<![CDATA[<properties name=\"currentAccountKey\">\n"
+ " <property name=\"accountNumber\" type=\"string\" not-null=\"true\"/>\n"
+ " <property name=\"currentAccount\" type=\"boolean\">\n"
+ " <formula>case when effectiveEndDate is null then 1 else 0 end</formula>\n"
+ " </property>\n"
+ "</properties>\n"
+ "<property name=\"effectiveEndDate\" type=\"date\"/>\n"
+ "<property name=\"effectiveStateDate\" type=\"date\" not-null=\"true\"/>]]>"
+msgstr ""
+
+#. Tag: para
+#: association_mapping.xml:290
+#, no-c-format
msgid "Then we can map an association to the <emphasis>current</emphasis> instance (the one with null <literal>effectiveEndDate</literal>) using:"
msgstr ""
-#: association_mapping.xml:596(para)
+#. Tag: programlisting
+#: association_mapping.xml:295
+#, no-c-format
+msgid ""
+ "<![CDATA[<many-to-one name=\"currentAccountInfo\" \n"
+ " property-ref=\"currentAccountKey\"\n"
+ " class=\"AccountInfo\">\n"
+ " <column name=\"accountNumber\"/>\n"
+ " <formula>'1'</formula>\n"
+ "</many-to-one>]]>"
+msgstr ""
+
+#. Tag: para
+#: association_mapping.xml:297
+#, no-c-format
msgid "In a more complex example, imagine that the association between <literal>Employee</literal> and <literal>Organization</literal> is maintained in an <literal>Employment</literal> table full of historical employment data. Then an association to the employee's <emphasis>most recent</emphasis> employer (the one with the most recent <literal>startDate</literal>) might be mapped this way:"
msgstr ""
-#: association_mapping.xml:617(para)
-msgid "You can get quite creative with this functionality, but it is usually more practical to handle these kinds of cases using HQL or a criteria query."
+#. Tag: programlisting
+#: association_mapping.xml:305
+#, no-c-format
+msgid ""
+ "<![CDATA[<join>\n"
+ " <key column=\"employeeId\"/>\n"
+ " <subselect>\n"
+ " select employeeId, orgId \n"
+ " from Employments \n"
+ " group by orgId \n"
+ " having startDate = max(startDate)\n"
+ " </subselect>\n"
+ " <many-to-one name=\"mostRecentEmployer\" \n"
+ " class=\"Organization\" \n"
+ " column=\"orgId\"/>\n"
+ "</join>]]>"
msgstr ""
-#. Put one translator per line, in the form of NAME <EMAIL>, YEAR1, YEAR2.
-#: association_mapping.xml:0(None)
-msgid "translator-credits"
+#. Tag: para
+#: association_mapping.xml:307
+#, no-c-format
+msgid "You can get quite creative with this functionality, but it is usually more practical to handle these kinds of cases using HQL or a criteria query."
msgstr ""
Modified: core/trunk/documentation/manual/src/main/docbook/pot/content/basic_mapping.pot
===================================================================
--- core/trunk/documentation/manual/src/main/docbook/pot/content/basic_mapping.pot 2008-05-07 20:59:35 UTC (rev 14652)
+++ core/trunk/documentation/manual/src/main/docbook/pot/content/basic_mapping.pot 2008-05-07 21:02:35 UTC (rev 14653)
@@ -1,1532 +1,3347 @@
+# SOME DESCRIPTIVE TITLE.
+# FIRST AUTHOR <EMAIL at ADDRESS>, YEAR.
+#
+#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
-"POT-Creation-Date: 2007-10-19 10:29-0500\n"
+"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
+"POT-Creation-Date: 2008-05-07 21:01+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL at ADDRESS>\n"
-"Language-Team: LANGUAGE <LL at li.org>\n"
+"Language-Team: LANGUAGE <kde-i18n-doc at kde.org>\n"
"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Type: application/x-xml2pot; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-#: basic_mapping.xml:5(title)
+#. Tag: title
+#: basic_mapping.xml:29
+#, no-c-format
msgid "Basic O/R Mapping"
msgstr ""
-#: basic_mapping.xml:8(title)
+#. Tag: title
+#: basic_mapping.xml:32
+#, no-c-format
msgid "Mapping declaration"
msgstr ""
-#: basic_mapping.xml:10(para)
+#. Tag: para
+#: basic_mapping.xml:34
+#, no-c-format
msgid "Object/relational mappings are usually defined in an XML document. The mapping document is designed to be readable and hand-editable. The mapping language is Java-centric, meaning that mappings are constructed around persistent class declarations, not table declarations."
msgstr ""
-#: basic_mapping.xml:17(para)
+#. Tag: para
+#: basic_mapping.xml:41
+#, no-c-format
msgid "Note that, even though many Hibernate users choose to write the XML by hand, a number of tools exist to generate the mapping document, including XDoclet, Middlegen and AndroMDA."
msgstr ""
-#: basic_mapping.xml:23(para)
+#. Tag: para
+#: basic_mapping.xml:47
+#, no-c-format
msgid "Lets kick off with an example mapping:"
msgstr ""
-#: basic_mapping.xml:92(para)
+#. Tag: programlisting
+#: basic_mapping.xml:51
+#, no-c-format
+msgid ""
+ "<![CDATA[<?xml version=\"1.0\"?>\n"
+ "<!DOCTYPE hibernate-mapping PUBLIC\n"
+ " \"-//Hibernate/Hibernate Mapping DTD 3.0//EN\"\n"
+ " \"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd\">\n"
+ "\n"
+ "<hibernate-mapping package=\"eg\">\n"
+ "\n"
+ " <class name=\"Cat\"\n"
+ " table=\"cats\"\n"
+ " discriminator-value=\"C\">\n"
+ "\n"
+ " <id name=\"id\">\n"
+ " <generator class=\"native\"/>\n"
+ " </id>\n"
+ "\n"
+ " <discriminator column=\"subclass\"\n"
+ " type=\"character\"/>\n"
+ "\n"
+ " <property name=\"weight\"/>\n"
+ "\n"
+ " <property name=\"birthdate\"\n"
+ " type=\"date\"\n"
+ " not-null=\"true\"\n"
+ " update=\"false\"/>\n"
+ "\n"
+ " <property name=\"color\"\n"
+ " type=\"eg.types.ColorUserType\"\n"
+ " not-null=\"true\"\n"
+ " update=\"false\"/>\n"
+ "\n"
+ " <property name=\"sex\"\n"
+ " not-null=\"true\"\n"
+ " update=\"false\"/>\n"
+ "\n"
+ " <property name=\"litterId\"\n"
+ " column=\"litterId\"\n"
+ " update=\"false\"/>\n"
+ "\n"
+ " <many-to-one name=\"mother\"\n"
+ " column=\"mother_id\"\n"
+ " update=\"false\"/>\n"
+ "\n"
+ " <set name=\"kittens\"\n"
+ " inverse=\"true\"\n"
+ " order-by=\"litter_id\">\n"
+ " <key column=\"mother_id\"/>\n"
+ " <one-to-many class=\"Cat\"/>\n"
+ " </set>\n"
+ "\n"
+ " <subclass name=\"DomesticCat\"\n"
+ " discriminator-value=\"D\">\n"
+ "\n"
+ " <property name=\"name\"\n"
+ " type=\"string\"/>\n"
+ "\n"
+ " </subclass>\n"
+ "\n"
+ " </class>\n"
+ "\n"
+ " <class name=\"Dog\">\n"
+ " <!-- mapping for Dog could go here -->\n"
+ " </class>\n"
+ "\n"
+ "</hibernate-mapping>]]>"
+msgstr ""
+
+#. Tag: para
+#: basic_mapping.xml:53
+#, no-c-format
msgid "We will now discuss the content of the mapping document. We will only describe the document elements and attributes that are used by Hibernate at runtime. The mapping document also contains some extra optional attributes and elements that affect the database schemas exported by the schema export tool. (For example the <literal> not-null</literal> attribute.)"
msgstr ""
-#: basic_mapping.xml:103(title)
+#. Tag: title
+#: basic_mapping.xml:64
+#, no-c-format
msgid "Doctype"
msgstr ""
-#: basic_mapping.xml:105(para)
+#. Tag: para
+#: basic_mapping.xml:66
+#, no-c-format
msgid "All XML mappings should declare the doctype shown. The actual DTD may be found at the URL above, in the directory <literal>hibernate-x.x.x/src/org/hibernate </literal> or in <literal>hibernate3.jar</literal>. Hibernate will always look for the DTD in its classpath first. If you experience lookups of the DTD using an Internet connection, check your DTD declaration against the contents of your claspath."
msgstr ""
-#: basic_mapping.xml:115(title)
+#. Tag: title
+#: basic_mapping.xml:76
+#, no-c-format
msgid "EntityResolver"
msgstr ""
-#: basic_mapping.xml:116(para)
+#. Tag: para
+#: basic_mapping.xml:77
+#, no-c-format
msgid "As mentioned previously, Hibernate will first attempt to resolve DTDs in its classpath. The manner in which it does this is by registering a custom <literal>org.xml.sax.EntityResolver</literal> implementation with the SAXReader it uses to read in the xml files. This custom <literal>EntityResolver</literal> recognizes two different systemId namespaces."
msgstr ""
-#: basic_mapping.xml:124(para)
+#. Tag: para
+#: basic_mapping.xml:85
+#, no-c-format
msgid "a <literal>hibernate namespace</literal> is recognized whenever the resolver encounteres a systemId starting with <literal>http://hibernate.sourceforge.net/</literal>; the resolver attempts to resolve these entities via the classlaoder which loaded the Hibernate classes."
msgstr ""
-#: basic_mapping.xml:133(para)
+#. Tag: para
+#: basic_mapping.xml:94
+#, no-c-format
msgid "a <literal>user namespace</literal> is recognized whenever the resolver encounteres a systemId using a <literal>classpath://</literal> URL protocol; the resolver will attempt to resolve these entities via (1) the current thread context classloader and (2) the classloader which loaded the Hibernate classes."
msgstr ""
-#: basic_mapping.xml:142(para)
+#. Tag: para
+#: basic_mapping.xml:103
+#, no-c-format
msgid "An example of utilizing user namespacing:"
msgstr ""
-#: basic_mapping.xml:160(para)
-msgid "Where <literal>types.xml</literal> is a resource in the <literal>your.domain</literal> package and contains a custom <xref linkend=\"mapping-types-custom\">typedef</xref>."
+#. Tag: programlisting
+#: basic_mapping.xml:106
+#, no-c-format
+msgid ""
+ "<![CDATA[<?xml version=\"1.0\"?>\n"
+ "<!DOCTYPE hibernate-mapping PUBLIC\n"
+ " \"-//Hibernate/Hibernate Mapping DTD 3.0//EN\"\n"
+ " \"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd\" [\n"
+ " <!ENTITY types SYSTEM \"classpath://your/domain/types.xml\">\n"
+ "]>\n"
+ "\n"
+ "<hibernate-mapping package=\"your.domain\">\n"
+ " <class name=\"MyEntity\">\n"
+ " <id name=\"id\" type=\"my-custom-id-type\">\n"
+ " ...\n"
+ " </id>\n"
+ " <class>\n"
+ " &types;\n"
+ "</hibernate-mapping>]]>"
msgstr ""
-#: basic_mapping.xml:168(title)
+#. Tag: para
+#: basic_mapping.xml:107
+#, no-c-format
+msgid "Where <literal>types.xml</literal> is a resource in the <literal>your.domain</literal> package and contains a custom <link linkend=\"mapping-types-custom\">typedef</link>."
+msgstr ""
+
+#. Tag: title
+#: basic_mapping.xml:115
+#, no-c-format
msgid "hibernate-mapping"
msgstr ""
-#: basic_mapping.xml:170(para)
+#. Tag: para
+#: basic_mapping.xml:117
+#, no-c-format
msgid "This element has several optional attributes. The <literal>schema</literal> and <literal>catalog</literal> attributes specify that tables referred to in this mapping belong to the named schema and/or catalog. If specified, tablenames will be qualified by the given schema and catalog names. If missing, tablenames will be unqualified. The <literal>default-cascade</literal> attribute specifies what cascade style should be assumed for properties and collections which do not specify a <literal>cascade</literal> attribute. The <literal>auto-import</literal> attribute lets us use unqualified class names in the query language, by default."
msgstr ""
-#: basic_mapping.xml:202(para)
+#. Tag: programlisting
+#: basic_mapping.xml:138
+#, no-c-format
+msgid ""
+ "<![CDATA[<hibernate-mapping\n"
+ " schema=\"schemaName\"\n"
+ " catalog=\"catalogName\"\n"
+ " default-cascade=\"cascade_style\"\n"
+ " default-access=\"field|property|ClassName\"\n"
+ " default-lazy=\"true|false\"\n"
+ " auto-import=\"true|false\"\n"
+ " package=\"package.name\"\n"
+ " />]]>"
+msgstr ""
+
+#. Tag: para
+#: basic_mapping.xml:141
+#, no-c-format
msgid "<literal>schema</literal> (optional): The name of a database schema."
msgstr ""
-#: basic_mapping.xml:207(para)
+#. Tag: para
+#: basic_mapping.xml:146
+#, no-c-format
msgid "<literal>catalog</literal> (optional): The name of a database catalog."
msgstr ""
-#: basic_mapping.xml:212(para)
+#. Tag: para
+#: basic_mapping.xml:151
+#, no-c-format
msgid "<literal>default-cascade</literal> (optional - defaults to <literal>none</literal>): A default cascade style."
msgstr ""
-#: basic_mapping.xml:218(para)
+#. Tag: para
+#: basic_mapping.xml:157
+#, no-c-format
msgid "<literal>default-access</literal> (optional - defaults to <literal>property</literal>): The strategy Hibernate should use for accessing all properties. Can be a custom implementation of <literal>PropertyAccessor</literal>."
msgstr ""
-#: basic_mapping.xml:225(para)
+#. Tag: para
+#: basic_mapping.xml:164
+#, no-c-format
msgid "<literal>default-lazy</literal> (optional - defaults to <literal>true</literal>): The default value for unspecifed <literal>lazy</literal> attributes of class and collection mappings."
msgstr ""
-#: basic_mapping.xml:232(para)
+#. Tag: para
+#: basic_mapping.xml:171
+#, no-c-format
msgid "<literal>auto-import</literal> (optional - defaults to <literal>true</literal>): Specifies whether we can use unqualified class names (of classes in this mapping) in the query language."
msgstr ""
-#: basic_mapping.xml:239(para)
+#. Tag: para
+#: basic_mapping.xml:178
+#, no-c-format
msgid "<literal>package</literal> (optional): Specifies a package prefix to assume for unqualified class names in the mapping document."
msgstr ""
-#: basic_mapping.xml:247(para)
+#. Tag: para
+#: basic_mapping.xml:186
+#, no-c-format
msgid "If you have two persistent classes with the same (unqualified) name, you should set <literal>auto-import=\"false\"</literal>. Hibernate will throw an exception if you attempt to assign two classes to the same \"imported\" name."
msgstr ""
-#: basic_mapping.xml:253(para)
+#. Tag: para
+#: basic_mapping.xml:192
+#, no-c-format
msgid "Note that the <literal>hibernate-mapping</literal> element allows you to nest several persistent <literal><class></literal> mappings, as shown above. It is however good practice (and expected by some tools) to map only a single persistent class (or a single class hierarchy) in one mapping file and name it after the persistent superclass, e.g. <literal>Cat.hbm.xml</literal>, <literal>Dog.hbm.xml</literal>, or if using inheritance, <literal>Animal.hbm.xml</literal>."
msgstr ""
-#: basic_mapping.xml:266(title) basic_mapping.xml:3077(literal)
-msgid "class"
+#. Tag: title
+#: basic_mapping.xml:205
+#, no-c-format
+msgid "<title>class</title>"
msgstr ""
-#: basic_mapping.xml:268(para)
+#. Tag: para
+#: basic_mapping.xml:207
+#, no-c-format
msgid "You may declare a persistent class using the <literal>class</literal> element:"
msgstr ""
-#: basic_mapping.xml:322(para)
+#. Tag: programlisting
+#: basic_mapping.xml:235
+#, no-c-format
+msgid ""
+ "<![CDATA[<class\n"
+ " name=\"ClassName\"\n"
+ " table=\"tableName\"\n"
+ " discriminator-value=\"discriminator_value\"\n"
+ " mutable=\"true|false\"\n"
+ " schema=\"owner\"\n"
+ " catalog=\"catalog\"\n"
+ " proxy=\"ProxyInterface\"\n"
+ " dynamic-update=\"true|false\"\n"
+ " dynamic-insert=\"true|false\"\n"
+ " select-before-update=\"true|false\"\n"
+ " polymorphism=\"implicit|explicit\"\n"
+ " where=\"arbitrary sql where condition\"\n"
+ " persister=\"PersisterClass\"\n"
+ " batch-size=\"N\"\n"
+ " optimistic-lock=\"none|version|dirty|all\"\n"
+ " lazy=\"true|false\"\n"
+ " entity-name=\"EntityName\"\n"
+ " check=\"arbitrary sql check condition\"\n"
+ " rowid=\"rowid\"\n"
+ " subselect=\"SQL expression\"\n"
+ " abstract=\"true|false\"\n"
+ " node=\"element-name\"\n"
+ "/>]]>"
+msgstr ""
+
+#. Tag: para
+#: basic_mapping.xml:238
+#, no-c-format
msgid "<literal>name</literal> (optional): The fully qualified Java class name of the persistent class (or interface). If this attribute is missing, it is assumed that the mapping is for a non-POJO entity."
msgstr ""
-#: basic_mapping.xml:329(para)
+#. Tag: para
+#: basic_mapping.xml:245
+#, no-c-format
msgid "<literal>table</literal> (optional - defaults to the unqualified class name): The name of its database table."
msgstr ""
-#: basic_mapping.xml:335(para)
+#. Tag: para
+#: basic_mapping.xml:251
+#, no-c-format
msgid "<literal>discriminator-value</literal> (optional - defaults to the class name): A value that distiguishes individual subclasses, used for polymorphic behaviour. Acceptable values include <literal>null</literal> and <literal>not null</literal>."
msgstr ""
-#: basic_mapping.xml:342(para)
+#. Tag: para
+#: basic_mapping.xml:258
+#, no-c-format
msgid "<literal>mutable</literal> (optional, defaults to <literal>true</literal>): Specifies that instances of the class are (not) mutable."
msgstr ""
-#: basic_mapping.xml:348(para) basic_mapping.xml:2605(para)
+#. Tag: para
+#: basic_mapping.xml:264 basic_mapping.xml:2228
+#, no-c-format
msgid "<literal>schema</literal> (optional): Override the schema name specified by the root <literal><hibernate-mapping></literal> element."
msgstr ""
-#: basic_mapping.xml:354(para) basic_mapping.xml:2611(para)
+#. Tag: para
+#: basic_mapping.xml:270 basic_mapping.xml:2234
+#, no-c-format
msgid "<literal>catalog</literal> (optional): Override the catalog name specified by the root <literal><hibernate-mapping></literal> element."
msgstr ""
-#: basic_mapping.xml:360(para)
+#. Tag: para
+#: basic_mapping.xml:276
+#, no-c-format
msgid "<literal>proxy</literal> (optional): Specifies an interface to use for lazy initializing proxies. You may specify the name of the class itself."
msgstr ""
-#: basic_mapping.xml:366(para)
+#. Tag: para
+#: basic_mapping.xml:282
+#, no-c-format
msgid "<literal>dynamic-update</literal> (optional, defaults to <literal>false</literal>): Specifies that <literal>UPDATE</literal> SQL should be generated at runtime and contain only those columns whose values have changed."
msgstr ""
-#: basic_mapping.xml:373(para)
+#. Tag: para
+#: basic_mapping.xml:289
+#, no-c-format
msgid "<literal>dynamic-insert</literal> (optional, defaults to <literal>false</literal>): Specifies that <literal>INSERT</literal> SQL should be generated at runtime and contain only the columns whose values are not null."
msgstr ""
-#: basic_mapping.xml:380(para)
+#. Tag: para
+#: basic_mapping.xml:296
+#, no-c-format
msgid "<literal>select-before-update</literal> (optional, defaults to <literal>false</literal>): Specifies that Hibernate should <emphasis>never</emphasis> perform an SQL <literal>UPDATE</literal> unless it is certain that an object is actually modified. In certain cases (actually, only when a transient object has been associated with a new session using <literal>update()</literal>), this means that Hibernate will perform an extra SQL <literal>SELECT</literal> to determine if an <literal>UPDATE</literal> is actually required."
msgstr ""
-#: basic_mapping.xml:390(para)
+#. Tag: para
+#: basic_mapping.xml:306
+#, no-c-format
msgid "<literal>polymorphism</literal> (optional, defaults to <literal>implicit</literal>): Determines whether implicit or explicit query polymorphism is used."
msgstr ""
-#: basic_mapping.xml:396(para)
+#. Tag: para
+#: basic_mapping.xml:312
+#, no-c-format
msgid "<literal>where</literal> (optional) specify an arbitrary SQL <literal>WHERE</literal> condition to be used when retrieving objects of this class"
msgstr ""
-#: basic_mapping.xml:402(para)
+#. Tag: para
+#: basic_mapping.xml:318
+#, no-c-format
msgid "<literal>persister</literal> (optional): Specifies a custom <literal>ClassPersister</literal>."
msgstr ""
-#: basic_mapping.xml:407(para)
+#. Tag: para
+#: basic_mapping.xml:323
+#, no-c-format
msgid "<literal>batch-size</literal> (optional, defaults to <literal>1</literal>) specify a \"batch size\" for fetching instances of this class by identifier."
msgstr ""
-#: basic_mapping.xml:413(para)
+#. Tag: para
+#: basic_mapping.xml:329
+#, no-c-format
msgid "<literal>optimistic-lock</literal> (optional, defaults to <literal>version</literal>): Determines the optimistic locking strategy."
msgstr ""
-#: basic_mapping.xml:419(para)
+#. Tag: para
+#: basic_mapping.xml:335
+#, no-c-format
msgid "<literal>lazy</literal> (optional): Lazy fetching may be completely disabled by setting <literal>lazy=\"false\"</literal>."
msgstr ""
-#: basic_mapping.xml:425(para)
+#. Tag: para
+#: basic_mapping.xml:341
+#, no-c-format
msgid "<literal>entity-name</literal> (optional, defaults to the class name): Hibernate3 allows a class to be mapped multiple times (to different tables, potentially), and allows entity mappings that are represented by Maps or XML at the Java level. In these cases, you should provide an explicit arbitrary name for the entity. See <xref linkend=\"persistent-classes-dynamicmodels\"/> and <xref linkend=\"xml\"/> for more information."
msgstr ""
-#: basic_mapping.xml:435(para)
+#. Tag: para
+#: basic_mapping.xml:351
+#, no-c-format
msgid "<literal>check</literal> (optional): A SQL expression used to generate a multi-row <emphasis>check</emphasis> constraint for automatic schema generation."
msgstr ""
-#: basic_mapping.xml:441(para)
+#. Tag: para
+#: basic_mapping.xml:357
+#, no-c-format
msgid "<literal>rowid</literal> (optional): Hibernate can use so called ROWIDs on databases which support. E.g. on Oracle, Hibernate can use the <literal>rowid</literal> extra column for fast updates if you set this option to <literal>rowid</literal>. A ROWID is an implementation detail and represents the physical location of a stored tuple."
msgstr ""
-#: basic_mapping.xml:449(para)
+#. Tag: para
+#: basic_mapping.xml:365
+#, no-c-format
msgid "<literal>subselect</literal> (optional): Maps an immutable and read-only entity to a database subselect. Useful if you want to have a view instead of a base table, but don't. See below for more information."
msgstr ""
-#: basic_mapping.xml:456(para)
+#. Tag: para
+#: basic_mapping.xml:372
+#, no-c-format
msgid "<literal>abstract</literal> (optional): Used to mark abstract superclasses in <literal><union-subclass></literal> hierarchies."
msgstr ""
-#: basic_mapping.xml:464(para)
+#. Tag: para
+#: basic_mapping.xml:380
+#, no-c-format
msgid "It is perfectly acceptable for the named persistent class to be an interface. You would then declare implementing classes of that interface using the <literal><subclass></literal> element. You may persist any <emphasis>static</emphasis> inner class. You should specify the class name using the standard form ie. <literal>eg.Foo$Bar</literal>."
msgstr ""
-#: basic_mapping.xml:471(para)
+#. Tag: para
+#: basic_mapping.xml:387
+#, no-c-format
msgid "Immutable classes, <literal>mutable=\"false\"</literal>, may not be updated or deleted by the application. This allows Hibernate to make some minor performance optimizations."
msgstr ""
-#: basic_mapping.xml:476(para)
+#. Tag: para
+#: basic_mapping.xml:392
+#, no-c-format
msgid "The optional <literal>proxy</literal> attribute enables lazy initialization of persistent instances of the class. Hibernate will initially return CGLIB proxies which implement the named interface. The actual persistent object will be loaded when a method of the proxy is invoked. See \"Initializing collections and proxies\" below."
msgstr ""
-#: basic_mapping.xml:483(para)
+#. Tag: para
+#: basic_mapping.xml:399
+#, no-c-format
msgid "<emphasis>Implicit</emphasis> polymorphism means that instances of the class will be returned by a query that names any superclass or implemented interface or the class and that instances of any subclass of the class will be returned by a query that names the class itself. <emphasis>Explicit</emphasis> polymorphism means that class instances will be returned only by queries that explicitly name that class and that queries that name the class will return only instances of subclasses mapped inside this <literal><class></literal> declaration as a <literal><subclass></literal> or <literal><joined-subclass></literal>. For most purposes the default, <literal>polymorphism=\"implicit\"</literal>, is appropriate. Explicit polymorphism is useful when two different classes are mapped to the same table (this allows a \"lightweight\" class that contains a subset of the table columns)."
msgstr ""
-#: basic_mapping.xml:495(para)
+#. Tag: para
+#: basic_mapping.xml:411
+#, no-c-format
msgid "The <literal>persister</literal> attribute lets you customize the persistence strategy used for the class. You may, for example, specify your own subclass of <literal>org.hibernate.persister.EntityPersister</literal> or you might even provide a completely new implementation of the interface <literal>org.hibernate.persister.ClassPersister</literal> that implements persistence via, for example, stored procedure calls, serialization to flat files or LDAP. See <literal>org.hibernate.test.CustomPersister</literal> for a simple example (of \"persistence\" to a <literal>Hashtable</literal>)."
msgstr ""
-#: basic_mapping.xml:506(para)
+#. Tag: para
+#: basic_mapping.xml:422
+#, no-c-format
msgid "Note that the <literal>dynamic-update</literal> and <literal>dynamic-insert</literal> settings are not inherited by subclasses and so may also be specified on the <literal><subclass></literal> or <literal><joined-subclass></literal> elements. These settings may increase performance in some cases, but might actually decrease performance in others. Use judiciously."
msgstr ""
-#: basic_mapping.xml:514(para)
+#. Tag: para
+#: basic_mapping.xml:430
+#, no-c-format
msgid "Use of <literal>select-before-update</literal> will usually decrease performance. It is very useful to prevent a database update trigger being called unnecessarily if you reattach a graph of detached instances to a <literal>Session</literal>."
msgstr ""
-#: basic_mapping.xml:520(para)
+#. Tag: para
+#: basic_mapping.xml:436
+#, no-c-format
msgid "If you enable <literal>dynamic-update</literal>, you will have a choice of optimistic locking strategies:"
msgstr ""
-#: basic_mapping.xml:526(para)
+#. Tag: para
+#: basic_mapping.xml:442
+#, no-c-format
msgid "<literal>version</literal> check the version/timestamp columns"
msgstr ""
-#: basic_mapping.xml:531(para)
+#. Tag: para
+#: basic_mapping.xml:447
+#, no-c-format
msgid "<literal>all</literal> check all columns"
msgstr ""
-#: basic_mapping.xml:536(para)
+#. Tag: para
+#: basic_mapping.xml:452
+#, no-c-format
msgid "<literal>dirty</literal> check the changed columns, allowing some concurrent updates"
msgstr ""
-#: basic_mapping.xml:541(para)
+#. Tag: para
+#: basic_mapping.xml:457
+#, no-c-format
msgid "<literal>none</literal> do not use optimistic locking"
msgstr ""
-#: basic_mapping.xml:546(para)
+#. Tag: para
+#: basic_mapping.xml:462
+#, no-c-format
msgid "We <emphasis>very</emphasis> strongly recommend that you use version/timestamp columns for optimistic locking with Hibernate. This is the optimal strategy with respect to performance and is the only strategy that correctly handles modifications made to detached instances (ie. when <literal>Session.merge()</literal> is used)."
msgstr ""
-#: basic_mapping.xml:553(para)
+#. Tag: para
+#: basic_mapping.xml:469
+#, no-c-format
msgid "There is no difference between a view and a base table for a Hibernate mapping, as expected this is transparent at the database level (note that some DBMS don't support views properly, especially with updates). Sometimes you want to use a view, but can't create one in the database (ie. with a legacy schema). In this case, you can map an immutable and read-only entity to a given SQL subselect expression:"
msgstr ""
-#: basic_mapping.xml:574(para)
+#. Tag: programlisting
+#: basic_mapping.xml:477
+#, no-c-format
+msgid ""
+ "<![CDATA[<class name=\"Summary\">\n"
+ " <subselect>\n"
+ " select item.name, max(bid.amount), count(*)\n"
+ " from item\n"
+ " join bid on bid.item_id = item.id\n"
+ " group by item.name\n"
+ " </subselect>\n"
+ " <synchronize table=\"item\"/>\n"
+ " <synchronize table=\"bid\"/>\n"
+ " <id name=\"name\"/>\n"
+ " ...\n"
+ "</class>]]>"
+msgstr ""
+
+#. Tag: para
+#: basic_mapping.xml:479
+#, no-c-format
msgid "Declare the tables to synchronize this entity with, ensuring that auto-flush happens correctly, and that queries against the derived entity do not return stale data. The <literal><subselect></literal> is available as both as an attribute and a nested mapping element."
msgstr ""
-#: basic_mapping.xml:584(title)
-msgid "id"
+#. Tag: title
+#: basic_mapping.xml:489
+#, no-c-format
+msgid "<title>id</title>"
msgstr ""
-#: basic_mapping.xml:586(para)
+#. Tag: para
+#: basic_mapping.xml:491
+#, no-c-format
msgid "Mapped classes <emphasis>must</emphasis> declare the primary key column of the database table. Most classes will also have a JavaBeans-style property holding the unique identifier of an instance. The <literal><id></literal> element defines the mapping from that property to the primary key column."
msgstr ""
-#: basic_mapping.xml:613(para)
+#. Tag: programlisting
+#: basic_mapping.xml:506
+#, no-c-format
+msgid ""
+ "<![CDATA[<id\n"
+ " name=\"propertyName\"\n"
+ " type=\"typename\"\n"
+ " column=\"column_name\"\n"
+ " unsaved-value=\"null|any|none|undefined|id_value\"\n"
+ " access=\"field|property|ClassName\">\n"
+ " node=\"element-name|@attribute-name|element/@attribute|.\"\n"
+ "\n"
+ " <generator class=\"generatorClass\"/>\n"
+ "</id>]]>"
+msgstr ""
+
+#. Tag: para
+#: basic_mapping.xml:509
+#, no-c-format
msgid "<literal>name</literal> (optional): The name of the identifier property."
msgstr ""
-#: basic_mapping.xml:618(para)
+#. Tag: para
+#: basic_mapping.xml:514
+#, no-c-format
msgid "<literal>type</literal> (optional): A name that indicates the Hibernate type."
msgstr ""
-#: basic_mapping.xml:623(para)
+#. Tag: para
+#: basic_mapping.xml:519
+#, no-c-format
msgid "<literal>column</literal> (optional - defaults to the property name): The name of the primary key column."
msgstr ""
-#: basic_mapping.xml:629(para)
+#. Tag: para
+#: basic_mapping.xml:525
+#, no-c-format
msgid "<literal>unsaved-value</literal> (optional - defaults to a \"sensible\" value): An identifier property value that indicates that an instance is newly instantiated (unsaved), distinguishing it from detached instances that were saved or loaded in a previous session."
msgstr ""
-#: basic_mapping.xml:637(para) basic_mapping.xml:1187(para) basic_mapping.xml:1343(para) basic_mapping.xml:1433(para) basic_mapping.xml:1559(para) basic_mapping.xml:1775(para) basic_mapping.xml:1963(para) basic_mapping.xml:2162(para) basic_mapping.xml:2914(para)
+#. Tag: para
+#: basic_mapping.xml:533 basic_mapping.xml:1041 basic_mapping.xml:1180 basic_mapping.xml:1262 basic_mapping.xml:1369 basic_mapping.xml:1558 basic_mapping.xml:1732 basic_mapping.xml:1902 basic_mapping.xml:2481
+#, no-c-format
msgid "<literal>access</literal> (optional - defaults to <literal>property</literal>): The strategy Hibernate should use for accessing the property value."
msgstr ""
-#: basic_mapping.xml:645(para)
+#. Tag: para
+#: basic_mapping.xml:541
+#, no-c-format
msgid "If the <literal>name</literal> attribute is missing, it is assumed that the class has no identifier property."
msgstr ""
-#: basic_mapping.xml:650(para)
+#. Tag: para
+#: basic_mapping.xml:546
+#, no-c-format
msgid "The <literal>unsaved-value</literal> attribute is almost never needed in Hibernate3."
msgstr ""
-#: basic_mapping.xml:654(para)
+#. Tag: para
+#: basic_mapping.xml:550
+#, no-c-format
msgid "There is an alternative <literal><composite-id></literal> declaration to allow access to legacy data with composite keys. We strongly discourage its use for anything else."
msgstr ""
-#: basic_mapping.xml:660(title)
+#. Tag: title
+#: basic_mapping.xml:556
+#, no-c-format
msgid "Generator"
msgstr ""
-#: basic_mapping.xml:662(para)
+#. Tag: para
+#: basic_mapping.xml:558
+#, no-c-format
msgid "The optional <literal><generator></literal> child element names a Java class used to generate unique identifiers for instances of the persistent class. If any parameters are required to configure or initialize the generator instance, they are passed using the <literal><param></literal> element."
msgstr ""
-#: basic_mapping.xml:684(literal)
+#. Tag: programlisting
+#: basic_mapping.xml:565
+#, no-c-format
+msgid ""
+ "<![CDATA[<id name=\"id\" type=\"long\" column=\"cat_id\">\n"
+ " <generator class=\"org.hibernate.id.TableHiLoGenerator\">\n"
+ " <param name=\"table\">uid_table</param>\n"
+ " <param name=\"column\">next_hi_value_column</param>\n"
+ " </generator>\n"
+ "</id>]]>"
+msgstr ""
+
+#. Tag: para
+#: basic_mapping.xml:567
+#, no-c-format
+msgid "All generators implement the interface <literal>org.hibernate.id.IdentifierGenerator</literal>. This is a very simple interface; some applications may choose to provide their own specialized implementations. However, Hibernate provides a range of built-in implementations. There are shortcut names for the built-in generators:"
+msgstr ""
+
+#. Tag: literal
+#: basic_mapping.xml:575
+#, no-c-format
msgid "increment"
msgstr ""
-#: basic_mapping.xml:686(para)
+#. Tag: para
+#: basic_mapping.xml:577
+#, no-c-format
msgid "generates identifiers of type <literal>long</literal>, <literal>short</literal> or <literal>int</literal> that are unique only when no other process is inserting data into the same table. <emphasis>Do not use in a cluster.</emphasis>"
msgstr ""
-#: basic_mapping.xml:695(literal)
+#. Tag: literal
+#: basic_mapping.xml:586
+#, no-c-format
msgid "identity"
msgstr ""
-#: basic_mapping.xml:697(para)
+#. Tag: para
+#: basic_mapping.xml:588
+#, no-c-format
msgid "supports identity columns in DB2, MySQL, MS SQL Server, Sybase and HypersonicSQL. The returned identifier is of type <literal>long</literal>, <literal>short</literal> or <literal>int</literal>."
msgstr ""
-#: basic_mapping.xml:705(literal)
+#. Tag: literal
+#: basic_mapping.xml:596
+#, no-c-format
msgid "sequence"
msgstr ""
-#: basic_mapping.xml:707(para)
+#. Tag: para
+#: basic_mapping.xml:598
+#, no-c-format
msgid "uses a sequence in DB2, PostgreSQL, Oracle, SAP DB, McKoi or a generator in Interbase. The returned identifier is of type <literal>long</literal>, <literal>short</literal> or <literal>int</literal>"
msgstr ""
-#: basic_mapping.xml:715(literal)
+#. Tag: literal
+#: basic_mapping.xml:606
+#, no-c-format
msgid "hilo"
msgstr ""
-#: basic_mapping.xml:717(para)
+#. Tag: para
+#: basic_mapping.xml:608
+#, no-c-format
msgid "uses a hi/lo algorithm to efficiently generate identifiers of type <literal>long</literal>, <literal>short</literal> or <literal>int</literal>, given a table and column (by default <literal>hibernate_unique_key</literal> and <literal>next_hi</literal> respectively) as a source of hi values. The hi/lo algorithm generates identifiers that are unique only for a particular database."
msgstr ""
-#: basic_mapping.xml:727(literal)
+#. Tag: literal
+#: basic_mapping.xml:618
+#, no-c-format
msgid "seqhilo"
msgstr ""
-#: basic_mapping.xml:729(para)
+#. Tag: para
+#: basic_mapping.xml:620
+#, no-c-format
msgid "uses a hi/lo algorithm to efficiently generate identifiers of type <literal>long</literal>, <literal>short</literal> or <literal>int</literal>, given a named database sequence."
msgstr ""
-#: basic_mapping.xml:737(literal)
+#. Tag: literal
+#: basic_mapping.xml:628
+#, no-c-format
msgid "uuid"
msgstr ""
-#: basic_mapping.xml:739(para)
+#. Tag: para
+#: basic_mapping.xml:630
+#, no-c-format
msgid "uses a 128-bit UUID algorithm to generate identifiers of type string, unique within a network (the IP address is used). The UUID is encoded as a string of hexadecimal digits of length 32."
msgstr ""
-#: basic_mapping.xml:747(literal)
+#. Tag: literal
+#: basic_mapping.xml:638
+#, no-c-format
msgid "guid"
msgstr ""
-#: basic_mapping.xml:749(para)
+#. Tag: para
+#: basic_mapping.xml:640
+#, no-c-format
msgid "uses a database-generated GUID string on MS SQL Server and MySQL."
msgstr ""
-#: basic_mapping.xml:755(literal)
+#. Tag: literal
+#: basic_mapping.xml:646
+#, no-c-format
msgid "native"
msgstr ""
-#: basic_mapping.xml:757(para)
+#. Tag: para
+#: basic_mapping.xml:648
+#, no-c-format
msgid "picks <literal>identity</literal>, <literal>sequence</literal> or <literal>hilo</literal> depending upon the capabilities of the underlying database."
msgstr ""
-#: basic_mapping.xml:765(literal)
+#. Tag: literal
+#: basic_mapping.xml:656
+#, no-c-format
msgid "assigned"
msgstr ""
-#: basic_mapping.xml:767(para)
+#. Tag: para
+#: basic_mapping.xml:658
+#, no-c-format
msgid "lets the application to assign an identifier to the object before <literal>save()</literal> is called. This is the default strategy if no <literal><generator></literal> element is specified."
msgstr ""
-#: basic_mapping.xml:775(literal)
+#. Tag: literal
+#: basic_mapping.xml:666
+#, no-c-format
msgid "select"
msgstr ""
-#: basic_mapping.xml:777(para)
+#. Tag: para
+#: basic_mapping.xml:668
+#, no-c-format
msgid "retrieves a primary key assigned by a database trigger by selecting the row by some unique key and retrieving the primary key value."
msgstr ""
-#: basic_mapping.xml:784(literal)
+#. Tag: literal
+#: basic_mapping.xml:675
+#, no-c-format
msgid "foreign"
msgstr ""
-#: basic_mapping.xml:786(para)
+#. Tag: para
+#: basic_mapping.xml:677
+#, no-c-format
msgid "uses the identifier of another associated object. Usually used in conjunction with a <literal><one-to-one></literal> primary key association."
msgstr ""
-#: basic_mapping.xml:793(literal)
+#. Tag: literal
+#: basic_mapping.xml:684
+#, no-c-format
msgid "sequence-identity"
msgstr ""
-#: basic_mapping.xml:795(para)
+#. Tag: para
+#: basic_mapping.xml:686
+#, no-c-format
msgid "a specialized sequence generation strategy which utilizes a database sequence for the actual value generation, but combines this with JDBC3 getGeneratedKeys to actually return the generated identifier value as part of the insert statement execution. This strategy is only known to be supported on Oracle 10g drivers targetted for JDK 1.4. Note comments on these insert statements are disabled due to a bug in the Oracle drivers."
msgstr ""
-#: basic_mapping.xml:676(para)
-msgid "All generators implement the interface <literal>org.hibernate.id.IdentifierGenerator</literal>. This is a very simple interface; some applications may choose to provide their own specialized implementations. However, Hibernate provides a range of built-in implementations. There are shortcut names for the built-in generators: <placeholder-1/>"
-msgstr ""
-
-#: basic_mapping.xml:812(title)
+#. Tag: title
+#: basic_mapping.xml:703
+#, no-c-format
msgid "Hi/lo algorithm"
msgstr ""
-#: basic_mapping.xml:813(para)
+#. Tag: para
+#: basic_mapping.xml:704
+#, no-c-format
msgid "The <literal>hilo</literal> and <literal>seqhilo</literal> generators provide two alternate implementations of the hi/lo algorithm, a favorite approach to identifier generation. The first implementation requires a \"special\" database table to hold the next available \"hi\" value. The second uses an Oracle-style sequence (where supported)."
msgstr ""
-#: basic_mapping.xml:835(para)
+#. Tag: programlisting
+#: basic_mapping.xml:711
+#, no-c-format
+msgid ""
+ "<![CDATA[<id name=\"id\" type=\"long\" column=\"cat_id\">\n"
+ " <generator class=\"hilo\">\n"
+ " <param name=\"table\">hi_value</param>\n"
+ " <param name=\"column\">next_value</param>\n"
+ " <param name=\"max_lo\">100</param>\n"
+ " </generator>\n"
+ "</id>]]>"
+msgstr ""
+
+#. Tag: programlisting
+#: basic_mapping.xml:713
+#, no-c-format
+msgid ""
+ "<![CDATA[<id name=\"id\" type=\"long\" column=\"cat_id\">\n"
+ " <generator class=\"seqhilo\">\n"
+ " <param name=\"sequence\">hi_value</param>\n"
+ " <param name=\"max_lo\">100</param>\n"
+ " </generator>\n"
+ "</id>]]>"
+msgstr ""
+
+#. Tag: para
+#: basic_mapping.xml:715
+#, no-c-format
msgid "Unfortunately, you can't use <literal>hilo</literal> when supplying your own <literal>Connection</literal> to Hibernate. When Hibernate is using an application server datasource to obtain connections enlisted with JTA, you must properly configure the <literal>hibernate.transaction.manager_lookup_class</literal>."
msgstr ""
-#: basic_mapping.xml:844(title)
+#. Tag: title
+#: basic_mapping.xml:724
+#, no-c-format
msgid "UUID algorithm"
msgstr ""
-#: basic_mapping.xml:845(para)
+#. Tag: para
+#: basic_mapping.xml:725
+#, no-c-format
msgid "The UUID contains: IP address, startup time of the JVM (accurate to a quarter second), system time and a counter value (unique within the JVM). It's not possible to obtain a MAC address or memory address from Java code, so this is the best we can do without using JNI."
msgstr ""
-#: basic_mapping.xml:854(title)
+#. Tag: title
+#: basic_mapping.xml:734
+#, no-c-format
msgid "Identity columns and sequences"
msgstr ""
-#: basic_mapping.xml:855(para)
+#. Tag: para
+#: basic_mapping.xml:735
+#, no-c-format
msgid "For databases which support identity columns (DB2, MySQL, Sybase, MS SQL), you may use <literal>identity</literal> key generation. For databases that support sequences (DB2, Oracle, PostgreSQL, Interbase, McKoi, SAP DB) you may use <literal>sequence</literal> style key generation. Both these strategies require two SQL queries to insert a new object."
msgstr ""
-#: basic_mapping.xml:873(para)
+#. Tag: programlisting
+#: basic_mapping.xml:743
+#, no-c-format
+msgid ""
+ "<![CDATA[<id name=\"id\" type=\"long\" column=\"person_id\">\n"
+ " <generator class=\"sequence\">\n"
+ " <param name=\"sequence\">person_id_sequence</param>\n"
+ " </generator>\n"
+ "</id>]]>"
+msgstr ""
+
+#. Tag: programlisting
+#: basic_mapping.xml:745
+#, no-c-format
+msgid ""
+ "<![CDATA[<id name=\"id\" type=\"long\" column=\"person_id\" unsaved-value=\"0\">\n"
+ " <generator class=\"identity\"/>\n"
+ "</id>]]>"
+msgstr ""
+
+#. Tag: para
+#: basic_mapping.xml:747
+#, no-c-format
msgid "For cross-platform development, the <literal>native</literal> strategy will choose from the <literal>identity</literal>, <literal>sequence</literal> and <literal>hilo</literal> strategies, dependant upon the capabilities of the underlying database."
msgstr ""
-#: basic_mapping.xml:882(title)
+#. Tag: title
+#: basic_mapping.xml:756
+#, no-c-format
msgid "Assigned identifiers"
msgstr ""
-#: basic_mapping.xml:883(para)
+#. Tag: para
+#: basic_mapping.xml:757
+#, no-c-format
msgid "If you want the application to assign identifiers (as opposed to having Hibernate generate them), you may use the <literal>assigned</literal> generator. This special generator will use the identifier value already assigned to the object's identifier property. This generator is used when the primary key is a natural key instead of a surrogate key. This is the default behavior if you do no specify a <literal><generator></literal> element."
msgstr ""
-#: basic_mapping.xml:892(para)
+#. Tag: para
+#: basic_mapping.xml:766
+#, no-c-format
msgid "Choosing the <literal>assigned</literal> generator makes Hibernate use <literal>unsaved-value=\"undefined\"</literal>, forcing Hibernate to go to the database to determine if an instance is transient or detached, unless there is a version or timestamp property, or you define <literal>Interceptor.isUnsaved()</literal>."
msgstr ""
-#: basic_mapping.xml:902(title)
+#. Tag: title
+#: basic_mapping.xml:776
+#, no-c-format
msgid "Primary keys assigned by triggers"
msgstr ""
-#: basic_mapping.xml:903(para)
+#. Tag: para
+#: basic_mapping.xml:777
+#, no-c-format
msgid "For legacy schemas only (Hibernate does not generate DDL with triggers)."
msgstr ""
-#: basic_mapping.xml:913(para)
+#. Tag: programlisting
+#: basic_mapping.xml:781
+#, no-c-format
+msgid ""
+ "<![CDATA[<id name=\"id\" type=\"long\" column=\"person_id\">\n"
+ " <generator class=\"select\">\n"
+ " <param name=\"key\">socialSecurityNumber</param>\n"
+ " </generator>\n"
+ "</id>]]>"
+msgstr ""
+
+#. Tag: para
+#: basic_mapping.xml:783
+#, no-c-format
msgid "In the above example, there is a unique valued property named <literal>socialSecurityNumber</literal> defined by the class, as a natural key, and a surrogate key named <literal>person_id</literal> whose value is generated by a trigger."
msgstr ""
-#: basic_mapping.xml:925(title)
+#. Tag: title
+#: basic_mapping.xml:795
+#, no-c-format
msgid "Enhanced identifier generators"
msgstr ""
-#: basic_mapping.xml:927(para)
+#. Tag: para
+#: basic_mapping.xml:797
+#, no-c-format
msgid "Starting with release 3.2.3, there are 2 new generators which represent a re-thinking of 2 different aspects of identifier generation. The first aspect is database portability; the second is optimization (not having to query the database for every request for a new identifier value). These two new generators are intended to take the place of some of the named generators described above (starting in 3.3.x); however, they are included in the current releases and can be referenced by FQN."
msgstr ""
-#: basic_mapping.xml:949(para)
+#. Tag: para
+#: basic_mapping.xml:805
+#, no-c-format
+msgid "The first of these new generators is <literal>org.hibernate.id.enhanced.SequenceStyleGenerator</literal> which is intended firstly as a replacement for the <literal>sequence</literal> generator and secondly as a better portability generator than <literal>native</literal> (because <literal>native</literal> (generally) chooses between <literal>identity</literal> and <literal>sequence</literal> which have largely different semantics which can cause subtle isssues in applications eyeing portability). <literal>org.hibernate.id.enhanced.SequenceStyleGenerator</literal> however achieves portability in a different manner. It chooses between using a table or a sequence in the database to store its incrementing values depending on the capabilities of the dialect being used. The difference between this and <literal>native</literal> is that table-based and sequence-based storage have the same exact semantic (in fact sequences are exactly what Hibernate tries to emmulate with its!
table-based generators). This generator has a number of configuration parameters:"
+msgstr ""
+
+#. Tag: para
+#: basic_mapping.xml:819
+#, no-c-format
msgid "<literal>sequence_name</literal> (optional, defaults to <literal>hibernate_sequence</literal>): The name of the sequence (or table) to be used."
msgstr ""
-#: basic_mapping.xml:955(para)
+#. Tag: para
+#: basic_mapping.xml:825
+#, no-c-format
msgid "<literal>initial_value</literal> (optional, defaults to <literal>1</literal>): The initial value to be retrieved from the sequence/table. In sequence creation terms, this is analogous to the clause typical named \"STARTS WITH\"."
msgstr ""
-#: basic_mapping.xml:962(para)
+#. Tag: para
+#: basic_mapping.xml:832
+#, no-c-format
msgid "<literal>increment_size</literal> (optional, defaults to <literal>1</literal>): The value by which subsequent calls to the sequence/table should differ. In sequence creation terms, this is analogous to the clause typical named \"INCREMENT BY\"."
msgstr ""
-#: basic_mapping.xml:969(para)
+#. Tag: para
+#: basic_mapping.xml:839
+#, no-c-format
msgid "<literal>force_table_use</literal> (optional, defaults to <literal>false</literal>): Should we force the use of a table as the backing structure even though the dialect might support sequence?"
msgstr ""
-#: basic_mapping.xml:976(para)
+#. Tag: para
+#: basic_mapping.xml:846
+#, no-c-format
msgid "<literal>value_column</literal> (optional, defaults to <literal>next_val</literal>): Only relevant for table structures! The name of the column on the table which is used to hold the value."
msgstr ""
-#: basic_mapping.xml:983(para)
-msgid "<literal>optimizer</literal> (optional, defaults to <literal>none</literal>): See <xref linkend=\"mapping-declaration-id-enhanced-optimizers\"/>"
+#. Tag: para
+#: basic_mapping.xml:853
+#, no-c-format
+msgid "<literal>optimizer</literal> (optional, defaults to <literal>none</literal>): See"
msgstr ""
-#: basic_mapping.xml:935(para)
-msgid "The first of these new generators is <literal>org.hibernate.id.enhanced.SequenceStyleGenerator</literal> which is intended firstly as a replacement for the <literal>sequence</literal> generator and secondly as a better portability generator than <literal>native</literal> (because <literal>native</literal> (generally) chooses between <literal>identity</literal> and <literal>sequence</literal> which have largely different semantics which can cause subtle isssues in applications eyeing portability). <literal>org.hibernate.id.enhanced.SequenceStyleGenerator</literal> however achieves portability in a different manner. It chooses between using a table or a sequence in the database to store its incrementing values depending on the capabilities of the dialect being used. The difference between this and <literal>native</literal> is that table-based and sequence-based storage have the same exact semantic (in fact sequences are exactly what Hibernate tries to emmulate with its!
table-based generators). This generator has a number of configuration parameters: <placeholder-1/>"
+#. Tag: para
+#: basic_mapping.xml:860
+#, no-c-format
+msgid "The second of these new generators is <literal>org.hibernate.id.enhanced.TableGenerator</literal> which is intended firstly as a replacement for the <literal>table</literal> generator (although it actually functions much more like <literal>org.hibernate.id.MultipleHiLoPerTableGenerator</literal>) and secondly as a re-implementation of <literal>org.hibernate.id.MultipleHiLoPerTableGenerator</literal> utilizing the notion of pluggable optimiziers. Essentially this generator defines a table capable of holding a number of different increment values simultaneously by using multiple distinctly keyed rows. This generator has a number of configuration parameters:"
msgstr ""
-#: basic_mapping.xml:1000(para)
+#. Tag: para
+#: basic_mapping.xml:870
+#, no-c-format
msgid "<literal>table_name</literal> (optional, defaults to <literal>hibernate_sequences</literal>): The name of the table to be used."
msgstr ""
-#: basic_mapping.xml:1006(para)
+#. Tag: para
+#: basic_mapping.xml:876
+#, no-c-format
msgid "<literal>value_column_name</literal> (optional, defaults to <literal>next_val</literal>): The name of the column on the table which is used to hold the value."
msgstr ""
-#: basic_mapping.xml:1012(para)
+#. Tag: para
+#: basic_mapping.xml:882
+#, no-c-format
msgid "<literal>segment_column_name</literal> (optional, defaults to <literal>sequence_name</literal>): The name of the column on the table which is used to hold the \"segement key\". This is the value which distinctly identifies which increment value to use."
msgstr ""
-#: basic_mapping.xml:1019(para)
+#. Tag: para
+#: basic_mapping.xml:889
+#, no-c-format
msgid "<literal>segment_value</literal> (optional, defaults to <literal>default</literal>): The \"segment key\" value for the segment from which we want to pull increment values for this generator."
msgstr ""
-#: basic_mapping.xml:1026(para)
+#. Tag: para
+#: basic_mapping.xml:896
+#, no-c-format
msgid "<literal>segment_value_length</literal> (optional, defaults to <literal>255</literal>): Used for schema generation; the column size to create this segment key column."
msgstr ""
-#: basic_mapping.xml:1032(para)
+#. Tag: para
+#: basic_mapping.xml:902
+#, no-c-format
msgid "<literal>initial_value</literal> (optional, defaults to <literal>1</literal>): The initial value to be retrieved from the table."
msgstr ""
-#: basic_mapping.xml:1038(para)
+#. Tag: para
+#: basic_mapping.xml:908
+#, no-c-format
msgid "<literal>increment_size</literal> (optional, defaults to <literal>1</literal>): The value by which subsequent calls to the table should differ."
msgstr ""
-#: basic_mapping.xml:1044(para)
-msgid "<literal>optimizer</literal> (optional, defaults to <literal/>): See <xref linkend=\"mapping-declaration-id-enhanced-optimizers\"/>"
+#. Tag: para
+#: basic_mapping.xml:914
+#, no-c-format
+msgid "<literal>optimizer</literal> (optional, defaults to <literal></literal>): See"
msgstr ""
-#: basic_mapping.xml:990(para)
-msgid "The second of these new generators is <literal>org.hibernate.id.enhanced.TableGenerator</literal> which is intended firstly as a replacement for the <literal>table</literal> generator (although it actually functions much more like <literal>org.hibernate.id.MultipleHiLoPerTableGenerator</literal>) and secondly as a re-implementation of <literal>org.hibernate.id.MultipleHiLoPerTableGenerator</literal> utilizing the notion of pluggable optimiziers. Essentially this generator defines a table capable of holding a number of different increment values simultaneously by using multiple distinctly keyed rows. This generator has a number of configuration parameters: <placeholder-1/>"
+#. Tag: title
+#: basic_mapping.xml:924
+#, no-c-format
+msgid "Identifier generator optimization"
msgstr ""
-#: basic_mapping.xml:1054(title)
-msgid "Identifier generator optimization"
+#. Tag: para
+#: basic_mapping.xml:925
+#, no-c-format
+msgid "For identifier generators which store values in the database, it is inefficient for them to hit the database on each and every call to generate a new identifier value. Instead, you'd ideally want to group a bunch of them in memory and only hit the database when you have exhausted your in-memory value group. This is the role of the pluggable optimizers. Currently only the two enhanced generators (<xref linkend=\"mapping-declaration-id-enhanced\"/> support this notion."
msgstr ""
-#: basic_mapping.xml:1063(para)
+#. Tag: para
+#: basic_mapping.xml:933
+#, no-c-format
msgid "<literal>none</literal> (generally this is the default if no optimizer was specified): This says to not perform any optimizations, and hit the database each and every request."
msgstr ""
-#: basic_mapping.xml:1069(para)
+#. Tag: para
+#: basic_mapping.xml:939
+#, no-c-format
msgid "<literal>hilo</literal>: applies a hi/lo algorithm around the database retrieved values. The values from the database for this optimizer are expected to be sequential. The values retrieved from the database structure for this optimizer indicates the \"group number\"; the <literal>increment_size</literal> is multiplied by that value in memory to define a group \"hi value\"."
msgstr ""
-#: basic_mapping.xml:1078(para)
+#. Tag: para
+#: basic_mapping.xml:948
+#, no-c-format
msgid "<literal>pooled</literal>: like was discussed for <literal>hilo</literal>, this optimizers attempts to minimize the number of hits to the database. Here, however, we simply store the starting value for the \"next group\" into the database structure rather than a sequential value in combination with an in-memory grouping algorithm. <literal>increment_size</literal> here refers to the values coming from the database."
msgstr ""
-#: basic_mapping.xml:1055(para)
-msgid "For identifier generators which store values in the database, it is inefficient for them to hit the database on each and every call to generate a new identifier value. Instead, you'd ideally want to group a bunch of them in memory and only hit the database when you have exhausted your in-memory value gro