|
Hibernate example source code file (association_mapping.po)
This example Hibernate source code file (association_mapping.po) is included in the DevDaily.com
"Java Source Code
Warehouse" project. The intent of this project is to help you "Learn Java by Example" TM.
The Hibernate association_mapping.po source code
# translation of association_mapping.po to French
# Myriam Malga <mmalga@redhat.com>, 2007.
# Xi HUANG <xhuang@redhat.com>, 2007.
# Corina Roe <croe@redhat.com>, 2009.
# translation of Collection_Mapping.po to
msgid ""
msgstr ""
"Project-Id-Version: association_mapping\n"
"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
"POT-Creation-Date: 2010-02-10T07:25:34\n"
"PO-Revision-Date: 2009-11-10 14:49+1000\n"
"Last-Translator: Corina Roe <croe@redhat.com>\n"
"Language-Team: French <i18@redhat.com>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: KBabel 1.11.4\n"
#. Tag: title
#, no-c-format
msgid "Association Mappings"
msgstr "Mapper les associations"
#. Tag: title
#, no-c-format
msgid "Introduction"
msgstr "Introduction"
#. Tag: para
#, no-c-format
msgid ""
"Association mappings are often the most difficult thing to implement "
"correctly. In this section we examine some canonical cases one by one, "
"starting with unidirectional mappings and then bidirectional cases. We will "
"use <literal>Person and Address in all the "
"examples."
msgstr ""
"Mapper les associations correctement, est souvent la tâche la plus "
"difficile. Dans cette section, nous traiterons les cas classiques, un par "
"un, en commençant par les mappages unidirectionnels, puis nous aborderons la "
"question des mappages bidirectionnels. Nous illustrons tous nos exemples "
"avec les classes <literal>Person et Address."
#. Tag: para
#, no-c-format
msgid ""
"Associations will be classified by multiplicity and whether or not they map "
"to an intervening join table."
msgstr ""
"Nous classifions les associations selon qu'elles sont ou non bâties sur une "
"table de jointure supplémentaire et sur la multiplicité. "
#. Tag: para
#, no-c-format
msgid ""
"Nullable foreign keys are not considered to be good practice in traditional "
"data modelling, so our examples do not use nullable foreign keys. This is "
"not a requirement of Hibernate, and the mappings will 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, et 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
#, no-c-format
msgid "Unidirectional associations"
msgstr "Associations unidirectionnelles"
#. Tag: title
#, no-c-format
msgid "Many-to-one"
msgstr "plusieurs-à-un "
#. Tag: para
#, no-c-format
msgid ""
"A <emphasis>unidirectional many-to-one association is the most "
"common kind of unidirectional association."
msgstr ""
"Une <emphasis>association plusieurs-à-un unidirectionnelle est "
"le type que l'on rencontre le plus souvent dans les associations "
"unidirectionnelles."
#. Tag: title
#, no-c-format
msgid "One-to-one"
msgstr "Un-à-un"
#. Tag: para
#, no-c-format
msgid ""
"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 sur une clé étrangère est "
"presque identique. La seule différence est sur la contrainte d'unicité que "
"l'on impose à cette colonne."
#. Tag: para
#, no-c-format
msgid ""
"A <emphasis>unidirectional one-to-one association on a primary key"
"emphasis> usually uses a special id generator In this example, however, we "
"have reversed the direction of the association:"
msgstr ""
"Une <emphasis>association un-à-un 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: title
#, no-c-format
msgid "One-to-many"
msgstr "un-à-plusieurs"
#. Tag: para
#, no-c-format
msgid ""
"A <emphasis>unidirectional one-to-many association on a foreign key"
"emphasis> is an unusual case, and is not recommended."
msgstr ""
"Une <emphasis>association un-à-plusieurs unidirectionnelle sur une clé "
"étrangère</emphasis> est un cas inhabituel, et n'est pas vraiment "
"recommandée."
#. Tag: para
#, no-c-format
msgid "You should instead 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
#, no-c-format
msgid "Unidirectional associations with join tables"
msgstr "Associations unidirectionnelles avec tables de jointure"
#. Tag: para
#, no-c-format
msgid ""
"A <emphasis>unidirectional one-to-many association on a join table"
"emphasis> is the preferred option. Specifying <literal>unique=\"true\""
"literal>, changes the multiplicity from many-to-many to one-to-many."
msgstr ""
"Une <emphasis>association unidirectionnelle un-à-plusieurs avec une table de "
"jointure</emphasis> est un bien meilleur choix. Remarquez qu'en spécifiant "
"<literal>unique=\"true\", on a changé la multiplicité plusieurs-à-"
"plusieurs pour un-à-plusieurs. "
#. Tag: para
#, no-c-format
msgid ""
"A <emphasis>unidirectional many-to-one association on a join table"
"emphasis> is common when the association is optional. For example:"
msgstr ""
"Une <emphasis>assiociation plusieurs-à-un unidirectionnelle sur une table de "
"jointure</emphasis> est assez fréquente quand l'association est optionnelle. "
"Par exemple :"
#. Tag: para
#, no-c-format
msgid ""
"A <emphasis>unidirectional one-to-one association on a join table "
"is possible, but extremely unusual."
msgstr ""
"Une <emphasis>association unidirectionnelle un-à-un sur une table de "
"jointure</emphasis> est extrêmement rare mais envisageable. "
#. Tag: title
#, no-c-format
msgid "Many-to-many"
msgstr "Plusieurs-à-plusieurs "
#. Tag: para
#, no-c-format
msgid ""
"Finally, here is an example of a <emphasis>unidirectional many-to-many "
"association</emphasis>."
msgstr ""
"Finalement, nous avons un exemple d' <emphasis>association unidirectionnelle "
"plusieurs-à-plusieurs</emphasis>."
#. Tag: title
#, no-c-format
msgid "Bidirectional associations"
msgstr "Associations bidirectionnelles "
#. Tag: title
#, no-c-format
msgid "one-to-many / many-to-one"
msgstr "un-à-plusieurs / plusieurs-à-un "
#. Tag: para
#, no-c-format
msgid ""
"A <emphasis>bidirectional many-to-one association is the most "
"common kind of association. The following example illustrates the standard "
"parent/child relationship."
msgstr ""
"Une <emphasis>association bidirectionnelle plusieurs-à-un est le "
"type d'association que l'on rencontre le plus fréquemment. L'exemple suivant "
"illustre la façon standard de créer des relations parents/enfants."
#. Tag: para
#, no-c-format
msgid ""
"If you use a <literal>List, or other indexed collection, set the "
"<literal>key column of the foreign key to not null"
"literal>. Hibernate will manage the association from the collections side to "
"maintain the index of each element, making the other side virtually inverse "
"by setting <literal>update=\"false\" and insert=\"false"
"\"</literal>:"
msgstr ""
"Si vous utilisez une <literal>List, ou toute autre collection "
"indexée, vous devez paramétrer la colonne <literal>key de la clé "
"étrangère à <literal>not null, et laisser Hibernate gérer "
"l'association depuis l'extrémité collection pour maintenir l'index de chaque "
"élément (rendant l'autre extrémité virtuellement inverse en paramétrant "
"<literal>update=\"false\" et insert=\"false\") :"
#. Tag: para
#, no-c-format
msgid ""
"If the underlying foreign key column is <literal>NOT NULL, it is "
"important that you define <literal>not-null=\"true\" on the "
"<literal><key> element of the collection mapping. Do not "
"only declare <literal>not-null=\"true\" on a possible nested "
"<literal><column> element, but on the <key>"
"literal> element."
msgstr ""
"Il est important de définir <literal>not-null=\"true sur l'élément "
"<literal><key> du mapping de la collection si la colonne de "
"clé étrangère sous-jacente est <literal>NOT NULL. Ne déclarez pas "
"seulement <literal>not-null=\"true\" sur un élément imbriqué "
"possible<literal><column>, mais sur l'élément <"
"key></literal>."
#. Tag: para
#, no-c-format
msgid ""
"A <emphasis>bidirectional one-to-one association on a foreign key "
"is common:"
msgstr ""
"Une <emphasis>association bidirectionnelle un-à-un sur une clé étrangère"
"emphasis> est assez fréquente :"
#. Tag: para
#, no-c-format
msgid ""
"A <emphasis>bidirectional one-to-one association on a primary key "
"uses the special id generator:"
msgstr ""
"Une <emphasis>association bidirectionnelle un-à-un sur une clé primaire"
"emphasis> utilise un générateur particulier d'id :"
#. Tag: title
#, no-c-format
msgid "Bidirectional associations with join tables"
msgstr "Associations bidirectionnelles avec tables de jointure"
#. Tag: para
#, no-c-format
msgid ""
"The following is an example of a <emphasis>bidirectional one-to-many "
"association on a join table</emphasis>. The inverse=\"true\""
"literal> can go on either end of the association, on the collection, or on "
"the join."
msgstr ""
"Une <emphasis>association bidirectionnelle un-à-plusieurs sur une table de "
"jointure</emphasis>. Remarquez que inverse=\"true\" peut "
"s'appliquer sur les deux extrémités de l'association, sur la collection, ou "
"sur la jointure."
#. Tag: title
#, no-c-format
msgid "one to one"
msgstr "un-à-un"
#. Tag: para
#, no-c-format
msgid ""
"A <emphasis>bidirectional one-to-one association on a join table "
"is possible, but extremely unusual."
msgstr ""
"Une <emphasis>association bidirectionnelle un-à-un sur une table de "
"jointure</emphasis> est extrêmement rare mais envisageable. "
#. Tag: para
#, no-c-format
msgid ""
"Here is an example of a <emphasis>bidirectional many-to-many association"
"emphasis>."
msgstr ""
"Finalement nous avons <emphasis>l'association bidirectionnelle plusieurs-à-"
"plusieurs</emphasis>. "
#. Tag: title
#, no-c-format
msgid "More complex association mappings"
msgstr "Des mappages d'associations plus complexes"
#. Tag: para
#, no-c-format
msgid ""
"More complex association joins are <emphasis>extremely rare. "
"Hibernate handles more complex situations by using SQL fragments embedded in "
"the mapping document. For example, if a table with historical account "
"information data defines <literal>accountNumber, "
"<literal>effectiveEndDate and effectiveStartDate"
"literal>columns, it would be mapped as follows:"
msgstr ""
"Des associations encore plus complexes sont <emphasis>extrêmement "
"rares. Hibernate permet de gérer des situations plus complexes en utilisant "
"des extraits SQL embarqués dans le fichier de mapping. Par exemple, si une "
"table avec des informations historiques sur un compte définit les colonnes "
"<literal>accountNumber, effectiveEndDate et "
"<literal>effectiveStartDate, elle sera mappée de la façon "
"suivante : "
#. Tag: para
#, no-c-format
msgid ""
"You can then map an association to the <emphasis>current "
"instance, the one with null <literal>effectiveEndDate, by using:"
msgstr ""
"Nous pouvons mapper une association à l'instance <emphasis>courante"
"emphasis>, celle avec une <literal>effectiveEndDate nulle, en "
"utilisant :"
#. Tag: para
#, no-c-format
msgid ""
"In a more complex example, imagine that the association between "
"<literal>Employee and Organization is "
"maintained in an <literal>Employment table full of historical "
"employment data. An association to the employee's <emphasis>most recent"
"emphasis> employer, the one with the most recent <literal>startDate"
"literal>, could be mapped in the following way:"
msgstr ""
"Dans un exemple plus complexe, imaginez qu'une association entre "
"<literal>Employee et Organization soit gérée "
"dans une table <literal>Employment pleine de données historiques. "
"Dans ce cas, une association vers l'employeur <emphasis>le plus récent"
"emphasis> (celui avec la <literal>startDate (date de commencement "
"de travail la plus récente) pourrait être mappée comme suit :"
#. Tag: para
#, no-c-format
msgid ""
"This functionality allows a degree of creativity and flexibility, but it is "
"more practical to handle these kinds of cases using HQL or a criteria query."
msgstr ""
"Vous pouvez être créatif grâce à ces possibilités, mais il est généralement "
"plus pratique de gérer ce genre de cas en utilisant des requêtes HQL ou par "
"critère."
#~ msgid ""
#~ "<![CDATA["
#~ msgstr ""
#~ "<![CDATA["
#~ msgid ""
#~ "<![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 ""
#~ "<![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"
#~ " ]]>"
#~ msgid ""
#~ "<![CDATA["
#~ msgstr ""
#~ "<![CDATA["
#~ msgid ""
#~ "<![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 ""
#~ "<![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"
#~ " ]]>"
#~ msgid ""
#~ "<![CDATA[\n"
#~ " </generator>\n"
#~ " </id>\n"
#~ " <one-to-one name=\"person\" constrained=\"true\"/>\n"
#~ "</class>]]>"
#~ msgstr ""
#~ "<![CDATA[\n"
#~ " </generator>\n"
#~ " </id>\n"
#~ " <one-to-one name=\"person\" constrained=\"true\"/>\n"
#~ "</class>]]>"
#~ msgid ""
#~ "<![CDATA[\n"
#~ "create table Person ( personId bigint not null primary key )\n"
#~ "create table Address ( personId bigint not null primary key )\n"
#~ " ]]>"
#~ msgstr ""
#~ "<![CDATA[\n"
#~ "create table Person ( personId bigint not null primary key )\n"
#~ "create table Address ( personId bigint not null primary key )\n"
#~ " ]]>"
#~ msgid ""
#~ "<![CDATA["
#~ msgstr ""
#~ "<![CDATA["
#~ msgid ""
#~ "<![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 ""
#~ "<![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"
#~ " ]]>"
#~ msgid ""
#~ "<![CDATA["
#~ msgstr ""
#~ "<![CDATA["
#~ msgid ""
#~ "<![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 ""
#~ "<![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"
#~ " ]]>"
#~ msgid ""
#~ "<![CDATA["
#~ msgstr ""
#~ "<![CDATA["
#~ msgid ""
#~ "<![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 ""
#~ "<![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"
#~ " ]]>"
#~ msgid ""
#~ "<![CDATA["
#~ msgstr ""
#~ "<![CDATA["
#~ msgid ""
#~ "<![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 ""
#~ "<![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"
#~ " ]]>"
#~ msgid ""
#~ "<![CDATA["
#~ msgstr ""
#~ "<![CDATA["
#~ msgid ""
#~ "<![CDATA[\n"
#~ "create table Person ( personId bigint not null primary key )\n"
#~ "create table PersonAddress ( personId bigint not null, addressId bigint "
#~ "not null, primary key (personId, addressId) )\n"
#~ "create table Address ( addressId bigint not null primary key )\n"
#~ " ]]>"
#~ msgstr ""
#~ "<![CDATA[\n"
#~ "create table Person ( personId bigint not null primary key )\n"
#~ "create table PersonAddress ( personId bigint not null, addressId bigint "
#~ "not null, primary key (personId, addressId) )\n"
#~ "create table Address ( addressId bigint not null primary key )\n"
#~ " ]]>"
#~ msgid ""
#~ "<![CDATA["
#~ msgstr ""
#~ "<![CDATA["
#~ msgid ""
#~ "<![CDATA["
#~ msgstr ""
#~ "<![CDATA["
#~ msgid ""
#~ "<![CDATA["
#~ msgstr ""
#~ "<![CDATA["
#~ msgid ""
#~ "<![CDATA[\n"
#~ " </generator>\n"
#~ " </id>\n"
#~ " <one-to-one name=\"person\" \n"
#~ " constrained=\"true\"/>\n"
#~ "</class>]]>"
#~ msgstr ""
#~ "<![CDATA[\n"
#~ " </generator>\n"
#~ " </id>\n"
#~ " <one-to-one name=\"person\" \n"
#~ " constrained=\"true\"/>\n"
#~ "</class>]]>"
#~ msgid ""
#~ "<![CDATA["
#~ msgstr ""
#~ "<![CDATA["
#~ msgid ""
#~ "<![CDATA[\n"
#~ "create table Person ( personId bigint not null primary key )\n"
#~ "create table PersonAddress ( personId bigint not null, addressId bigint "
#~ "not null primary key )\n"
#~ "create table Address ( addressId bigint not null primary key )\n"
#~ " ]]>"
#~ msgstr ""
#~ "<![CDATA[\n"
#~ "create table Person ( personId bigint not null primary key )\n"
#~ "create table PersonAddress ( personId bigint not null, addressId bigint "
#~ "not null primary key )\n"
#~ "create table Address ( addressId bigint not null primary key )\n"
#~ " ]]>"
#~ msgid ""
#~ "<![CDATA["
#~ msgstr ""
#~ "<![CDATA["
#~ msgid ""
#~ "<![CDATA["
#~ msgstr ""
#~ "<![CDATA["
#~ msgid ""
#~ "<![CDATA["
#~ msgstr ""
#~ "<![CDATA["
#~ msgid ""
#~ "<![CDATA[\n"
#~ "</many-to-one>]]>"
#~ msgstr ""
#~ "<![CDATA[\n"
#~ "</many-to-one>]]>"
#~ msgid ""
#~ "<![CDATA["
#~ msgstr ""
#~ "<![CDATA["
Other Hibernate examples (source code examples)
Here is a short list of links related to this Hibernate association_mapping.po source code file:
|