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

📄 collection_mapping.po

📁 hibernate 开源框架的代码 jar包希望大家能喜欢
💻 PO
📖 第 1 页 / 共 5 页
字号:
msgid """<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>&lt;many-to-many&gt;</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""        column=\"column_name\"\n""        formula=\"any SQL expression\"\n""        class=\"ClassName\"\n""        fetch=\"select|join\"\n""        unique=\"true|false\"\n""        not-found=\"ignore|exception\"\n""        entity-name=\"EntityName\"\n""        property-ref=\"propertyNameFromAssociatedClass\"\n""        node=\"element-name\"\n""        embed-xml=\"true|false\"\n""    />]]></programlisting> <calloutlist> <callout arearefs=\"manytomany1\"> ""<para> <literal>column</literal> (optional): The name of the element foreign ""key column. </para> </callout> <callout arearefs=\"manytomany2\"> <para> ""<literal>formula</literal> (optional): An SQL formula used to evaluate the ""element foreign key value. </para> </callout> <callout arearefs=\"manytomany3""\"> <para> <literal>class</literal> (required): The name of the associated ""class. </para> </callout> <callout arearefs=\"manytomany4\"> <para> ""<literal>fetch</literal> (optional - defaults to <literal>join</literal>): ""enables outer-join or sequential select fetching for this association. This ""is a special case; for full eager fetching (in a single <literal>SELECT</""literal>) of an entity and its many-to-many relationships to other entities, ""you would enable <literal>join</literal> fetching not only of the collection ""itself, but also with this attribute on the <literal>&lt;many-to-many&gt;</""literal> nested element. </para> </callout> <callout arearefs=\"manytomany5""\"> <para> <literal>unique</literal> (optional): Enable the DDL generation ""of a unique constraint for the foreign-key column. This makes the ""association multiplicity effectively one to many. </para> </callout> ""<callout arearefs=\"manytomany6\"> <para> <literal>not-found</literal> ""(optional - defaults to <literal>exception</literal>): Specifies how foreign ""keys that reference missing rows will be handled: <literal>ignore</literal> ""will treat a missing row as a null association. </para> </callout> <callout ""arearefs=\"manytomany7\"> <para> <literal>entity-name</literal> (optional): ""The entity name of the associated class, as an alternative to ""<literal>class</literal>. </para> </callout> <callout arearefs=\"manytomany8""\"> <para> <literal>property-ref</literal>: (optional) The name of a ""property of the associated class that is joined to this foreign key. If not ""specified, the primary key of the associated class is used. </para> </""callout> </calloutlist> </programlistingco>"msgstr ""#. Tag: para#: collection_mapping.xml:480#, no-c-formatmsgid "Some examples, first, a set of strings:"msgstr "以下にいくつか例を示します。 まずはStringのsetに関しての例です。"#. Tag: programlisting#: collection_mapping.xml:484#, no-c-formatmsgid """<![CDATA[<set name=\"names\" table=\"person_names\">\n""    <key column=\"person_id\"/>\n""    <element column=\"person_name\" type=\"string\"/>\n""</set>]]>"msgstr ""#. Tag: para#: collection_mapping.xml:486#, no-c-formatmsgid """A bag containing integers (with an iteration order determined by the ""<literal>order-by</literal> attribute):"msgstr """整数値を含むbag(bagは <literal>order-by</literal> 属性によって反復順序が定義""されています)"#. Tag: programlisting#: collection_mapping.xml:491#, no-c-formatmsgid """<![CDATA[<bag name=\"sizes\" \n""        table=\"item_sizes\" \n""        order-by=\"size asc\">\n""    <key column=\"item_id\"/>\n""    <element column=\"size\" type=\"integer\"/>\n""</bag>]]>"msgstr ""#. Tag: para#: collection_mapping.xml:493#, no-c-formatmsgid "An array of entities - in this case, a many to many association:"msgstr "エンティティの配列 - この場合、多対多の関連です。"#. Tag: programlisting#: collection_mapping.xml:497#, no-c-formatmsgid """<![CDATA[<array name=\"addresses\" \n""        table=\"PersonAddress\" \n""        cascade=\"persist\">\n""    <key column=\"personId\"/>\n""    <list-index column=\"sortOrder\"/>\n""    <many-to-many column=\"addressId\" class=\"Address\"/>\n""</array>]]>"msgstr ""#. Tag: para#: collection_mapping.xml:499#, no-c-formatmsgid "A map from string indices to dates:"msgstr "文字列と日付のmap"#. Tag: programlisting#: collection_mapping.xml:503#, no-c-formatmsgid """<![CDATA[<map name=\"holidays\" \n""        table=\"holidays\" \n""        schema=\"dbo\" \n""        order-by=\"hol_name asc\">\n""    <key column=\"id\"/>\n""    <map-key column=\"hol_name\" type=\"string\"/>\n""    <element column=\"hol_date\" type=\"date\"/>\n""</map>]]>"msgstr ""#. Tag: para#: collection_mapping.xml:505#, no-c-formatmsgid "A list of components (discussed in the next chapter):"msgstr "コンポーネントのlist(次の章で詳しく説明します)"#. Tag: programlisting#: collection_mapping.xml:509#, no-c-formatmsgid """<![CDATA[<list name=\"carComponents\" \n""        table=\"CarComponents\">\n""    <key column=\"carId\"/>\n""    <list-index column=\"sortOrder\"/>\n""    <composite-element class=\"CarComponent\">\n""        <property name=\"price\"/>\n""        <property name=\"type\"/>\n""        <property name=\"serialNumber\" column=\"serialNum\"/>\n""    </composite-element>\n""</list>]]>"msgstr ""#. Tag: title#: collection_mapping.xml:514#, no-c-formatmsgid "One-to-many associations"msgstr "一対多関連"#. Tag: para#: collection_mapping.xml:516#, no-c-formatmsgid """A <emphasis>one to many association</emphasis> links the tables of two ""classes via a foreign key, with no intervening collection table. This ""mapping loses certain semantics of normal Java collections:"msgstr """<emphasis>一対多関連</emphasis> は、コレクション・テーブルを介さず、 外部キー""により2つのクラスのテーブルを関連付けます。 このマッピングは標準的なJavaのコ""レクションのセマンティクスをいくつか失います。"#. Tag: para#: collection_mapping.xml:524#, no-c-formatmsgid """An instance of the contained entity class may not belong to more than one ""instance of the collection"msgstr """エンティティクラスのインスタンスは、 2つ以上のコレクションのインスタンスに属""してはいけません。"#. Tag: para#: collection_mapping.xml:530#, no-c-formatmsgid """An instance of the contained entity class may not appear at more than one ""value of the collection index"msgstr """コレクションに含まれるエンティティクラスのインスタンスは、 コレクションイン""デックスの値として2度以上現れてはいけません。"#. Tag: para#: collection_mapping.xml:537#, no-c-formatmsgid """An association from <literal>Product</literal> to <literal>Part</literal> ""requires existence of a foreign key column and possibly an index column to ""the <literal>Part</literal> table. A <literal>&lt;one-to-many&gt;</literal> ""tag indicates that this is a one to many association."msgstr """<literal>Product</literal> から <literal>Part</literal> への関連は、 ""<literal>Part</literal> テーブルへの外部キーカラムと、場合によってはインデッ""クスカラムが必要です。 <literal>&lt;one-to-many&gt;</literal> タグは、これが""一対多関連であることを表しています。"#. Tag: programlisting#: collection_mapping.xml:550#, no-c-formatmsgid """<![CDATA[<one-to-many \n""        class=\"ClassName\"\n""        not-found=\"ignore|exception\"\n""        entity-name=\"EntityName\"\n""        node=\"element-name\"\n""        embed-xml=\"true|false\"\n""    />]]>"msgstr ""#. Tag: para#: collection_mapping.xml:553#, no-c-formatmsgid "<literal>class</literal> (required): The name of the associated class."msgstr "<literal>class</literal> (必須): 関連クラスの名前。"#. Tag: para#: collection_mapping.xml:558#, no-c-formatmsgid """<literal>not-found</literal> (optional - defaults to <literal>exception</""literal>): Specifies how cached identifiers that reference missing rows will ""be handled: <literal>ignore</literal> will treat a missing row as a null ""association."msgstr """<literal>not-found</literal> (オプション - デフォルトは <literal>exception</""literal>): 参照先の行がないキャッシュされた識別子をどのように扱うかを指定し""ます。 <literal>ignore</literal> を指定すると、行がないことを関連がないものと""して扱います。"#. Tag: para#: collection_mapping.xml:565#, no-c-formatmsgid """<literal>entity-name</literal> (optional): The entity name of the associated ""class, as an alternative to <literal>class</literal>."msgstr """<literal>entity-name</literal> (オプション): <literal>class</literal> の代""替である関連クラスのエンティティ名。 <literal>class</literal> の代わりに指定""する、関連クラスのエンティティ名。"#. Tag: para#: collection_mapping.xml:573#, no-c-formatmsgid """Notice that the <literal>&lt;one-to-many&gt;</literal> element does not need ""to declare any columns. Nor is it necessary to specify the <literal>table</""literal> name anywhere."msgstr """<literal>&lt;one-to-many&gt;</literal> 要素はカラムを宣言する必要がないことに""注意してください。 同様に <literal>テーブル</literal> 名を指定する必要もあり""ません。"#. Tag: para#: collection_mapping.xml:579#, no-c-formatmsgid """<emphasis>Very important note:</emphasis> If the foreign key column of a ""<literal>&lt;one-to-many&gt;</literal> association is declared <literal>NOT ""NULL</literal>, you must declare the <literal>&lt;key&gt;</literal> mapping ""<literal>not-null=\"true\"</literal> or <emphasis>use a bidirectional ""association</emphasis> with the collection mapping marked <literal>inverse=""\"true\"</literal>. See the discussion of bidirectional associations later ""in this chapter."msgstr """<emphasis>とても重要な注意:</emphasis> もし <literal>&lt;one-to-many&gt;</""literal> 関連の外部キーカラムが <literal>NOT NULL</literal>と宣言された場""合、 <literal>&lt;key&gt;</literal> マッピングに <literal>not-null=\"true\"</""literal> を宣言するか、 コレクションマッピングに <literal>inverse=\"true\"</""literal> を付けた上で、 <emphasis>双方向関連を使う</emphasis> 必要がありま""す。 双方向関連についてはこの章の後のほうで説明します。"#. Tag: para#: collection_mapping.xml:588#, no-c-formatmsgid """This example shows a map of <literal>Part</literal> entities by name (where ""<literal>partName</literal> is a persistent property of <literal>Part</""literal>). Notice the use of a formula-based index."msgstr """次の例は、名称(<literal>Part</literal> の永続的なプロパティである ""<literal>partName</literal>) による <literal>Part</literal> エンティティの""mapを表しています。 formulaによるインデックスを使っていることに注意してくださ""い。"#. Tag: programlisting#: collection_mapping.xml:594#, no-c-formatmsgid """<![CDATA[<map name=\"parts\"\n""        cascade=\"all\">\n""    <key column=\"productId\" not-null=\"true\"/>\n""    <map-key formula=\"partName\"/>\n""    <one-to-many class=\"Part\"/>\n""</map>]]>"msgstr ""

⌨️ 快捷键说明

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