⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 basic_mapping.pot

📁 hibernate 开源框架的代码 jar包希望大家能喜欢
💻 POT
📖 第 1 页 / 共 5 页
字号:
#: basic_mapping.xml:476(para) 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) 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>&lt;class&gt;</literal> declaration as a <literal>&lt;subclass&gt;</literal> or <literal>&lt;joined-subclass&gt;</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) 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) 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>&lt;subclass&gt;</literal> or <literal>&lt;joined-subclass&gt;</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) 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) msgid "If you enable <literal>dynamic-update</literal>, you will have a choice of optimistic locking strategies:"msgstr ""#: basic_mapping.xml:526(para) msgid "<literal>version</literal> check the version/timestamp columns"msgstr ""#: basic_mapping.xml:531(para) msgid "<literal>all</literal> check all columns"msgstr ""#: basic_mapping.xml:536(para) msgid "<literal>dirty</literal> check the changed columns, allowing some concurrent updates"msgstr ""#: basic_mapping.xml:541(para) msgid "<literal>none</literal> do not use optimistic locking"msgstr ""#: basic_mapping.xml:546(para) 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) 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) 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>&lt;subselect&gt;</literal> is available as both as an attribute and a nested mapping element."msgstr ""#: basic_mapping.xml:584(title) msgid "id"msgstr ""#: basic_mapping.xml:586(para) 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>&lt;id&gt;</literal> element defines the mapping from that property to the primary key column."msgstr ""#: basic_mapping.xml:613(para) msgid "<literal>name</literal> (optional): The name of the identifier property."msgstr ""#: basic_mapping.xml:618(para) msgid "<literal>type</literal> (optional): A name that indicates the Hibernate type."msgstr ""#: basic_mapping.xml:623(para) msgid "<literal>column</literal> (optional - defaults to the property name): The name of the primary key column."msgstr ""#: basic_mapping.xml:629(para) 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) 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) 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) msgid "The <literal>unsaved-value</literal> attribute is almost never needed in Hibernate3."msgstr ""#: basic_mapping.xml:654(para) msgid "There is an alternative <literal>&lt;composite-id&gt;</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) msgid "Generator"msgstr ""#: basic_mapping.xml:662(para) msgid "The optional <literal>&lt;generator&gt;</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>&lt;param&gt;</literal> element."msgstr ""#: basic_mapping.xml:684(literal) msgid "increment"msgstr ""#: basic_mapping.xml:686(para) 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) msgid "identity"msgstr ""#: basic_mapping.xml:697(para) 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) msgid "sequence"msgstr ""#: basic_mapping.xml:707(para) 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) msgid "hilo"msgstr ""#: basic_mapping.xml:717(para) 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) msgid "seqhilo"msgstr ""#: basic_mapping.xml:729(para) 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) msgid "uuid"msgstr ""#: basic_mapping.xml:739(para) 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) msgid "guid"msgstr ""#: basic_mapping.xml:749(para) msgid "uses a database-generated GUID string on MS SQL Server and MySQL."msgstr ""#: basic_mapping.xml:755(literal) msgid "native"msgstr ""#: basic_mapping.xml:757(para) 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) msgid "assigned"msgstr ""#: basic_mapping.xml:767(para) 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>&lt;generator&gt;</literal> element is specified."msgstr ""#: basic_mapping.xml:775(literal) msgid "select"msgstr ""#: basic_mapping.xml:777(para) 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) msgid "foreign"msgstr ""#: basic_mapping.xml:786(para) msgid "uses the identifier of another associated object. Usually used in conjunction with a <literal>&lt;one-to-one&gt;</literal> primary key association."msgstr ""#: basic_mapping.xml:793(literal) msgid "sequence-identity"msgstr ""#: basic_mapping.xml:795(para) 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) msgid "Hi/lo algorithm"msgstr ""#: basic_mapping.xml:813(para) 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) 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 ""

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -