📄 basic_mapping.po
字号:
#: 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 """<literal>check</literal> (可选): 这是一个SQL表达式, 用于为自动生成的schema添""加多行(multi-row)约束<emphasis>检查</emphasis>。"#. 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 """<literal>rowid</literal> (可选): Hibernate可以使用数据库支持的所谓的ROWIDs,""例如: Oracle数据库,如果你设置这个可选的<literal>rowid</literal>, Hibernate""可以使用额外的字段<literal>rowid</literal>实现快速更新。ROWID是这个功能实现的""重点, 它代表了一个存储元组(tuple)的物理位置。"#. 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 """<literal>subselect</literal> (可选): 它将一个不可变(immutable)并且只读的实""体映射到一个数据库的 子查询中。当你想用视图代替一张基本表的时候,这是有用的,""但最好不要这样做。更多的介绍请看下面内容。"#. Tag: para#: basic_mapping.xml:372#, no-c-formatmsgid """<literal>abstract</literal> (optional): Used to mark abstract superclasses ""in <literal><union-subclass></literal> hierarchies."msgstr """<literal>abstract</literal> (可选): 用于在<literal><union-subclass></""literal>的继承结构 (hierarchies)中标识抽象超类。"#. 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><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 """若指明的持久化类实际上是一个接口,这也是完全可以接受的。 之后你可以用元素""<literal><subclass></literal>来指定该接口的实际实现类。 你可以持久化任""何<emphasis>static</emphasis>(静态的)内部类。 你应该使用标准的类名格式来指""定类名,<literal>比如:Foo$Bar</literal>。"#. 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 """不可变类,<literal>mutable=\"false\"</literal>不可以被应用程序更新或者删除。 ""这可以让Hibernate做一些小小的性能优化。"#. 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 """可选的<literal>proxy</literal>属性允许延迟加载类的持久化实例。 Hibernate开始""会返回实现了这个命名接口的CGLIB代理。当代理的某个方法被实际调用的时候, 真实""的持久化对象才会被装载。参见下面的“用于延迟装载的代理”。"#. 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><""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 """<emphasis>Implicit</emphasis> (隐式)的多态是指,如果查询时给出的是任何超类、""该类实现的接口或者该类的 名字,都会返回这个类的实例;如果查询中给出的是子类的""名字,则会返回子类的实例。 <emphasis>Explicit</emphasis> (显式)的多态是指,""只有在查询时给出明确的该类名字时才会返回这个类的实例; 同时只有在这个""<literal><class></literal>的定义中作为<literal><subclass></""literal> 或者<literal><joined-subclass></literal>出现的子类,才会可能返""回。 在大多数情况下,默认的<literal>polymorphism=\"implicit\"</literal>都是合""适的。 显式的多态在有两个不同的类映射到同一个表的时候很有用。(允许一个“轻""型”的类,只包含部分表字段)。"#. 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 """<literal>persister</literal>属性可以让你定制这个类使用的持久化策略。 你可以指""定你自己实现 <literal>org.hibernate.persister.EntityPersister</literal>的子""类,你甚至可以完全从头开始编写一个 <literal>org.hibernate.persister.""ClassPersister</literal>接口的实现, 比如是用储存过程调用、序列化到文件或者""LDAP数据库来实现。 参阅<literal>org.hibernate.test.CustomPersister</""literal>,这是一个简单的例子 (“持久化”到一个<literal>Hashtable</literal>)。"#. 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><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 """请注意<literal>dynamic-update</literal>和<literal>dynamic-insert</literal>的""设置并不会继承到子类, 所以在<literal><subclass></literal>或者""<literal><joined-subclass></literal>元素中可能 需要再次设置。这些设置是""否能够提高效率要视情形而定。请用你的智慧决定是否使用。"#. 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 """使用<literal>select-before-update</literal>通常会降低性能。如果你重新连接一个""脱管(detache)对象实例 到一个<literal>Session</literal>中时,它可以防止数据""库不必要的触发update。 这就很有用了。"#. 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 """如果你打开了<literal>dynamic-update</literal>,你可以选择几种乐观锁定的策略:"#. Tag: para#: basic_mapping.xml:442#, no-c-formatmsgid "<literal>version</literal> check the version/timestamp columns"msgstr "<literal>version(版本检查)</literal> 检查version/timestamp字段"#. Tag: para#: basic_mapping.xml:447#, no-c-formatmsgid "<literal>all</literal> check all columns"msgstr "<literal>all(全部)</literal> 检查全部字段"#. Tag: para#: basic_mapping.xml:452#, no-c-formatmsgid """<literal>dirty</literal> check the changed columns, allowing some concurrent ""updates"msgstr "<literal>dirty(脏检查)</literal>只检察修改过的字段"#. Tag: para#: basic_mapping.xml:457#, no-c-formatmsgid "<literal>none</literal> do not use optimistic locking"msgstr "<literal>none(不检查)</literal>不使用乐观锁定"#. 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 """我们<emphasis>非常</emphasis>强烈建议你在Hibernate中使用version/timestamp字段""来进行乐观锁定。 对性能来说,这是最好的选择,并且这也是唯一能够处理在session""外进行操作的策略(例如: 在使用<literal>Session.merge()</literal>的时候)。"#. 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 """对Hibernate映射来说视图和表是没有区别的,这是因为它们在数据层都是透明的( 注""意:一些数据库不支持视图属性,特别是更新的时候)。有时你想使用视图,但却不能""在数据库 中创建它(例如:在遗留的schema中)。这样的话,你可以映射一个不可变的""(immutable)并且是 只读的实体到一个给定的SQL子查询表达式:"#. 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><subselect></literal> is available as both as ""an attribute and a nested mapping element."msgstr """定义这个实体用到的表为同步(synchronize),确保自动刷新(auto-flush)正确执""行, 并且依赖原实体的查询不会返回过期数据。<literal><subselect></""literal>在属性元素 和一个嵌套映射元素中都可见。"#. 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><id></""literal> element defines the mapping from that property to the primary key ""column."msgstr """被映射的类<emphasis>必须</emphasis>定义对应数据库表主键字段。大多数类有一个""JavaBeans风格的属性, 为每一个实例包含唯一的标识。<literal><id></""literal> 元素定义了该属性到数据库表主键字段的映射。"#. 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 "<literal>name</literal> (可选): 标识属性的名字。"#. Tag: para#: basic_mapping.xml:514#, no-c-formatmsgid """<literal>type</literal> (optional): A name that indicates the Hibernate type."msgstr "<literal>type</literal> (可选): 标识Hibernate类型的名字。"#. 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 "<literal>column</literal> (可选 - 默认为属性名): 主键字段的名字。"#. Tag: para#: basic_mapping.xml:525#, no-c-format
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -