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

📄 basic_mapping.pot

📁 hibernate-distribution-3.3.1.GA-dist.zip源码
💻 POT
📖 第 1 页 / 共 5 页
字号:
      "        node=\"element-name\"\n"      "/>]]>"msgstr ""#. Tag: para#: basic_mapping.xml:238#, no-c-formatmsgid "<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 ""#. Tag: para#: basic_mapping.xml:245#, no-c-formatmsgid "<literal>table</literal> (optional - defaults to the unqualified class name): The name of its database table."msgstr ""#. Tag: para#: basic_mapping.xml:251#, no-c-formatmsgid "<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 ""#. Tag: para#: basic_mapping.xml:258#, no-c-formatmsgid "<literal>mutable</literal> (optional, defaults to <literal>true</literal>): Specifies that instances of the class are (not) mutable."msgstr ""#. Tag: para#: basic_mapping.xml:264 basic_mapping.xml:2228#, no-c-formatmsgid "<literal>schema</literal> (optional): Override the schema name specified by the root <literal>&lt;hibernate-mapping&gt;</literal> element."msgstr ""#. Tag: para#: basic_mapping.xml:270 basic_mapping.xml:2234#, no-c-formatmsgid "<literal>catalog</literal> (optional): Override the catalog name specified by the root <literal>&lt;hibernate-mapping&gt;</literal> element."msgstr ""#. Tag: para#: basic_mapping.xml:276#, no-c-formatmsgid "<literal>proxy</literal> (optional): Specifies an interface to use for lazy initializing proxies. You may specify the name of the class itself."msgstr ""#. Tag: para#: basic_mapping.xml:282#, no-c-formatmsgid "<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 ""#. Tag: para#: basic_mapping.xml:289#, no-c-formatmsgid "<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 ""#. Tag: para#: basic_mapping.xml:296#, no-c-formatmsgid "<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 ""#. Tag: para#: basic_mapping.xml:306#, no-c-formatmsgid "<literal>polymorphism</literal> (optional, defaults to <literal>implicit</literal>): Determines whether implicit or explicit query polymorphism is used."msgstr ""#. Tag: para#: basic_mapping.xml:312#, no-c-formatmsgid "<literal>where</literal> (optional) specify an arbitrary SQL <literal>WHERE</literal> condition to be used when retrieving objects of this class"msgstr ""#. Tag: para#: basic_mapping.xml:318#, no-c-formatmsgid "<literal>persister</literal> (optional): Specifies a custom <literal>ClassPersister</literal>."msgstr ""#. Tag: para#: basic_mapping.xml:323#, no-c-formatmsgid "<literal>batch-size</literal> (optional, defaults to <literal>1</literal>) specify a \"batch size\" for fetching instances of this class by identifier."msgstr ""#. Tag: para#: basic_mapping.xml:329#, no-c-formatmsgid "<literal>optimistic-lock</literal> (optional, defaults to <literal>version</literal>): Determines the optimistic locking strategy."msgstr ""#. Tag: para#: basic_mapping.xml:335#, no-c-formatmsgid "<literal>lazy</literal> (optional): Lazy fetching may be completely disabled by setting <literal>lazy=\"false\"</literal>."msgstr ""#. Tag: para#: basic_mapping.xml:341#, no-c-formatmsgid "<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 ""#. Tag: para#: basic_mapping.xml:351#, no-c-formatmsgid "<literal>check</literal> (optional): A SQL expression used to generate a multi-row <emphasis>check</emphasis> constraint for automatic schema generation."msgstr ""#. Tag: para#: basic_mapping.xml:357#, no-c-formatmsgid "<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 ""#. Tag: para#: basic_mapping.xml:365#, no-c-formatmsgid "<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 ""#. Tag: para#: basic_mapping.xml:372#, no-c-formatmsgid "<literal>abstract</literal> (optional): Used to mark abstract superclasses in <literal>&lt;union-subclass&gt;</literal> hierarchies."msgstr ""#. Tag: para#: basic_mapping.xml:380#, no-c-formatmsgid "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>&lt;subclass&gt;</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 ""#. Tag: para#: basic_mapping.xml:387#, no-c-formatmsgid "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 ""#. Tag: para#: basic_mapping.xml:392#, no-c-formatmsgid "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 ""#. Tag: para#: basic_mapping.xml:399#, no-c-formatmsgid "<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 ""#. Tag: para#: basic_mapping.xml:411#, no-c-formatmsgid "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 ""#. Tag: para#: basic_mapping.xml:422#, no-c-formatmsgid "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 ""#. Tag: para#: basic_mapping.xml:430#, no-c-formatmsgid "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 ""#. Tag: para#: basic_mapping.xml:436#, no-c-formatmsgid "If you enable <literal>dynamic-update</literal>, you will have a choice of optimistic locking strategies:"msgstr ""#. Tag: para#: basic_mapping.xml:442#, no-c-formatmsgid "<literal>version</literal> check the version/timestamp columns"msgstr ""#. Tag: para#: basic_mapping.xml:447#, no-c-formatmsgid "<literal>all</literal> check all columns"msgstr ""#. Tag: para#: basic_mapping.xml:452#, no-c-formatmsgid "<literal>dirty</literal> check the changed columns, allowing some concurrent updates"msgstr ""#. Tag: para#: basic_mapping.xml:457#, no-c-formatmsgid "<literal>none</literal> do not use optimistic locking"msgstr ""#. Tag: para#: basic_mapping.xml:462#, no-c-formatmsgid "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 ""#. Tag: para#: basic_mapping.xml:469#, no-c-formatmsgid "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 ""#. Tag: programlisting#: basic_mapping.xml:477#, no-c-formatmsgid ""      "<![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-formatmsgid "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 ""#. Tag: title#: basic_mapping.xml:489#, no-c-formatmsgid "<title>id</title>"msgstr ""#. Tag: para#: basic_mapping.xml:491#, no-c-formatmsgid "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 ""#. Tag: programlisting#: basic_mapping.xml:506#, no-c-formatmsgid ""      "<![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-formatmsgid "<literal>name</literal> (optional): The name of the identifier property."msgstr ""#. Tag: para#: basic_mapping.xml:514#, no-c-formatmsgid "<literal>type</literal> (optional): A name that indicates the Hibernate type."msgstr ""#. Tag: para#: basic_mapping.xml:519#, no-c-formatmsgid "<literal>column</literal> (optional - defaults to the property name): The name of the primary key column."msgstr ""#. Tag: para#: basic_mapping.xml:525#, no-c-formatmsgid "<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 ""#. 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-formatmsgid "<literal>access</literal> (optional - defaults to <literal>property</literal>): The strategy Hibernate should use for accessing the property value."msgstr ""#. Tag: para#: basic_mapping.xml:541#, no-c-formatmsgid "If the <literal>name</literal> attribute is missing, it is assumed that the class has no identifier property."msgstr ""#. Tag: para#: basic_mapping.xml:546#, no-c-formatmsgid "The <literal>unsaved-value</literal> attribute is almost never needed in Hibernate3."msgstr ""#. Tag: para#: basic_mapping.xml:550

⌨️ 快捷键说明

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