📄 collection_mapping.po
字号:
" <element column=\"hol_date\" type=\"date\"/>\n""</map>]]>"msgstr ""#. Tag: para#: collection_mapping.xml:612#, no-c-formatmsgid """Allowed values of the <literal>sort</literal> attribute are ""<literal>unsorted</literal>, <literal>natural</literal> and the name of a ""class implementing <literal>java.util.Comparator</literal>."msgstr """<literal>sort</literal> 속성에 허용되는 값들은 <literal>unsorted</literal>, ""<literal>natural</literal>, 그리고 <literal>java.util.Comparator</literal>를 ""구현하는 클래스의 이름이다."#. Tag: para#: collection_mapping.xml:618#, no-c-formatmsgid """Sorted collections actually behave like <literal>java.util.TreeSet</literal> ""or <literal>java.util.TreeMap</literal>."msgstr """Sorted 콜렉션들은 <literal>java.util.TreeSet</literal> 또는 <literal>java.""util.TreeMap</literal>처럼 행동한다."#. Tag: para#: collection_mapping.xml:623#, no-c-formatmsgid """If you want the database itself to order the collection elements use the ""<literal>order-by</literal> attribute of <literal>set</literal>, ""<literal>bag</literal> or <literal>map</literal> mappings. This solution is ""only available under JDK 1.4 or higher (it is implemented using ""<literal>LinkedHashSet</literal> or <literal>LinkedHashMap</literal>). This ""performs the ordering in the SQL query, not in memory."msgstr """만일 당신이 데이터베이스 그 자체가 콜렉션 요소들을 순서지우도록(order)원할 경""우 <literal>set</literal>, <literal>bag</literal> 또는<literal>map</literal> ""매핑들에 대해 <literal>order-by</literal> 속성을 사용하라. 이 해결책은 JDK ""1.4 이상의 버전에서만 이용 가능하다(그것은 <literal>LinkedHashSet</literal> ""또는 <literal>LinkedHashMap</literal>을 사용하여 구현된다). 이것은 메모리 내""가 아닌, SQL 질의 내에서 순서지움(ordering)을 수행한다."#. Tag: programlisting#: collection_mapping.xml:632#, no-c-formatmsgid """<![CDATA[<set name=\"aliases\" table=\"person_aliases\" order-by=\"lower""(name) asc\">\n"" <key column=\"person\"/>\n"" <element column=\"name\" type=\"string\"/>\n""</set>\n""\n""<map name=\"holidays\" order-by=\"hol_date, hol_name\">\n"" <key column=\"year_id\"/>\n"" <map-key column=\"hol_name\" type=\"string\"/>\n"" <element column=\"hol_date type=\"date\"/>\n""</map>]]>"msgstr ""#. Tag: para#: collection_mapping.xml:634#, no-c-formatmsgid """Note that the value of the <literal>order-by</literal> attribute is an SQL ""ordering, not a HQL ordering!"msgstr """<literal>order-by</literal> 속성의 값은 HQL 순서지움(ordering)이 아니라 SQL ""순서지움(ordering)임을 노트하라!"#. Tag: para#: collection_mapping.xml:639#, no-c-formatmsgid """Associations may even be sorted by some arbitrary criteria at runtime using ""a collection <literal>filter()</literal>."msgstr """연관들은 콜렉션 <literal>filter()</literal>를 사용하여 실행 시에 어떤 임의의 ""criteria(기준)을 사용하여 정렬(sort)될 수도 있다."#. Tag: programlisting#: collection_mapping.xml:644#, no-c-formatmsgid """<![CDATA[sortedUsers = s.createFilter( group.getUsers(), \"order by this.name""\" ).list();]]>"msgstr ""#. Tag: title#: collection_mapping.xml:649#, no-c-formatmsgid "Bidirectional associations"msgstr "양방향 연관들"#. Tag: para#: collection_mapping.xml:651#, fuzzy, no-c-formatmsgid """A <emphasis>bidirectional association</emphasis> allows navigation from both ""\"ends\" of the association. Two kinds of bidirectional association are ""supported:"msgstr """<emphasis>양방향 연관</emphasis>은 연관의 양 \"끝(end)들\"로부터 네비게이션""을 허용한다. 두 가지 종류의 양방향 연관들이 지원된다: <placeholder-1/>"#. Tag: term#: collection_mapping.xml:658#, no-c-formatmsgid "one-to-many"msgstr "one-to-many"#. Tag: para#: collection_mapping.xml:660#, no-c-formatmsgid "set or bag valued at one end, single-valued at the other"msgstr "한쪽 끝에 set 또는 bag 값을 갖고, 다른 쪽 긑에 단일 값을 가진 연관"#. Tag: term#: collection_mapping.xml:666#, no-c-formatmsgid "many-to-many"msgstr "many-to-many"#. Tag: para#: collection_mapping.xml:668#, no-c-formatmsgid "set or bag valued at both ends"msgstr "양 끝에서 set 또는 bag 값을 가진 연관"#. Tag: para#: collection_mapping.xml:677#, no-c-formatmsgid """You may specify a bidirectional many-to-many association simply by mapping ""two many-to-many associations to the same database table and declaring one ""end as <emphasis>inverse</emphasis> (which one is your choice, but it can ""not be an indexed collection)."msgstr """당신은 동일한 두 개의 many-to-many 연관들을 동일한 데이터베이스 테이블로 간단""하게 매핑하고 한 쪽 끝을 <emphasis>inverse</emphasis>(당신의 선택은 하나이지""만, 그것은 인덱싱된 콜렉션일 수 없다)로 선언함으로써 하나의 양방향 many-to-""many 연관을 지정할 수도 있다."#. Tag: para#: collection_mapping.xml:684#, no-c-formatmsgid """Here's an example of a bidirectional many-to-many association; each category ""can have many items and each item can be in many categories:"msgstr """다음은 양방향 many-to-many 연관에 관한 예제이다; 각각의 카테고리는 많은 아이""템들을 가질 수 있고 각각의 아이템은 많은 카테고리들 속에 있을 수 있다:"#. Tag: programlisting#: collection_mapping.xml:689#, no-c-formatmsgid """<![CDATA[<class name=\"Category\">\n"" <id name=\"id\" column=\"CATEGORY_ID\"/>\n"" ...\n"" <bag name=\"items\" table=\"CATEGORY_ITEM\">\n"" <key column=\"CATEGORY_ID\"/>\n"" <many-to-many class=\"Item\" column=\"ITEM_ID\"/>\n"" </bag>\n""</class>\n""\n""<class name=\"Item\">\n"" <id name=\"id\" column=\"ITEM_ID\"/>\n"" ...\n""\n"" <!-- inverse end -->\n"" <bag name=\"categories\" table=\"CATEGORY_ITEM\" inverse=\"true\">\n"" <key column=\"ITEM_ID\"/>\n"" <many-to-many class=\"Category\" column=\"CATEGORY_ID\"/>\n"" </bag>\n""</class>]]>"msgstr ""#. Tag: para#: collection_mapping.xml:691#, no-c-formatmsgid """Changes made only to the inverse end of the association are <emphasis>not</""emphasis> persisted. This means that Hibernate has two representations in ""memory for every bidirectional association, one link from A to B and another ""link from B to A. This is easier to understand if you think about the Java ""object model and how we create a many-to-many relationship in Java:"msgstr """연관의 inverse 끝(end)에 대해서만 행해진 변경들은 영속화 되지 <emphasis>않는""다</emphasis>. 이것은 Hibernate가 모든 양방향 연관에 대해 메모리 내에 두 개""의 표상들을 갖는다는 점을 의미한다: A로부터 B로의 하나의 링크와 B로부터 A로""의 또 다른 링크. 만일 당신이 자바 객체 모형에 대해 그리고 자바에서 many-to-""many 관계를 생성시키는 방법에 대해 생각하면 이것은 이해하기가 더 쉽다:"#. Tag: programlisting#: collection_mapping.xml:699#, no-c-formatmsgid """<![CDATA[\n""category.getItems().add(item); // The category now \"knows\" about ""the relationship\n""item.getCategories().add(category); // The item now \"knows\" about the ""relationship\n""\n""session.persist(item); // The relationship won't be ""saved!\n""session.persist(category); // The relationship will be saved]]>"msgstr ""#. Tag: para#: collection_mapping.xml:701#, no-c-formatmsgid """The non-inverse side is used to save the in-memory representation to the ""database."msgstr "non-inverse 측은 메모리 내 표상을 데이터베이스로 저장하는데 사용된다."#. Tag: para#: collection_mapping.xml:705#, no-c-formatmsgid """You may define a bidirectional one-to-many association by mapping a one-to-""many association to the same table column(s) as a many-to-one association ""and declaring the many-valued end <literal>inverse=\"true\"</literal>."msgstr """당신은 하나의 one-to-many 연관을 하나의 many-to-one 연관으로서 동일한 테이블 ""컬럼(들)로 매핑하고 many-값을 가진 끝(end)을 <literal>inverse=\"true\"</""literal>로 선언함으로써 하나의 양방향 연관을 정의할 수도 있다."#. Tag: programlisting#: collection_mapping.xml:711#, no-c-formatmsgid """<![CDATA[<class name=\"Parent\">\n"" <id name=\"id\" column=\"parent_id\"/>\n"" ....\n"" <set name=\"children\" inverse=\"true\">\n"" <key column=\"parent_id\"/>\n"" <one-to-many class=\"Child\"/>\n"" </set>\n""</class>\n""\n""<class name=\"Child\">\n"" <id name=\"id\" column=\"child_id\"/>\n"" ....\n"" <many-to-one name=\"parent\" \n"" class=\"Parent\" \n"" column=\"parent_id\"\n"" not-null=\"true\"/>\n""</class>]]>"msgstr ""#. Tag: para#: collection_mapping.xml:713#, no-c-formatmsgid """Mapping one end of an association with <literal>inverse=\"true\"</literal> ""doesn't affect the operation of cascades, these are orthogonal concepts!"msgstr """연관의 한쪽 끝을 <literal>inverse=\"true\"</literal>로 매핑하는 것은 cascade""들을 가진 오퍼레이션에 영향을 주지 않으며, 이것들은 orthogonal(직교) 개념들이""다!"#. Tag: title#: collection_mapping.xml:721#, no-c-formatmsgid "Bidirectional associations with indexed collections"msgstr "인덱싱된 콜렉션들을 가진 양방향 연관들"#. Tag: para#: collection_mapping.xml:722#, no-c-formatmsgid """A bidirectional association where one end is represented as a <literal><""list></literal> or <literal><map></literal> requires special ""consideration. If there is a property of the child class which maps to the ""index column, no problem, we can continue using <literal>inverse=\"true\"</""literal> on the collection mapping:"msgstr """한쪽 끝이 하나의 <literal><list></literal> 또는 <literal><map></""literal>으로서 표현되는 양방향 연관은 특별한 검토를 필요로 한다. 만일 인덱스 ""컬럼으로 매핑되는 child 클래스의 프로퍼티가 하나 존재한다면 문제가 없고, 우리""는 콜렉션 매핑 상에 <literal>inverse=\"true\"</literal>를 사용하여 계속할 수 ""있다:"#. Tag: programlisting#: collection_mapping.xml:729#, no-c-formatmsgid """<![CDATA[<class name=\"Parent\">\n"" <id name=\"id\" column=\"parent_id\"/>\n"" ....\n"" <map name=\"children\" inverse=\"true\">\n"" <key column=\"parent_id\"/>\n"" <map-key column=\"name\" \n"" type=\"string\"/>\n"" <one-to-many class=\"Child\"/>\n"" </map>\n""</class>\n""\n""<class name=\"Child\">\n"" <id name=\"id\" column=\"child_id\"/>\n"" ....\n"" <property name=\"name\" \n"" not-null=\"true\"/>\n"" <many-to-one name=\"parent\" \n"" class=\"Parent\" \n"" column=\"parent_id\"\n"" not-null=\"true\"/>\n""</class>]]>"msgstr ""#. Tag: para#: collection_mapping.xml:731#, no-c-formatmsgid """But, if there is no such property on the child class, we can't think of the ""association as truly bidirectional (there is information available at one ""end of the association that is not available at the other end). In this ""case, we can't map the collection <literal>inverse=\"true\"</literal>. ""Instead, we could use the following mapping:"msgstr """그러나 만일 child 클래스 상에 그런 프로퍼티가 존재하지 않을 경우, 우리는 그 ""연관을 진정하게 양방향으로 간주할 수 없다 (다른 쪽 끝에서 이용가능하지 않은 ""그 연관의 끝에서 이용 가능한 정보가 존재한다). 이 경우에 우리는 그 콜렉션을 ""<literal>inverse=\"true\"</literal>로 매핑시킬 수 없다. 대신에 우리는 다음 매""핑을 사용할 수 있다:"
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -