📄 inheritance_mapping.po
字号:
#. Tag: para#: inheritance_mapping.xml:170#, no-c-formatmsgid """The limitation of this approach is that if a property is mapped on the ""superclass, the column name must be the same on all subclass tables. (We ""might relax this in a future release of Hibernate.) The identity generator ""strategy is not allowed in union subclass inheritance, indeed the primary ""key seed has to be shared accross all unioned subclasses of a hierarchy."msgstr """이 접근법의 제약은 만일 하나의 프로퍼티가 슈퍼클래스 상으로 매핑될 경우, 그 ""컬럼 이름이 모든 서브클래스 테이블들 상에서 같아야 한다는 점이다.(장래의 ""Hibernate 배포본에서 우리는 이 제약을 풀 수도 있다.) identity 생성기 방도는 ""union 서브클래스 상속에서 허용되지 않으며, 진정 프라이머리 키 시드는 하나의 ""계층구조의 모든 unioned 서브클래스들을 가로질러 공유되어야 한다."#. Tag: para#: inheritance_mapping.xml:179#, no-c-formatmsgid """If your superclass is abstract, map it with <literal>abstract=\"true\"</""literal>. Of course, if it is not abstract, an additional table (defaults to ""<literal>PAYMENT</literal> in the example above) is needed to hold instances ""of the superclass."msgstr """만일 당신의 슈퍼클래스가 abstract일 경우에, 그것을 <literal>abstract=\"true""\"</literal>로 매핑하라. 물론 만일 그것이 abstract가 아닐 경우, 추가적인 테이""블(위의 예제에서는 디폴트로 <literal>PAYMENT</literal>)이 슈퍼클래스의 인스턴""스들을 소유하는데 필요하다."#. Tag: title#: inheritance_mapping.xml:189#, no-c-formatmsgid "Table per concrete class, using implicit polymorphism"msgstr "함축적인 다형성을 사용하는, table per concrete class"#. Tag: para#: inheritance_mapping.xml:191#, no-c-formatmsgid "An alternative approach is to make use of implicit polymorphism:"msgstr "대안적인 접근법은 함축적인 다형성을 사용하는 것이다:"#. Tag: programlisting#: inheritance_mapping.xml:195#, no-c-formatmsgid """<![CDATA[<class name=\"CreditCardPayment\" table=\"CREDIT_PAYMENT\">\n"" <id name=\"id\" type=\"long\" column=\"CREDIT_PAYMENT_ID\">\n"" <generator class=\"native\"/>\n"" </id>\n"" <property name=\"amount\" column=\"CREDIT_AMOUNT\"/>\n"" ...\n""</class>\n""\n""<class name=\"CashPayment\" table=\"CASH_PAYMENT\">\n"" <id name=\"id\" type=\"long\" column=\"CASH_PAYMENT_ID\">\n"" <generator class=\"native\"/>\n"" </id>\n"" <property name=\"amount\" column=\"CASH_AMOUNT\"/>\n"" ...\n""</class>\n""\n""<class name=\"ChequePayment\" table=\"CHEQUE_PAYMENT\">\n"" <id name=\"id\" type=\"long\" column=\"CHEQUE_PAYMENT_ID\">\n"" <generator class=\"native\"/>\n"" </id>\n"" <property name=\"amount\" column=\"CHEQUE_AMOUNT\"/>\n"" ...\n""</class>]]>"msgstr ""#. Tag: para#: inheritance_mapping.xml:197#, no-c-formatmsgid """Notice that nowhere do we mention the <literal>Payment</literal> interface ""explicitly. Also notice that properties of <literal>Payment</literal> are ""mapped in each of the subclasses. If you want to avoid duplication, consider ""using XML entities (e.g. <literal>[ <!ENTITY allproperties SYSTEM ""\"allproperties.xml\"> ]</literal> in the <literal>DOCTYPE</literal> ""declartion and <literal>&allproperties;</literal> in the mapping)."msgstr """어느 곳에서도 우리가 명시적으로 <literal>Payment</literal> 인터페이스를 언급""하지 않음을 주목하라. 또한 <literal>Payment</literal>의 프로퍼티들이 서브클래""스들 각각에서 매핑된다는 점을 주목하라. 만일 당신이 중복을 피하고자 원한다""면, XML 엔티티들을 사용하는 것을 고려하라(예를 들어 매핑에서 ""<literal>DOCTYPE</literal> 선언과 <literal>&allproperties;</literal>에서 ""<literal>[ <!ENTITY allproperties SYSTEM \"allproperties.xml\"> ]</""literal>)."#. Tag: para#: inheritance_mapping.xml:207#, no-c-formatmsgid """The disadvantage of this approach is that Hibernate does not generate SQL ""<literal>UNION</literal>s when performing polymorphic queries."msgstr """이 접근법의 단점은 다형성 질의들을 수행할 때 Hibernate가 생성된 SQl ""<literal>UNION</literal>들을 생성시키는 않는다는 점이다."#. Tag: para#: inheritance_mapping.xml:212#, no-c-formatmsgid """For this mapping strategy, a polymorphic association to <literal>Payment</""literal> is usually mapped using <literal><any></literal>."msgstr """이 매핑 방도의 경우, <literal>Payment</literal>에 대한 하나의 다형성 연관은 ""대개 <literal><any></literal>를 사용하여 매핑된다."#. Tag: programlisting#: inheritance_mapping.xml:217#, no-c-formatmsgid """<![CDATA[<any name=\"payment\" meta-type=\"string\" id-type=\"long\">\n"" <meta-value value=\"CREDIT\" class=\"CreditCardPayment\"/>\n"" <meta-value value=\"CASH\" class=\"CashPayment\"/>\n"" <meta-value value=\"CHEQUE\" class=\"ChequePayment\"/>\n"" <column name=\"PAYMENT_CLASS\"/>\n"" <column name=\"PAYMENT_ID\"/>\n""</any>]]>"msgstr ""#. Tag: title#: inheritance_mapping.xml:222#, no-c-formatmsgid "Mixing implicit polymorphism with other inheritance mappings"msgstr "함축적인 다형성을 다른 상속 매핑들과 혼합하기"#. Tag: para#: inheritance_mapping.xml:224#, no-c-formatmsgid """There is one further thing to notice about this mapping. Since the ""subclasses are each mapped in their own <literal><class></literal> ""element (and since <literal>Payment</literal> is just an interface), each of ""the subclasses could easily be part of another inheritance hierarchy! (And ""you can still use polymorphic queries against the <literal>Payment</literal> ""interface.)"msgstr """이 매핑에 대해 주목할 하나 이상의 것이 존재한다. 서브클래스들이 그것들 자신의""<literal><class></literal> 요소 내에 각각 매핑되므로(그리고 ""<literal>Payment</literal>가 단지 인터페이스이므로), 서브클래스들 각각은 쉽""게 또 다른 상속 계층구조의 부분일 수 있다! (그리고 당신은 <literal>Payment</""literal> 인터페이스에 대해 여전히 다형성 질의들을 사용할 수 있다.)"#. Tag: programlisting#: inheritance_mapping.xml:232#, no-c-formatmsgid """<![CDATA[<class name=\"CreditCardPayment\" table=\"CREDIT_PAYMENT\">\n"" <id name=\"id\" type=\"long\" column=\"CREDIT_PAYMENT_ID\">\n"" <generator class=\"native\"/>\n"" </id>\n"" <discriminator column=\"CREDIT_CARD\" type=\"string\"/>\n"" <property name=\"amount\" column=\"CREDIT_AMOUNT\"/>\n"" ...\n"" <subclass name=\"MasterCardPayment\" discriminator-value=\"MDC\"/>\n"" <subclass name=\"VisaPayment\" discriminator-value=\"VISA\"/>\n""</class>\n""\n""<class name=\"NonelectronicTransaction\" table=\"NONELECTRONIC_TXN\">\n"" <id name=\"id\" type=\"long\" column=\"TXN_ID\">\n"" <generator class=\"native\"/>\n"" </id>\n"" ...\n"" <joined-subclass name=\"CashPayment\" table=\"CASH_PAYMENT\">\n"" <key column=\"PAYMENT_ID\"/>\n"" <property name=\"amount\" column=\"CASH_AMOUNT\"/>\n"" ...\n"" </joined-subclass>\n"" <joined-subclass name=\"ChequePayment\" table=\"CHEQUE_PAYMENT\">\n"" <key column=\"PAYMENT_ID\"/>\n"" <property name=\"amount\" column=\"CHEQUE_AMOUNT\"/>\n"" ...\n"" </joined-subclass>\n""</class>]]>"msgstr ""#. Tag: para#: inheritance_mapping.xml:234#, no-c-formatmsgid """Once again, we don't mention <literal>Payment</literal> explicitly. If we ""execute a query against the <literal>Payment</literal> interface - for ""example, <literal>from Payment</literal> - Hibernate automatically returns ""instances of <literal>CreditCardPayment</literal> (and its subclasses, since ""they also implement <literal>Payment</literal>), <literal>CashPayment</""literal> and <literal>ChequePayment</literal> but not instances of ""<literal>NonelectronicTransaction</literal>."msgstr """다시 한번, 우리는 <literal>Payment</literal>를 명시적으로 언급하지 않는다. 만""일 우리가 <literal>Payment</literal> 인터페이스에 대해 하나의 질의를 실행할 ""경우-예를 들어, from Payment-, Hibernate는 <literal>CreditCardPayment</""literal> (와 그것의 서브클래스들, 왜냐하면 그것들 또한 <literal>Payment</""literal>를 구현하므로), <literal>CashPayment</literal> 그리고 ""<literal>ChequePayment</literal> 인스턴스들을 자동적으로 반환할 것이지만 ""<literal>NonelectronicTransaction</literal>의 인스턴스들을 반환하지 않는다."#. Tag: title#: inheritance_mapping.xml:249#, no-c-formatmsgid "Limitations"msgstr "제약들"#. Tag: para#: inheritance_mapping.xml:251#, no-c-formatmsgid """There are certain limitations to the \"implicit polymorphism\" approach to ""the table per concrete-class mapping strategy. There are somewhat less ""restrictive limitations to <literal><union-subclass></literal> ""mappings."msgstr """table per concrete-class 매핑 방도에 대한 \"함축적인 다형성\" 접근법에는 어""떤 제약들이 존재한다. <literal><union-subclass></literal> 매핑들에 대해""서는 다소 덜 제한적인 제약들이 존재한다:"#. Tag: para#: inheritance_mapping.xml:258#, no-c-formatmsgid """The following table shows the limitations of table per concrete-class ""mappings, and of implicit polymorphism, in Hibernate."msgstr """다음 표는 Hibernate에서 table per concrete-class 매핑들에 대한 제약들, 그리""고 함축적인 다형성에 대한 제약들을 보여준다."#. Tag: title#: inheritance_mapping.xml:264#, no-c-formatmsgid "Features of inheritance mappings"msgstr "상속 매핑들의 특징들"#. Tag: entry#: inheritance_mapping.xml:276#, no-c-formatmsgid "Inheritance strategy"msgstr "상속 방도"#. Tag: entry#: inheritance_mapping.xml:277#, no-c-formatmsgid "Polymorphic many-to-one"msgstr "다형성 다대일"#. Tag: entry#: inheritance_mapping.xml:278#, no-c-formatmsgid "Polymorphic one-to-one"msgstr "다형성 일대일"#. Tag: entry#: inheritance_mapping.xml:279#, no-c-formatmsgid "Polymorphic one-to-many"msgstr "다형성 일대다"#. Tag: entry#: inheritance_mapping.xml:280#, no-c-formatmsgid "Polymorphic many-to-many"msgstr "다형성 다대다"#. Tag: entry#: inheritance_mapping.xml:281#, no-c-formatmsgid "Polymorphic <literal>load()/get()</literal>"msgstr ""#. Tag: entry#: inheritance_mapping.xml:282#, no-c-formatmsgid "Polymorphic queries"msgstr "다형성 질의들"#. Tag: entry#: inheritance_mapping.xml:283#, no-c-formatmsgid "Polymorphic joins"msgstr "다형성 조인들"#. Tag: entry#: inheritance_mapping.xml:284#, no-c-formatmsgid "Outer join fetching"msgstr "Outer 조인 페칭"#. Tag: entry#: inheritance_mapping.xml:289#, no-c-formatmsgid "table per class-hierarchy"msgstr "table per class-hierarchy"#. Tag: literal#: inheritance_mapping.xml:290 inheritance_mapping.xml:301#: inheritance_mapping.xml:312#, no-c-formatmsgid "<many-to-one>"msgstr "<many-to-one>"#. Tag: literal#: inheritance_mapping.xml:291 inheritance_mapping.xml:302#: inheritance_mapping.xml:313#, no-c-formatmsgid "<one-to-one>"msgstr "<one-to-one>"#. Tag: literal#: inheritance_mapping.xml:292 inheritance_mapping.xml:303#, no-c-formatmsgid "<one-to-many>"msgstr "<one-to-many>"#. Tag: literal#: inheritance_mapping.xml:293 inheritance_mapping.xml:304#: inheritance_mapping.xml:315#, no-c-formatmsgid "<many-to-many>"msgstr "<many-to-many>"#. Tag: literal#: inheritance_mapping.xml:294 inheritance_mapping.xml:305#: inheritance_mapping.xml:316#, no-c-formatmsgid "s.get(Payment.class, id)"msgstr "s.get(Payment.class, id)"#. Tag: literal#: inheritance_mapping.xml:295 inheritance_mapping.xml:306#: inheritance_mapping.xml:317 inheritance_mapping.xml:328#, no-c-formatmsgid "from Payment p"msgstr "from Payment p"#. Tag: literal#: inheritance_mapping.xml:296 inheritance_mapping.xml:307#: inheritance_mapping.xml:318#, no-c-formatmsgid "from Order o join o.payment p"msgstr "from Order o join o.payment p"#. Tag: emphasis#: inheritance_mapping.xml:297 inheritance_mapping.xml:308#: inheritance_mapping.xml:319#, no-c-formatmsgid "supported"msgstr "지원됨"#. Tag: entry#: inheritance_mapping.xml:300#, fuzzy, no-c-formatmsgid "<entry>table per subclass</entry>"msgstr "table per subclass"#. Tag: entry#: inheritance_mapping.xml:311#, no-c-formatmsgid "table per concrete-class (union-subclass)"msgstr "table per concrete-class (union-subclass)"#. Tag: entry#: inheritance_mapping.xml:314#, no-c-formatmsgid """<literal><one-to-many></literal> (for <literal>inverse=\"true\"</""literal> only)"msgstr ""#. Tag: entry#: inheritance_mapping.xml:322#, no-c-formatmsgid "table per concrete class (implicit polymorphism)"msgstr "table per concrete class (implicit polymorphism)"#. Tag: literal#: inheritance_mapping.xml:323#, no-c-formatmsgid "<any>"msgstr "<any>"#. Tag: emphasis#: inheritance_mapping.xml:324 inheritance_mapping.xml:325#: inheritance_mapping.xml:329 inheritance_mapping.xml:330#, no-c-formatmsgid "not supported"msgstr "지원되지 않음"#. Tag: literal#: inheritance_mapping.xml:326#, no-c-formatmsgid "<many-to-any>"msgstr "<many-to-any>"#. Tag: literal#: inheritance_mapping.xml:327#, no-c-formatmsgid """s.createCriteria(Payment.class).add( Restrictions.idEq(id) ).uniqueResult()"msgstr """s.createCriteria(Payment.class).add( Restrictions.idEq(id) ).uniqueResult()"#~ msgid "load()/get()"#~ msgstr "load()/get()"#~ msgid "Polymorphic <placeholder-1/>"#~ msgstr "다형성 <placeholder-1/>"#~ msgid "inverse=\"true\""#~ msgstr "inverse=\"true\""#~ msgid "<placeholder-1/> (for <placeholder-2/> only)"#~ msgstr "<placeholder-1/> (for <placeholder-2/> only)"
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -