📄 association_mapping.po
字号:
#, fuzzymsgid ""msgstr """PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n""Last-Translator: FULL NAME <EMAIL@ADDRESS>\n""Content-Type: text/plain; charset=utf-8\n"#: index.docbook:6msgid "Association Mappings"msgstr "Mapeos de Asociación"#: index.docbook:9msgid "Introduction"msgstr "Introducción"#: index.docbook:11msgid """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 """Los mapeos de asociación son frecuentemente las cosas mas difí""ciles de hacer correctamente. En esta sección iremos a través ""de los casos canónicos uno a uno, comenzando con los mapeos ""unidireccionales, y considerando luego los casos bidireccionales. Usaremos ""<literal>Person</literal> y <literal>Address</literal> en todos los ejemplos."#: index.docbook:19msgid """We'll classify associations by whether or not they map to an intervening ""join table, and by multiplicity."msgstr """Clasificaremos las asociaciones por cuanto mapeen o no a una tabla de ""unión interviniente, y por su multiplicidad."#: index.docbook:24msgid """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 """Las claves foráneas que aceptan valores nulos (en adelante, ""nullables) no son consideradas una buena práctica en el modelado ""tradicional de datos, así que todos nuestros ejemplos usan claves ""foráneas no nullables. Esto no es un requerimiento de Hibernate, y ""todos los mapeos funcionarán si quitas las restricciones de ""nulabilidad."#: index.docbook:34msgid "Unidirectional associations"msgstr "Asociaciones Unidireccionales"#: index.docbook:37, index.docbook:108msgid "many to one"msgstr "muchos a uno"#: index.docbook:39msgid """A <emphasis>unidirectional many-to-one association</emphasis> is the most ""common kind of unidirectional association."msgstr """Una <emphasis>asociación unidireccional muchos-a-uno</emphasis> es el ""tipo más común de asociaciones unidireccionales."#: index.docbook:44msgid """<![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 """<![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>]]>"#: index.docbook:45, index.docbook:161msgid """<![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"" ]]>"#: index.docbook:50, index.docbook:121, index.docbook:185, index.docbook:225msgid "one to one"msgstr "uno a uno"#: index.docbook:52msgid """A <emphasis>unidirectional one-to-one association on a foreign key</""emphasis> is almost identical. The only difference is the column unique ""constraint."msgstr """Una <emphasis>asociación unidireccional uno-a-uno en una clave ""primaria</emphasis> es casi idéntica. La única diferencia es ""la restricción de unicidad de la columna."#: index.docbook:57msgid """<![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 """<![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>]]>"#: index.docbook:58, index.docbook:193msgid """<![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"" ]]>"#: index.docbook:60msgid """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 """Usualmente, una <emphasis>asociación unidireccional uno-a-uno en una ""clave primaria</emphasis> usa un generador de id especial. (Observa que ""hemos invertido el sentido de la asociación en este ejemplo)."#: index.docbook:66msgid """<![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 """<![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>]]>"#: index.docbook:67, index.docbook:201msgid """<![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"" ]]>"#: index.docbook:72, index.docbook:94msgid "one to many"msgstr "uno a muchos"#: index.docbook:74msgid """A <emphasis>unidirectional one-to-many association on a foreign key</""emphasis> is a very unusual case, and is not really recommended."msgstr """Una <emphasis>asociación unidireccional uno-a-muchos en una clave ""foránea</emphasis> es un caso muy inusual, y realmente no está ""recomendada."#: index.docbook:79msgid """<![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 """<![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>]]>"#: index.docbook:80msgid """<![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"" ]]>"#: index.docbook:82msgid "We think it's better to use a join table for this kind of association."msgstr """Creemos que es mejor usar una tabla de unión para este tipo de ""asociación."#: index.docbook:91msgid "Unidirectional associations with join tables"msgstr "Asociaciones unidireccionales con tablas de unión"#: index.docbook:96msgid """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 """Una <emphasis>asociación unidireccional uno-a-muchos en una tabla de ""unión</emphasis> es más preferible. Observa que especificando ""<literal>unique=\"true\"</literal>, hemos cambiado la multiplicidad de ""muchos-a-muchos a uno-a-muchos."#: index.docbook:102msgid """<![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 """<![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>]]>"#: index.docbook:103msgid """<![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"" ]]>"#: index.docbook:110msgid """A <emphasis>unidirectional many-to-one association on a join table</""emphasis> is quite common when the association is optional."msgstr """Una <emphasis>asociación unidireccional muchos-a-uno en una tabla de ""unión</emphasis> es bastante común cuando la asociación ""es opcional."
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -