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

📄 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 "関連マッピング"#. Tag: title#: association_mapping.xml:9#, no-c-formatmsgid "Introduction"msgstr "イントロダクション"#. 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 """関連マッピングはしばしば理解が最も難しいものになります。 この章では、基本的な""一つ一つのケースについて述べます。 単方向のマッピングから始め、それから双方向""のケースについて考えていきます。 例として、<literal>Person</literal> と ""<literal>Address</literal> を用います。"#. 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 """関連は、結合テーブルを入れるかかどうかと、 多重度によって分類することにしま""す。"#. 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 """すべての例でnot nullの外部キーを使用します。 これはHibernateの要件ではありま""せん。 not null制約を外したとしても、マッピングは問題なく動作します。"#. Tag: title#: association_mapping.xml:34#, no-c-formatmsgid "Unidirectional associations"msgstr "単方向関連"#. Tag: title#: association_mapping.xml:37 association_mapping.xml:108#, no-c-formatmsgid "many to one"msgstr "多対一"#. 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 """<emphasis>単方向多対一関連</emphasis> は単方向関連の中で最も一般的なもので""す。"#. 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#, no-c-formatmsgid "one to one"msgstr "一対一"#. 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 """<emphasis>外部キーの単方向一対一関連</emphasis> はほとんど同じものです。 唯一""違うのは、カラムのユニークな制約です。"#. 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 """<emphasis>主キーの単方向一対一関連</emphasis> は通常、特別なIDジェネレータを""使います。 (この例では関連の方向が逆になっていることに注意してください)"#. 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 "一対多"#. 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 """<emphasis>外部キーの単方向一対多関連</emphasis> はとても特殊なケースで、 あま""り推奨されていません。"#. 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 "このような関連のために結合テーブルを使うことをお薦めします。"#. Tag: title#: association_mapping.xml:91#, no-c-formatmsgid "Unidirectional associations with join tables"msgstr "結合テーブルを使った単方向関連"#. 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 """<emphasis>結合テーブルを使った単方向一対多関連</emphasis> はより好ましいで""す。 <literal>unique=\"true\"</literal> の指定により、多重度が多対多から一対""多 に変わったことに注意して下さい。"#. 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 """<emphasis>結合テーブルの単方向多対一関連</emphasis> は 関連が任意であるときに""非常に一般的なものです。"#. 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 """<emphasis>結合テーブルの単方向一対一関連</emphasis> は、本当に特殊ですが 不可""能ではありません。"#. 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 "多対多"#. Tag: para#: association_mapping.xml:136#, no-c-formatmsgid """Finally, we have a <emphasis>unidirectional many-to-many association</""emphasis>."msgstr "最後に、<emphasis>単方向多対多関連</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 + -