📄 collection_mapping.po
字号:
"literal>) : à choisir entre récupération par jointures externes, ""récupération par selects séquentiels, et récupération par sous-selects ""séquentiels"#. Tag: para#: collection_mapping.xml:168#, no-c-formatmsgid """<literal>batch-size</literal> (optional, defaults to <literal>1</literal>) ""specify a \"batch size\" for lazily fetching instances of this collection."msgstr """<literal>batch-size</literal> (optionnel, par défaut = <literal>1</""literal>) : une taille de batch (batch size) utilisée pour charger plusieurs ""instances de cette collection en initialisation tardive"#. Tag: para#: collection_mapping.xml:174#, no-c-formatmsgid """<literal>access</literal> (optional - defaults to <literal>property</""literal>): The strategy Hibernate should use for accessing the collection ""property value."msgstr """<literal>access</literal> (optionnel - par défaut = <literal>property</""literal>) : La stratégie qu'Hibernate doit utiliser pour accéder à la valeur ""de la propriété"#. Tag: para#: collection_mapping.xml:180#, no-c-formatmsgid """<literal>optimistic-lock</literal> (optional - defaults to <literal>true</""literal>): Species that changes to the state of the collection results in ""increment of the owning entity's version. (For one to many associations, it ""is often reasonable to disable this setting.)"msgstr """<literal>optimistic-lock</literal> (optionnel - par défaut = <literal>true</""literal>) : spécifie que changer l'état de la collection entraîne ""l'incrémentation de la version appartenant à l'entité (Pour une association ""un vers plusieurs, il est souvent raisonnable de désactiver ce paramètre)"#. Tag: para#: collection_mapping.xml:188#, no-c-formatmsgid """<literal>mutable</literal> (optional - defaults to <literal>true</literal>): ""A value of <literal>false</literal> specifies that the elements of the ""collection never change (a minor performance optimization in some cases)."msgstr """<literal>mutable</literal> (optionnel - par défaut = <literal>true</""literal>) : une valeur à <literal>false</literal> spécifie que les éléments ""de la collection ne changent jamais (une optimisation mineure dans certains ""cas)"#. Tag: title#: collection_mapping.xml:198#, no-c-formatmsgid "Collection foreign keys"msgstr "Les clefs étrangères d'une collection"#. Tag: para#: collection_mapping.xml:200#, no-c-formatmsgid """Collection instances are distinguished in the database by the foreign key of ""the entity that owns the collection. This foreign key is referred to as the ""<emphasis>collection key column</emphasis> (or columns) of the collection ""table. The collection key column is mapped by the <literal><key></""literal> element."msgstr """Les instances d'une collection sont distinguées dans la base par la clef ""étrangère de l'entité qui possède la collection. Cette clef étrangère est ""référencée comme la(es) <emphasis>colonne(s) de la clef de la collection</""emphasis> de la table de la collection. La colonne de la clef de la ""collection est mappée par l'élément <literal><key></literal>."#. Tag: para#: collection_mapping.xml:208#, no-c-formatmsgid """There may be a nullability constraint on the foreign key column. For most ""collections, this is implied. For unidirectional one to many associations, ""the foreign key column is nullable by default, so you might need to specify ""<literal>not-null=\"true\"</literal>."msgstr """Il peut y avoir une contrainte de nullité sur la colonne de la clef ""étrangère. Pour les associations unidirectionnelles un vers plusieurs, la ""colonne de la clef étrangère peut être nulle par défaut, donc vous pourriez ""avoir besoin de spécifier <literal>not-null=\"true\"</literal>."#. Tag: programlisting#: collection_mapping.xml:215#, no-c-formatmsgid "<![CDATA[<key column=\"productSerialNumber\" not-null=\"true\"/>]]>"msgstr ""#. Tag: para#: collection_mapping.xml:217#, no-c-formatmsgid """The foreign key constraint may use <literal>ON DELETE CASCADE</literal>."msgstr """La contraite de la clef étrangère peut utiliser <literal>ON DELETE CASCADE</""literal>."#. Tag: programlisting#: collection_mapping.xml:221#, no-c-formatmsgid "<![CDATA[<key column=\"productSerialNumber\" on-delete=\"cascade\"/>]]>"msgstr ""#. Tag: para#: collection_mapping.xml:223#, no-c-formatmsgid """See the previous chapter for a full definition of the <literal><key></""literal> element."msgstr """Voir le chapitre précédent pour une définition complète de l'élément ""<literal><key></literal>."#. Tag: title#: collection_mapping.xml:231#, no-c-formatmsgid "Collection elements"msgstr "Les éléments d'une collection"#. Tag: para#: collection_mapping.xml:233#, no-c-formatmsgid """Collections may contain almost any other Hibernate type, including all basic ""types, custom types, components, and of course, references to other ""entities. This is an important distinction: an object in a collection might ""be handled with \"value\" semantics (its life cycle fully depends on the ""collection owner) or it might be a reference to another entity, with its own ""life cycle. In the latter case, only the \"link\" between the two objects is ""considered to be state held by the collection."msgstr """Les collections peuvent contenir la plupart des autres types Hibernate, dont ""tous les types basiques, les types utilisateur, les composants, et bien sûr, ""les références vers d'autres entités. C'est une distinction importante : un ""objet dans une collection pourrait être géré avec une sémantique de \"valeur""\" (sa durée de vie dépend complètement du propriétaire de la collection) ou ""il pourrait avoir une référence vers une autre entité, avec sa propre durée ""de vie. Dans le dernier cas, seul le \"lien\" entre les 2 objets est ""considéré être l'état retenu par la collection."#. Tag: para#: collection_mapping.xml:242#, no-c-formatmsgid """The contained type is referred to as the <emphasis>collection element type</""emphasis>. Collection elements are mapped by <literal><element></""literal> or <literal><composite-element></literal>, or in the case of ""entity references, with <literal><one-to-many></literal> or ""<literal><many-to-many></literal>. The first two map elements with ""value semantics, the next two are used to map entity associations."msgstr """Le type contenu est référencé comme le <emphasis>type de l'élément de la ""collection</emphasis>. Les éléments de la collections sont mappés par ""<literal><element></literal> ou <literal><composite-element></""literal>, ou dans le cas des références d'entité, avec <literal><one-to-""many></literal> ou <literal><many-to-many></literal>. Les deux ""premiers mappent des éléments avec un sémantique de valeur, les deux ""suivants sont utilisés pour mapper des associations d'entité."#. Tag: title#: collection_mapping.xml:254#, no-c-formatmsgid "Indexed collections"msgstr "Collections indexées"#. Tag: para#: collection_mapping.xml:256#, no-c-formatmsgid """All collection mappings, except those with set and bag semantics, need an ""<emphasis>index column</emphasis> in the collection table - a column that ""maps to an array index, or <literal>List</literal> index, or <literal>Map</""literal> key. The index of a <literal>Map</literal> may be of any basic ""type, mapped with <literal><map-key></literal>, it may be an entity ""reference mapped with <literal><map-key-many-to-many></literal>, or it ""may be a composite type, mapped with <literal><composite-map-key></""literal>. The index of an array or list is always of type <literal>integer</""literal> and is mapped using the <literal><list-index></literal> ""element. The mapped column contains sequential integers (numbered from zero, ""by default)."msgstr """Tous les mappings de collection, exceptés ceux avec les sémantiques ""d'ensemble (NdT : set) et de sac (NdT : bag), ont besoin d'une ""<emphasis>colonne d'index</emphasis> dans la table de la collection - une ""colonne qui mappe un index de tableau, ou un index de <literal>List</""literal>, ou une clef de <literal>Map</literal>. L'index d'une <literal>Map</""literal> peut être n'importe quel type basique, mappé avec <literal><map-""key></literal>, ça peut être une référence d'entité mappée avec ""<literal><map-key-many-to-many></literal>, ou ça peut être un type ""composé, mappé avec <literal><composite-map-key></literal>. L'index ""d'un tableau ou d'une liste est toujours de type <literal>integer</literal> ""et est mappé en utilisant l'élément <literal><list-index></literal>. ""Les colonnes mappées contiennent des entiers séquentiels (numérotés à partir ""de zéro par défaut)."#. Tag: sect2#: collection_mapping.xml:267#, no-c-formatmsgid """<programlistingco> <areaspec> <area id=\"index1\" coords=\"2 45\"/> <area id=""\"index2\" coords=\"3 45\"/> </areaspec> <programlisting><![CDATA[<list-""index \n"" column=\"column_name\"\n"" base=\"0|1|...\"/>]]></programlisting> <calloutlist> <callout ""arearefs=\"index1\"> <para> <literal>column_name</literal> (required): The ""name of the column holding the collection index values. </para> </callout> ""<callout arearefs=\"index1\"> <para> <literal>base</literal> (optional, ""defaults to <literal>0</literal>): The value of the index column that ""corresponds to the first element of the list or array. </para> </callout> </""calloutlist> </programlistingco> <programlistingco> <areaspec> <area id=""\"mapkey1\" coords=\"2 45\"/> <area id=\"mapkey2\" coords=\"3 45\"/> <area ""id=\"mapkey3\" coords=\"4 45\"/> </areaspec> <programlisting><![CDATA[<map-""key \n"" column=\"column_name\"\n"" formula=\"any SQL expression\"\n"" type=\"type_name\"\n"" node=\"@attribute-name\"\n"" length=\"N\"/>]]></programlisting> <calloutlist> <callout arearefs=""\"mapkey1\"> <para> <literal>column</literal> (optional): The name of the ""column holding the collection index values. </para> </callout> <callout ""arearefs=\"mapkey2\"> <para> <literal>formula</literal> (optional): A SQL ""formula used to evaluate the key of the map. </para> </callout> <callout ""arearefs=\"mapkey3\"> <para> <literal>type</literal> (reguired): The type of ""the map keys. </para> </callout> </calloutlist> </programlistingco> ""<programlistingco> <areaspec> <area id=\"indexmanytomany1\" coords=\"2 45\"/""> <area id=\"indexmanytomany2\" coords=\"3 45\"/> <area id=\"indexmanytomany3""\" coords=\"3 45\"/> </areaspec> <programlisting><![CDATA[<map-key-many-to-""many\n"" column=\"column_name\"\n"" formula=\"any SQL expression\"\n"" class=\"ClassName\"\n""/>]]></programlisting> <calloutlist> <callout arearefs=\"indexmanytomany1\"> ""<para> <literal>column</literal> (optional): The name of the foreign key ""column for the collection index values. </para> </callout> <callout arearefs=""\"indexmanytomany2\"> <para> <literal>formula</literal> (optional): A SQL ""formula used to evaluate the foreign key of the map key. </para> </callout> ""<callout arearefs=\"indexmanytomany3\"> <para> <literal>class</literal> ""(required): The entity class used as the map key. </para> </callout> </""calloutlist> </programlistingco>"msgstr ""#. Tag: para#: collection_mapping.xml:348#, no-c-formatmsgid """If your table doesn't have an index column, and you still wish to use ""<literal>List</literal> as the property type, you should map the property as ""a Hibernate <emphasis><bag></emphasis>. A bag does not retain its ""order when it is retrieved from the database, but it may be optionally ""sorted or ordered."msgstr """Si votre table n'a pas de colonne d'index, et que vous souhaitez tout de ""même utiliser <literal>List</literal> comme type de propriété, vous devriez ""mapper la propriété comme un <emphasis><bag></emphasis> Hibernate. Un ""sac (NdT : bag) ne garde pas son ordre quand il est récupéré de la base de ""données, mais il peut être optionnellement trié ou ordonné."#. Tag: para#: collection_mapping.xml:357#, no-c-formatmsgid """There are quite a range of mappings that can be generated for collections, ""covering many common relational models. We suggest you experiment with the ""schema generation tool to get a feeling for how various mapping declarations ""translate to database tables."msgstr """Il y a pas mal de variétés de mappings qui peuvent être générés pour les ""collections, couvrant beaucoup des modèles relationnels communs. Nous vous ""suggérons d'expérimenter avec l'outil de génération de schéma pour avoir une ""idée de comment traduire les différentes déclarations de mapping vers des ""table de la base de données."#. Tag: title#: collection_mapping.xml:364#, no-c-formatmsgid "Collections of values and many-to-many associations"msgstr "Collections de valeurs et associations plusieurs-vers-plusieurs"#. Tag: para#: collection_mapping.xml:366#, no-c-formatmsgid """Any collection of values or many-to-many association requires a dedicated ""<emphasis>collection table</emphasis> with a foreign key column or columns, ""<emphasis>collection element column</emphasis> or columns and possibly an ""index column or columns."msgstr """N'importe quelle collection de valeurs ou association plusieurs-vers-""plusieurs requiert une <emphasis>table de collection</emphasis> avec une""(des) colonne(s) de clef étrangère, une(des) <emphasis>colonne(s) d'élément ""de la collection</emphasis> ou des colonnes et possiblement une(des) colonne""(s) d'index."#. Tag: para#: collection_mapping.xml:373#, no-c-formatmsgid """For a collection of values, we use the <literal><element></literal> ""tag."msgstr """Pour une collection de valeurs, nous utilisons la balise <literal><""element></literal>."#. Tag: sect2#: collection_mapping.xml:375#, no-c-formatmsgid """<programlistingco> <areaspec> <area id=\"element1b\" coords=\"2 50\"/> <area ""id=\"element2b\" coords=\"3 50\"/> <area id=\"element3b\" coords=\"4 50\"/> ""</areaspec> <programlisting><![CDATA[<element\n"" column=\"column_name\"\n"" formula=\"any SQL expression\"\n"" type=\"typename\"\n"" length=\"L\"\n"" precision=\"P\"\n"" scale=\"S\"\n"" not-null=\"true|false\"\n"" unique=\"true|false\"\n"" node=\"element-name\"\n""/>]]></programlisting> <calloutlist> <callout arearefs=\"element1b\"> <para> ""<literal>column</literal> (optional): The name of the column holding the ""collection element values. </para> </callout> <callout arearefs=\"element2b""\"> <para> <literal>formula</literal> (optional): An SQL formula used to ""evaluate the element. </para> </callout> <callout arearefs=\"element3b\"> ""<para> <literal>type</literal> (required): The type of the collection ""element. </para> </callout> </calloutlist> </programlistingco> <para> A ""<emphasis>many-to-many association</emphasis> is specified using the ""<literal><many-to-many></literal> element. </para> <programlistingco> ""<areaspec> <area id=\"manytomany1\" coords=\"2 60\"/> <area id=\"manytomany2""\" coords=\"3 60\"/> <area id=\"manytomany3\" coords=\"4 60\"/> <area id=""\"manytomany4\" coords=\"5 60\"/> <area id=\"manytomany5\" coords=\"6 60\"/> ""<area id=\"manytomany6\" coords=\"7 60\"/> <area id=\"manytomany7\" coords=""\"8 60\"/> <area id=\"manytomany8\" coords=\"9 60\"/> </areaspec> ""<programlisting><![CDATA[<many-to-many\n"
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -