📄 collection_mapping.po
字号:
" 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><many-to-many></""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 "몇몇 예제들, 먼저 문자열들을 가진 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 """(<literal>order-by</literal> 속성에 의해 결정되는 반복 순서를 가진) 정수들을 ""포함하는 bag :"#. 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 "엔티티들을 가진 배열 - 이 경우에, many to many 연관 :"#. 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 "컴포넌트들의 리스트(다음 장에서 논의됨):"#. 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 "One-to-many 연관들"#. 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>one to many 연관</emphasis>은 중재하는 콜렉션 테이블 없이 foreign ""키를 통해 두 개의 클래스들의 테이블들을 연결시킨다. 이 매핑은 통상의 자바 콜""렉션들의 어떤 의미를 상실한다:"#. 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 """포함된 엔티티 클래스의 인스턴스는 그 콜렉션의 하나 이상의 인스턴스에 속하지 ""않을 수 있다"#. 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 """포함된 엔티티 클래스의 인스턴스는 콜렉션 인덱스의 하나 이상의 값에서 나타나""지 않을 수 있다"#. 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><one-to-many></literal> ""tag indicates that this is a one to many association."msgstr """<literal>Product</literal>로부터 <literal>Part</literal>로의 연관은 foreign ""키 컬럼과 <literal>Part</literal> 테이블에 대한 인덱스 컬럼의 존재를 필요로 ""한다. <literal><one-to-many></literal> 태그는 이것이 one to many 연관임""을 나타낸다."#. 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#, fuzzy, no-c-formatmsgid """<literal>entity-name</literal> (optional): The entity name of the associated ""class, as an alternative to <literal>class</literal>."msgstr """#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n""<literal>entity-name</literal> (옵션): <literal>class</literal>에 대한 하나""의 대안으로서, 연관된 클래스의 엔티티 이름.\n""#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n""<literal>entity-name</literal> (옵션): <literal>class</literal>에 대한 대안으""로서, 연관된 클래스의 엔티티 이름."#. Tag: para#: collection_mapping.xml:573#, no-c-formatmsgid """Notice that the <literal><one-to-many></literal> element does not need ""to declare any columns. Nor is it necessary to specify the <literal>table</""literal> name anywhere."msgstr """<literal><one-to-many></literal> 요소는 어떤 컬럼들을 선언하는데 필요하""지 않음을 주목하라. 어딘가에 <literal>table</literal> 이름을 지정하는 것도 필""수적이지 않다."#. Tag: para#: collection_mapping.xml:579#, no-c-formatmsgid """<emphasis>Very important note:</emphasis> If the foreign key column of a ""<literal><one-to-many></literal> association is declared <literal>NOT ""NULL</literal>, you must declare the <literal><key></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><one-to-many></""literal> 연관의 foreign 키 컬럼이 <literal>NOT NULL</literal>로 선언될 경우, ""당신은 <literal><key></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 """이 예제는 name으로 <literal>Part</literal> 엔티티들을 가진 map을 보여준다(여""기서 <literal>partName</literal>은 <literal>Part</literal>의 영속 프로퍼티이""다). formula-기반 index의 사용을 주목하라."#. 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 ""#. Tag: title#: collection_mapping.xml:600#, no-c-formatmsgid "Advanced collection mappings"msgstr "개선된 콜렉션 매핑들"#. Tag: title#: collection_mapping.xml:603#, no-c-formatmsgid "Sorted collections"msgstr "Sorted 콜렉션들"#. Tag: para#: collection_mapping.xml:605#, no-c-formatmsgid """Hibernate supports collections implementing <literal>java.util.SortedMap</""literal> and <literal>java.util.SortedSet</literal>. You must specify a ""comparator in the mapping file:"msgstr """Hibernate는 <literal>java.util.SortedMap</literal>과 <literal>java.util.""SortedSet</literal>를 구현하는 콜렉션들을 지원한다. 당신은 매핑 파일 속에 하""나의 comparator를 지정해야 한다:"#. Tag: programlisting#: collection_mapping.xml:610#, no-c-formatmsgid """<![CDATA[<set name=\"aliases\" \n"" table=\"person_aliases\" \n"" sort=\"natural\">\n"" <key column=\"person\"/>\n"" <element column=\"name\" type=\"string\"/>\n""</set>\n""\n""<map name=\"holidays\" sort=\"my.custom.HolidayComparator\">\n"" <key column=\"year_id\"/>\n"" <map-key column=\"hol_name\" type=\"string\"/>\n"
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -