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

📄 association_mapping.po

📁 hibernate 开源框架的代码 jar包希望大家能喜欢
💻 PO
📖 第 1 页 / 共 2 页
字号:
msgid ""msgstr """Project-Id-Version: PACKAGE VERSION\n""Report-Msgid-Bugs-To: http://bugs.kde.org\n""POT-Creation-Date: 2007-10-25 07:47+0000\n""PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n""Last-Translator: FULL NAME <EMAIL@ADDRESS>\n""Language-Team: LANGUAGE <LL@li.org>\n""MIME-Version: 1.0\n""Content-Type: text/plain; charset=UTF-8\n""Content-Transfer-Encoding: 8bit\n"#. Tag: title#: association_mapping.xml:6#, no-c-formatmsgid "Association Mappings"msgstr "Mapeamento de Associações"#. Tag: title#: association_mapping.xml:9#, no-c-formatmsgid "Introduction"msgstr "Introdução"#. Tag: para#: association_mapping.xml:11#, no-c-formatmsgid """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 """Mapeamentos de associações são freqüentemente a coisa mais difícil de se ""acertar. Nesta seção nós passaremos pêlos casos canônicos um pôr um, ""começando com mapeamentos unidirecionais e considerando os casos ""bidirecionais. Nos vamos usar <literal>Person</literal> e <literal>Address</""literal> em todos os exemplos."#. Tag: para#: association_mapping.xml:19#, no-c-formatmsgid """We'll classify associations by whether or not they map to an intervening ""join table, and by multiplicity."msgstr """Nós classificaremos as associações pelo seu mapeamento ou a falta do mesmo, ""sua intervenção na tabela associativa, e pela sua multiplicidade."#. Tag: para#: association_mapping.xml:24#, no-c-formatmsgid """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 """O uso de chaves estrangeiras não obrigatórias não é considerada uma boa ""prática na modelagem de dados tradicional, assim todos nossos exemplos usam ""chaves estrangeiras obrigatórias. Esta não é uma exigência do Hibernate, e ""todas as mapeamentos funcionarão se você remover as constraints de ""obrigatoriedade."#. Tag: title#: association_mapping.xml:34#, no-c-formatmsgid "Unidirectional associations"msgstr "Associações Unidirecionais"#. Tag: title#: association_mapping.xml:37 association_mapping.xml:108#, no-c-formatmsgid "many to one"msgstr "muitos para um"#. Tag: para#: association_mapping.xml:39#, no-c-formatmsgid """A <emphasis>unidirectional many-to-one association</emphasis> is the most ""common kind of unidirectional association."msgstr """Uma <emphasis>associação unidirecional muitos-para-um</emphasis> é o tipo ""mais comum de associação unidirecional."#. Tag: programlisting#: association_mapping.xml:44#, no-c-formatmsgid """<![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:45 association_mapping.xml:161#, no-c-formatmsgid """<![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:50 association_mapping.xml:121#: association_mapping.xml:185 association_mapping.xml:225#, fuzzy, no-c-formatmsgid "one to one"msgstr """#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n""um para um\n""#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n""um para um\n""#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n""um para um\n""#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n""one to one"#. Tag: para#: association_mapping.xml:52#, no-c-formatmsgid """A <emphasis>unidirectional one-to-one association on a foreign key</""emphasis> is almost identical. The only difference is the column unique ""constraint."msgstr """Uma <emphasis>associação unidirecional um-para-um em uma chave estrangeira </""emphasis> é quase idêntica. A única diferença é a constraint unique na ""coluna."#. Tag: programlisting#: association_mapping.xml:57#, no-c-formatmsgid """<![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:58 association_mapping.xml:193#, no-c-formatmsgid """<![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:60#, no-c-formatmsgid """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 """Uma <emphasis>associação unidirecional um-para-um na chave primaria</""emphasis> geralmente usa um gerador de id special. ( Note que nós invertemos ""a direção da associação nesse exemplo)."#. Tag: programlisting#: association_mapping.xml:66#, no-c-formatmsgid """<![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:67 association_mapping.xml:201#, no-c-formatmsgid """<![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:72 association_mapping.xml:94#, no-c-formatmsgid "one to many"msgstr "um para muitos"#. Tag: para#: association_mapping.xml:74#, no-c-formatmsgid """A <emphasis>unidirectional one-to-many association on a foreign key</""emphasis> is a very unusual case, and is not really recommended."msgstr """Uma <emphasis>associação unidirecional um-para-muitos em uma chave ""estrangeira</emphasis> é um caso muito incomum, e realmente não é ""recomendada."#. Tag: programlisting#: association_mapping.xml:79#, no-c-formatmsgid """<![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:80#, no-c-formatmsgid """<![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:82#, no-c-formatmsgid "We think it's better to use a join table for this kind of association."msgstr """Nós achamos que é melhor usar uma tabela associativa para este tipo de ""associação."#. Tag: title#: association_mapping.xml:91#, no-c-formatmsgid "Unidirectional associations with join tables"msgstr "Associações Unidirecionais com tabelas associativas"#. Tag: para#: association_mapping.xml:96#, no-c-formatmsgid """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 """Uma <emphasis>associação um-para-muitos unidirecional usando uma tabela ""associativa</emphasis> e o mais comum. Note que se especificarmos ""<literal>unique=\"true\"</literal>, estaremos modificando a cardinalidade de ""muitos-para-muitos para um-para-muitos."#. Tag: programlisting#: association_mapping.xml:102#, no-c-formatmsgid """<![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:103#, no-c-formatmsgid """<![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:110#, no-c-formatmsgid """A <emphasis>unidirectional many-to-one association on a join table</""emphasis> is quite common when the association is optional."msgstr """Uma <emphasis>associação unidirecional muitos-para-um em uma tabela ""associativa</emphasis> é bastante comum quando a associação for opcional."#. Tag: programlisting#: association_mapping.xml:115#, no-c-formatmsgid """<![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:116#, no-c-formatmsgid """<![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:123#, no-c-formatmsgid """A <emphasis>unidirectional one-to-one association on a join table</emphasis> ""is extremely unusual, but possible."msgstr """Uma <emphasis>associação unidirecional um-para-um em uma tabela associativa</""emphasis> é extremamente incomum, mas possível."#. Tag: programlisting#: association_mapping.xml:128#, no-c-formatmsgid """<![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:129 association_mapping.xml:233#, no-c-formatmsgid """<![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:134 association_mapping.xml:238#, no-c-formatmsgid "many to many"msgstr "muitos para muitos"#. Tag: para#: association_mapping.xml:136#, no-c-formatmsgid """Finally, we have a <emphasis>unidirectional many-to-many association</""emphasis>."msgstr """Finalmente, nós temos a <emphasis>associação unidirecional muitos-para- ""muitos</emphasis>."#. Tag: programlisting#: association_mapping.xml:140#, no-c-formatmsgid """<![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"

⌨️ 快捷键说明

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