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

📄 basic_mapping.po

📁 hibernate-distribution-3.3.1.GA-dist.zip源码
💻 PO
📖 第 1 页 / 共 5 页
字号:
"<literal>save()</literal> is called. This is the default strategy if no ""<literal>&lt;generator&gt;</literal> element is specified."msgstr """deixa a aplicação definir um identificador para o objeto antes que o ""<literal>save()</literal> seja chamado. Esta é a estratégia default se ""nenhum elemento <literal>&lt;generator&gt;</literal> é especificado."#. Tag: literal#: basic_mapping.xml:642#, no-c-formatmsgid "select"msgstr "select"#. Tag: para#: basic_mapping.xml:644#, no-c-formatmsgid """retrieves a primary key assigned by a database trigger by selecting the row ""by some unique key and retrieving the primary key value."msgstr """retorna a chave primaria recuperada por uma trigger do banco de dados, ""selecionado uma linha pela chave única e recuperando o valor da chave ""primária."#. Tag: literal#: basic_mapping.xml:651#, no-c-formatmsgid "foreign"msgstr "foreign"#. Tag: para#: basic_mapping.xml:653#, no-c-formatmsgid """uses the identifier of another associated object. Usually used in ""conjunction with a <literal>&lt;one-to-one&gt;</literal> primary key ""association."msgstr """utiliza o identificador de um outro objeto associado. Normalmente utilizado ""em conjunto com uma associaçõa de chave primária do tipo <literal>&lt;one-to-""one&gt;</literal>."#. Tag: literal#: basic_mapping.xml:660#, no-c-formatmsgid "sequence-identity"msgstr "sequence-identity"#. Tag: para#: basic_mapping.xml:662#, no-c-formatmsgid """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 """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."#. Tag: title#: basic_mapping.xml:679#, no-c-formatmsgid "Hi/lo algorithm"msgstr "Algoritmo Hi/lo"#. Tag: para#: basic_mapping.xml:680#, no-c-formatmsgid """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 """Os geradores <literal>hilo</literal> e <literal>seqhilo</literal> fornecem ""duas implementações alternativas do algoritmo hi/lo, uma solução ""preferencial para a geração de identificadores. A primeira implementação ""requer uma tabela especial do banco de dados para manter o proximo valor \"hi""\" disponível. A segunda utiliza uma seqüência do estilo Oracle (quando ""suportado)."#. Tag: programlisting#: basic_mapping.xml:687#, no-c-formatmsgid """<![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:689#, no-c-formatmsgid """<![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:691#, no-c-formatmsgid """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 """Infelizemente, voce não pode utilizar <literal>hilo</literal> quando estiver ""fornecendo sia propria <literal>Connection</literal> para o Hibernate. ""Quando o Hibernate está usando um datasource do servidor de aplicações para ""obter conexões suportadas com JTA, você precisa configurar adequadamente o ""<literal>hibernate.transaction.manager_lookup_class</literal>."#. Tag: title#: basic_mapping.xml:700#, no-c-formatmsgid "UUID algorithm"msgstr "UUID algorithm"#. Tag: para#: basic_mapping.xml:701#, no-c-formatmsgid """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 """O UUID contem: o endereço IP, hora de inicio da JVM (com precisão de um ""quarto de segundo), a hora do sistema e um valor contador (unico dentro da ""JVM). Não é possivel obter o endereço MAC ou um endereço de memória do ""código Java, assim este é o melhor que pode ser feito sem utilizar JNI."#. Tag: title#: basic_mapping.xml:710#, no-c-formatmsgid "Identity columns and sequences"msgstr "Colunas de identidade e sequencias"#. Tag: para#: basic_mapping.xml:711#, no-c-formatmsgid """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 """Para bancos de dados que suportam colunas de identidade (DB2, MySQL, Sybase, ""MS SQL), você pode utilizar uma geração de chave <literal>identity</""literal>. Para bancos de dados que suportam sequencias (DB2, Oracle, ""PostgreSQL, Interbase, McKoi, SAP DB) voce pode utilizar a geração de chaves ""no estilo <literal>sequence</literal>. As duas estratégias requerem duas ""consultas SQL para inserir um novo objeto."#. Tag: programlisting#: basic_mapping.xml:719#, no-c-formatmsgid """<![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:721#, no-c-formatmsgid """<![CDATA[<id name=\"id\" type=\"long\" column=\"person_id\" unsaved-value=\"0""\">\n""        <generator class=\"identity\"/>\n""</id>]]>"msgstr ""#. Tag: para#: basic_mapping.xml:723#, no-c-formatmsgid """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 """Para desenvolvimento multi-plataforma, a estratégia <literal>native</""literal> irá escolher entre as estratégias i <literal>identity</literal>, ""<literal>sequence</literal> e <literal>hilo</literal>, dependendo das ""capacidades do banco de dados utilizado."#. Tag: title#: basic_mapping.xml:732#, no-c-formatmsgid "Assigned identifiers"msgstr "Identificadores especificados"#. Tag: para#: basic_mapping.xml:733#, no-c-formatmsgid """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>&lt;generator&gt;</literal> ""element."msgstr """Se você quer que a aplicação especifique os identificadores (em vez do ""Hibernate gerá-los) você deve utilizar o gerador <literal>assigned</""literal>. Este gerador especial irá utilizar o valor do identificador ""especificado para a propriedade de identificação do objeto. Este gerador é ""usado quando a chave primaria é a chave natural em vez de uma surrogate key. ""Este é o comportamento padrão se você não especificar um elemento ""<literal>&lt;generator&gt;</literal>."#. Tag: para#: basic_mapping.xml:742#, no-c-formatmsgid """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 """Escolher o gerador <literal>assigned</literal> faz com que o Hibernate ""utilize <literal>unsaved-value=\"undefined\"</literal>, forçando o Hibernate ""ir até o banco de dados para determinar se uma instância está transiente ou ""desasociada, a menos que haja uma versão ou uma propriedade timestamp, ou ""você pode definir <literal>Interceptor.isUnsaved()</literal>."#. Tag: title#: basic_mapping.xml:752#, no-c-formatmsgid "Primary keys assigned by triggers"msgstr "Chaves primárias geradas por triggers"#. Tag: para#: basic_mapping.xml:753#, no-c-formatmsgid """For legacy schemas only (Hibernate does not generate DDL with triggers)."msgstr "Apenas para sistemas legados (o Hibernate nao gera DDL com triggers)."#. Tag: programlisting#: basic_mapping.xml:757#, no-c-formatmsgid """<![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:759#, no-c-formatmsgid """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 """No exemplo acima, há uma única propriedade com valor nomeada ""<literal>socialSecurityNumber</literal> definida pela classe, uma chave ""natural, e uma surrogate key nomeada <literal>person_id</literal> cujo valor ""é gerado pro uma trigger."#. Tag: title#: basic_mapping.xml:771#, no-c-formatmsgid "Enhanced identifier generators"msgstr "Enhanced identifier generators"#. Tag: para#: basic_mapping.xml:773#, no-c-formatmsgid """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 """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."#. Tag: para#: basic_mapping.xml:781#, fuzzy, no-c-formatmsgid """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

⌨️ 快捷键说明

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