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

📄 association_mapping.po

📁 hibernate-distribution-3.3.1.GA-dist.zip源码
💻 PO
📖 第 1 页 / 共 2 页
字号:
msgid ""msgstr """Project-Id-Version: PACKAGE VERSION\n""Report-Msgid-Bugs-To: http://bugs.kde.org\n""POT-Creation-Date: 2008-08-14 15:28+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:30#, no-c-formatmsgid "Association Mappings"msgstr "Mapper les associations"#. Tag: title#: association_mapping.xml:33#, no-c-formatmsgid "Introduction"msgstr "Introduction"#. Tag: para#: association_mapping.xml:35#, 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 """Correctement mapper les associations est souvent la tâche la plus difficile. ""Dans cette section nous traiterons les cas classiques les uns après les ""autres. Nous commencerons d'abbord par les mappings unidirectionnels, puis ""nous aborderons la question des mappings bidirectionnels. Nous illustrerons ""tous nos exemples avec les classes <literal>Person</literal> et ""<literal>Address</literal>."#. Tag: para#: association_mapping.xml:43#, no-c-formatmsgid """We'll classify associations by whether or not they map to an intervening ""join table, and by multiplicity."msgstr """Nous utiliserons deux critères pour classer les associations : le premier ""sera de savoir si l'association est bâti sur une table supplémentaire ""d'association et le deuxieme sera basé sur la multiplicité de cette ""association."#. Tag: para#: association_mapping.xml:48#, 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 """Autoriser une clé étrangère nulle est considéré comme un mauvais choix dans ""la construction d'un modèle de données. Nous supposerons donc que dans tous ""les exemples qui vont suivre on aura interdit la valeur nulle pour les clés ""étrangères. Attention, ceci ne veut pas dire que Hibernate ne supporte pas ""les clés étrangères pouvant prendre des valeurs nulles, les exemples qui ""suivent continueront de fonctionner si vous décidiez ne plus imposer la ""contrainte de non-nullité sur les clés étrangères."#. Tag: title#: association_mapping.xml:58#, no-c-formatmsgid "Unidirectional associations"msgstr "Association unidirectionnelle"#. Tag: title#: association_mapping.xml:61 association_mapping.xml:132#, no-c-formatmsgid "many to one"msgstr "plusieurs à un"#. Tag: para#: association_mapping.xml:63#, no-c-formatmsgid """A <emphasis>unidirectional many-to-one association</emphasis> is the most ""common kind of unidirectional association."msgstr """Une <emphasis>association plusieurs-à-un (many-to-one) unidirectionnelle </""emphasis> est le type que l'on rencontre le plus souvent dans les ""associations unidirectionnelles."#. Tag: programlisting#: association_mapping.xml:68#, 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:69 association_mapping.xml:185#, 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:74 association_mapping.xml:145#: association_mapping.xml:209 association_mapping.xml:249#, fuzzy, no-c-formatmsgid "one to one"msgstr """#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n""un à un\n""#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n""un à un\n""#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n""Un à un\n""#-#-#-#-#  - (PACKAGE VERSION)  #-#-#-#-#\n""Un à un"#. Tag: para#: association_mapping.xml:76#, 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 """une <emphasis>association un-à-un (one-to-one) sur une clé étrangère</""emphasis> est presque identique. La seule différence est sur la contrainte ""d'unicité que l'on impose à cette colonne."#. Tag: programlisting#: association_mapping.xml:81#, 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:82 association_mapping.xml:217#, 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:84#, 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 """Une <emphasis>association un-à-un (one-to-one) unidirectionnelle sur une clé ""primaire</emphasis> utilise un générateur d'identifiant particulier. ""(Remarquez que nous avons inversé le sens de cette association dans cet ""exemple.)"#. Tag: programlisting#: association_mapping.xml:90#, 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:91 association_mapping.xml:225#, 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:96 association_mapping.xml:118#, no-c-formatmsgid "one to many"msgstr "un à plusieurs"#. Tag: para#: association_mapping.xml:98#, 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 """Une <emphasis>association un-à-plusieurs (one-to-many) unidirectionnelle sur ""une clé étrangère</emphasis> est vraiment inhabituelle, et n'est pas ""vraiment recommandée."#. Tag: programlisting#: association_mapping.xml:103#, 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:104#, 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:106#, no-c-formatmsgid "We think it's better to use a join table for this kind of association."msgstr """Nous pensons qu'il est préférable d'utiliser une table de jointure pour ce ""type d'association."#. Tag: title#: association_mapping.xml:115#, no-c-formatmsgid "Unidirectional associations with join tables"msgstr "Associations unidirectionnelles avec tables de jointure"#. Tag: para#: association_mapping.xml:120#, 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 """Une <emphasis>association unidirectionnelle un-à-plusieurs (one-to-many) ""avec une table de jointure</emphasis> est un bien meilleur choix. Remarquez ""qu'en spécifiant <literal>unique=\"true\"</literal>, on a changé la ""multiplicité plusieurs-à-plusieurs (many-to-many) pour un-à-plusieurs (one-""to-many)."#. Tag: programlisting#: association_mapping.xml:126#, 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:127#, 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:134#, no-c-formatmsgid """A <emphasis>unidirectional many-to-one association on a join table</""emphasis> is quite common when the association is optional."msgstr """Une <emphasis>assiociation plusieurs-à-un (many-to-one) unidirectionnelle ""sur une table de jointure</emphasis> est très fréquente quand l'association ""est optionnelle."#. Tag: programlisting#: association_mapping.xml:139#, 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:140#, 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:147#, no-c-formatmsgid """A <emphasis>unidirectional one-to-one association on a join table</emphasis> ""is extremely unusual, but possible."msgstr """Une <emphasis>association unidirectionnelle un-à-un (one-to-one) sur une ""table de jointure</emphasis> est extrèmement rare mais envisageable."#. Tag: programlisting#: association_mapping.xml:152#, 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:153 association_mapping.xml:257#, 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:158 association_mapping.xml:262#, no-c-formatmsgid "many to many"msgstr "plusieurs à plusieurs"#. Tag: para#: association_mapping.xml:160#, no-c-formatmsgid """Finally, we have a <emphasis>unidirectional many-to-many association</""emphasis>."msgstr """Finallement, nous avons <emphasis>l'association unidirectionnelle plusieurs-""à-plusieurs (many-to-many)</emphasis>."#. Tag: programlisting#: association_mapping.xml:164#, no-c-formatmsgid """<![CDATA[<class name=\"Person\">\n""    <id name=\"id\" column=\"personId\">\n"

⌨️ 快捷键说明

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