|
Hibernate example source code file (component_mapping.po)
This example Hibernate source code file (component_mapping.po) is included in the DevDaily.com
"Java Source Code
Warehouse" project. The intent of this project is to help you "Learn Java by Example" TM.
The Hibernate component_mapping.po source code
# translation of Collection_Mapping.po to
# Xi Huang <xhuang@redhat.com>, 2006.
# Xi HUANG <xhuang@redhat.com>, 2007.
msgid ""
msgstr ""
"Project-Id-Version: Collection_Mapping\n"
"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
"POT-Creation-Date: 2010-02-11T05:38:15\n"
"PO-Revision-Date: 2010-03-15 09:01+1000\n"
"Last-Translator: Xi HUANG <xhuang@redhat.com>\n"
"Language-Team: <en@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: KBabel 1.11.4\n"
#. Tag: title
#, no-c-format
msgid "Component Mapping"
msgstr "组件(Componentï¼‰æ˜ å°„"
#. Tag: para
#, no-c-format
msgid "The notion of a <emphasis>component is re-used in several different contexts and purposes throughout Hibernate."
msgstr "<emphasis>组件(Component)这个概念在 Hibernate ä¸å‡ 处ä¸åŒçš„地方为了ä¸åŒçš„目的被é‡å¤ä½¿ç”¨ã€‚"
#. Tag: title
#, no-c-format
msgid "Dependent objects"
msgstr "ä¾èµ–对象(Dependent objects)"
#. Tag: para
#, no-c-format
msgid "A component is a contained object that is persisted as a value type and not an entity reference. The term \"component\" refers to the object-oriented notion of composition and not to architecture-level components. For example, you can model a person like this:"
msgstr "组件(Component)是一个被包å«çš„对象,在æŒä¹…化的过程ä¸ï¼Œå®ƒè¢«å½“作值类型,而并éžä¸€ä¸ªå®žä½“的引用。在这篇文档ä¸ï¼Œç»„件这一术è¯æŒ‡çš„是é¢å‘对象的åˆæˆæ¦‚念(而并ä¸æ˜¯ç³»ç»Ÿæž„架层次上的组件的概念)。举个例åï¼Œä½ å¯¹äººï¼ˆPerson)这个概念å¯ä»¥åƒä¸‹é¢è¿™æ ·æ¥å»ºæ¨¡ï¼š "
#. Tag: para
#, no-c-format
msgid "Now <literal>Name can be persisted as a component of Person. Name defines getter and setter methods for its persistent properties, but it does not need to declare any interfaces or identifier properties."
msgstr "在æŒä¹…化的过程ä¸ï¼Œ<literal>姓å(Name)å¯ä»¥ä½œä¸ºäººï¼ˆPerson)的一个组件。需è¦æ³¨æ„çš„æ˜¯ï¼šä½ åº”è¯¥ä¸ºå§“åçš„æŒä¹…化属性定义 getter å’Œ setter æ–¹æ³•ï¼Œä½†æ˜¯ä½ ä¸éœ€è¦å®žçŽ°ä»»ä½•çš„接å£æˆ–ç”³æ˜Žæ ‡è¯†ç¬¦å—段。 "
#. Tag: para
#, no-c-format
msgid "Our Hibernate mapping would look like this:"
msgstr "以下是这个例åçš„ Hibernate æ˜ å°„æ–‡ä»¶ï¼š "
#. Tag: para
#, no-c-format
msgid "The person table would have the columns <literal>pid, birthday, initial, first and last."
msgstr "人员(Person)表ä¸å°†åŒ…括 <literal>pid,birthday,initial,firstå’Œ last ç‰å—段。"
#. Tag: para
#, no-c-format
msgid "Like value types, components do not support shared references. In other words, two persons could have the same name, but the two person objects would contain two independent name objects that were only \"the same\" by value. The null value semantics of a component are <emphasis>ad hoc. When reloading the containing object, Hibernate will assume that if all component columns are null, then the entire component is null. This is suitable for most purposes."
msgstr "å°±åƒæ‰€æœ‰çš„å€¼ç±»åž‹ä¸€æ ·ï¼Œç»„ä»¶ä¸æ”¯æŒå…±äº«å¼•ç”¨ã€‚æ¢å¥è¯è¯´ï¼Œä¸¤ä¸ªäººå¯èƒ½é‡å,但是两个 Person 对象应该包å«ä¸¤ä¸ªç‹¬ç«‹çš„ Name 对象,åªä¸è¿‡è¿™ä¸¤ä¸ª Name 对象具有“åŒæ ·â€çš„值。组件的值å¯ä»¥ä¸ºç©ºï¼Œå…¶å®šä¹‰å¦‚下。 æ¯å½“ Hibernate é‡æ–°åŠ 载一个包å«ç»„件的对象,如果该组件的所有å—段为空,Hibernate å°†å‡å®šæ•´ä¸ªç»„ä»¶ä¸ºç©ºã€‚åœ¨å¤§å¤šæ•°æƒ…å†µä¸‹ï¼Œè¿™æ ·å‡å®šåº”该是没有问题的。"
#. Tag: para
#, no-c-format
msgid "The properties of a component can be of any Hibernate type (collections, many-to-one associations, other components, etc). Nested components should <emphasis>not be considered an exotic usage. Hibernate is intended to support a fine-grained object model."
msgstr "组件的属性å¯ä»¥æ˜¯ä»»æ„ä¸€ç§ Hibernate 类型(包括集åˆï¼Œå¤šå¯¹å¤šå…³è”,以åŠå…¶å®ƒç»„件ç‰ç‰ï¼‰ã€‚嵌套组件ä¸åº”该被当作一ç§ç‰¹æ®Šçš„应用(Nested components should not be considered an exotic usage)。Hibernate 倾å‘于支æŒç»†é¢—粒度的(fine-grained)对象模型。"
#. Tag: para
#, no-c-format
msgid "The <literal><component> element allows a <parent> subelement that maps a property of the component class as a reference back to the containing entity."
msgstr "<literal><component> å…ƒç´ å…è®¸åŠ å…¥ä¸€ä¸ª <parent> åå…ƒç´ ï¼Œåœ¨ç»„ä»¶ç±»å†…éƒ¨å°±å¯ä»¥æœ‰ä¸€ä¸ªæŒ‡å‘其容器的实体的åå‘引用。"
#. Tag: title
#, no-c-format
msgid "Collections of dependent objects"
msgstr "在集åˆä¸å‡ºçŽ°çš„ä¾èµ–对象(Collections of dependent objects)"
#. Tag: para
#, no-c-format
msgid "Collections of components are supported (e.g. an array of type <literal>Name). Declare your component collection by replacing the <element> tag with a <composite-element> tag:"
msgstr "Hibernate 支æŒç»„件的集åˆï¼ˆä¾‹å¦‚ï¼šä¸€ä¸ªå…ƒç´ æ˜¯å§“å <literal>Name è¿™ç§ç±»åž‹çš„æ•°ç»„ï¼‰ã€‚ä½ å¯ä»¥ä½¿ç”¨ <composite-element> æ ‡ç¾æ›¿ä»£ <element> æ ‡ç¾æ¥å®šä¹‰ä½ 的组件集åˆã€‚"
#. Tag: para
#, no-c-format
msgid "If you define a <literal>Set of composite elements, it is important to implement equals() and hashCode() correctly."
msgstr "注æ„ï¼Œå¦‚æžœä½ å®šä¹‰çš„ Set 包å«ç»„åˆå…ƒç´ (composite-element),æ£ç¡®åœ°å®žçŽ° <literal>equals() å’Œ hashCode() 是éžå¸¸é‡è¦çš„。 "
#. Tag: para
#, no-c-format
msgid "Composite elements can contain components but not collections. If your composite element contains components, use the <literal><nested-composite-element> tag. This case is a collection of components which themselves have components. You may want to consider if a one-to-many association is more appropriate. Remodel the composite element as an entity, but be aware that even though the Java model is the same, the relational model and persistence semantics are still slightly different."
msgstr "组åˆå…ƒç´ å¯ä»¥åŒ…å«ç»„件,但是ä¸èƒ½åŒ…å«é›†åˆã€‚å¦‚æžœä½ çš„ç»„åˆå…ƒç´ 自身包å«ç»„ä»¶ï¼Œä½ å¿…é¡»ä½¿ç”¨ <literal><nested-composite-element> æ ‡ç¾ã€‚这是一个相当特殊的案例 — 在一个组件的集åˆé‡Œï¼Œé‚£äº›ç»„件本身åˆå¯ä»¥åŒ…å«å…¶ä»–çš„ç»„ä»¶ã€‚è¿™ä¸ªæ—¶å€™ä½ å°±åº”è¯¥è€ƒè™‘ä¸€ä¸‹ä½¿ç”¨ one-to-many å…³è”是å¦ä¼šæ›´æ°å½“。å°è¯•å¯¹è¿™ä¸ªç»„åˆå…ƒç´ é‡æ–°å»ºæ¨¡ä¸ºä¸€ä¸ªå®žä½“ — 但是需è¦æ³¨æ„的是,虽然 Java 模型和é‡æ–°å»ºæ¨¡å‰æ˜¯ä¸€æ ·çš„,关系模型和æŒä¹…性è¯ä¹‰ä¼šæœ‰ç»†å¾®çš„å˜åŒ–。 "
#. Tag: para
#, no-c-format
msgid "A composite element mapping does not support null-able properties if you are using a <literal><set>. There is no separate primary key column in the composite element table. Hibernate uses each column's value to identify a record when deleting objects, which is not possible with null values. You have to either use only not-null properties in a composite-element or choose a <list>, <map>, <bag> or <idbag>."
msgstr "请注æ„å¦‚æžœä½ ä½¿ç”¨ <literal><set> æ ‡ç¾ï¼Œä¸€ä¸ªç»„åˆå…ƒç´ çš„æ˜ å°„ä¸æ”¯æŒå¯èƒ½ä¸ºç©ºçš„属性. å½“åˆ é™¤å¯¹è±¡æ—¶ï¼ŒHibernate 必须使用æ¯ä¸€ä¸ªå—段的值æ¥ç¡®å®šä¸€æ¡è®°å½•ï¼ˆåœ¨ç»„åˆå…ƒç´ 表ä¸ï¼Œæ²¡æœ‰å•ç‹¬çš„关键å—段),如果有为 null çš„å—æ®µï¼Œè¿™æ ·åšå°±ä¸å¯èƒ½äº†ã€‚ä½ å¿…é¡»ä½œå‡ºä¸€ä¸ªé€‰æ‹©ï¼Œè¦ä¹ˆåœ¨ç»„åˆå…ƒç´ ä¸ä½¿ç”¨ä¸èƒ½ä¸ºç©ºçš„属性,è¦ä¹ˆé€‰æ‹©ä½¿ç”¨ <list>,<map>,<bag> 或者 <idbag> 而ä¸æ˜¯ <set>。 "
#. Tag: para
#, no-c-format
msgid "A special case of a composite element is a composite element with a nested <literal><many-to-one> element. This mapping allows you to map extra columns of a many-to-many association table to the composite element class. The following is a many-to-many association from Order to Item, where purchaseDate, price and quantity are properties of the association:"
msgstr "组åˆå…ƒç´ 有个特别的用法是它å¯ä»¥åŒ…å«ä¸€ä¸ª<literal><many-to-one>å…ƒç´ ã€‚ç±»ä¼¼è¿™æ ·çš„æ˜ å°„å…è®¸ä½ å°†ä¸€ä¸ª many-to-many å…³è”表的é¢å¤–å—æ®µæ˜ å°„ä¸ºç»„åˆå…ƒç´ 类。接下æ¥çš„的例å是从 Order 到 Item 的一个多对多的关è”关系,关è”属性是 purchaseDate,price å’Œ quantity 。 "
#. Tag: para
#, no-c-format
msgid "There cannot be a reference to the purchase on the other side for bidirectional association navigation. Components are value types and do not allow shared references. A single <literal>Purchase can be in the set of an Order, but it cannot be referenced by the Item at the same time."
msgstr "å½“ç„¶ï¼Œå½“ä½ å®šä¹‰ Item æ—¶ï¼Œä½ æ— æ³•å¼•ç”¨è¿™äº› purchaseï¼Œå› æ¤ä½ æ— æ³•å®žçŽ°åŒå‘å…³è”查询。记ä½ç»„件是值类型,并且ä¸å…许共享引用。æŸä¸€ä¸ªç‰¹å®šçš„ <literal>Purchase å¯ä»¥æ”¾åœ¨ Order 的集åˆä¸ï¼Œä½†å®ƒä¸èƒ½åŒæ—¶è¢« Item 所引用。 "
#. Tag: para
#, no-c-format
msgid "Even ternary (or quaternary, etc) associations are possible:"
msgstr "其实组åˆå…ƒç´ 的这个用法å¯ä»¥æ‰©å±•åˆ°ä¸‰é‡æˆ–多é‡å…³è”:"
#. Tag: para
#, no-c-format
msgid "Composite elements can appear in queries using the same syntax as associations to other entities."
msgstr "在查询ä¸ï¼Œè¡¨è¾¾ç»„åˆå…ƒç´ çš„è¯æ³•å’Œå…³è”到其他实体的è¯æ³•æ˜¯ä¸€æ ·çš„。 "
#. Tag: title
#, no-c-format
msgid "Components as Map indices"
msgstr "组件作为 Map 的索引(Components as Map indices )"
#. Tag: para
#, no-c-format
msgid "The <literal><composite-map-key> element allows you to map a component class as the key of a Map. Ensure that you override hashCode() and equals() correctly on the component class."
msgstr "<literal><composite-map-key> å…ƒç´ å…è®¸ä½ æ˜ å°„ä¸€ä¸ªç»„ä»¶ç±»ä½œä¸ºä¸€ä¸ª Map çš„ key,å‰ææ˜¯ä½ å¿…é¡»æ£ç¡®çš„在这个类ä¸é‡å†™äº† hashCode() å’Œ equals() 方法。 "
#. Tag: title
#, no-c-format
msgid "Components as composite identifiers"
msgstr "组件作为è”åˆæ ‡è¯†ç¬¦ï¼ˆComponents as composite identifiers)"
#. Tag: para
#, no-c-format
msgid "You can use a component as an identifier of an entity class. Your component class must satisfy certain requirements:"
msgstr "ä½ å¯ä»¥ä½¿ç”¨ä¸€ä¸ªç»„ä»¶ä½œä¸ºä¸€ä¸ªå®žä½“ç±»çš„æ ‡è¯†ç¬¦ã€‚ä½ çš„ç»„ä»¶ç±»å¿…é¡»æ»¡è¶³ä»¥ä¸‹è¦æ±‚: "
#. Tag: para
#, no-c-format
msgid "It must implement <literal>java.io.Serializable."
msgstr "它必须实现 <literal>java.io.Serializable 接å£"
#. Tag: para
#, no-c-format
msgid "It must re-implement <literal>equals() and hashCode() consistently with the database's notion of composite key equality."
msgstr "它必须é‡æ–°å®žçŽ° <literal>equals() å’Œ hashCode() 方法,始终和组åˆå…³é”®å—在数æ®åº“ä¸çš„概念ä¿æŒä¸€è‡´ "
#. Tag: title
#, no-c-format
msgid "Note"
msgstr "注æ„"
#. Tag: para
#, no-c-format
msgid "In Hibernate3, although the second requirement is not an absolutely hard requirement of Hibernate, it is recommended."
msgstr "注æ„:在 Hibernate3 ä¸ï¼Œç¬¬äºŒä¸ªè¦æ±‚并éžæ˜¯ Hibernate å¼ºåˆ¶å¿…é¡»çš„ã€‚ä½†æœ€å¥½è¿™æ ·åšã€‚ "
#. Tag: para
#, no-c-format
msgid "You cannot use an <literal>IdentifierGenerator to generate composite keys. Instead the application must assign its own identifiers."
msgstr "ä½ ä¸èƒ½ä½¿ç”¨ä¸€ä¸ª <literal>IdentifierGenerator 产生组åˆå…³é”®å—。一个应用程åºå¿…须分é…å®ƒè‡ªå·±çš„æ ‡è¯†ç¬¦ã€‚ "
#. Tag: para
#, no-c-format
msgid "Use the <literal><composite-id> tag, with nested <key-property> elements, in place of the usual <id> declaration. For example, the OrderLine class has a primary key that depends upon the (composite) primary key of Order."
msgstr "使用 <literal><composite-id> æ ‡ç¾ï¼ˆå¹¶ä¸”内嵌 <key-property> å…ƒç´ ï¼‰ä»£æ›¿é€šå¸¸çš„ <id> æ ‡ç¾ã€‚比如,OrderLine 类具有一个主键,这个主键ä¾èµ–于 Order 的(è”åˆï¼‰ä¸»é”®ã€‚ "
#. Tag: para
#, no-c-format
msgid "Any foreign keys referencing the <literal>OrderLine table are now composite. Declare this in your mappings for other classes. An association to OrderLine is mapped like this:"
msgstr "çŽ°åœ¨ï¼Œä»»ä½•æŒ‡å‘ <literal>OrderLine 的外键都是å¤åˆçš„ã€‚åœ¨ä½ çš„æ˜ å°„æ–‡ä»¶ä¸ï¼Œå¿…é¡»ä¸ºå…¶ä»–ç±»ä¹Ÿè¿™æ ·å£°æ˜Žã€‚ä¾‹å¦‚ï¼Œä¸€ä¸ªæŒ‡å‘ OrderLine çš„å…³è”å¯èƒ½è¢«è¿™æ ·æ˜ 射: "
#. Tag: para
#, no-c-format
msgid "The <literal>column element is an alternative to the column attribute everywhere. Using the column element just gives more declaration options, which are mostly useful when utilizing hbm2ddl"
msgstr "注æ„在å„个地方 <literal>column æ ‡ç¾éƒ½æ˜¯ column 属性的替代写法。使用 column å…ƒç´ åªæ˜¯ç»™å‡ºä¸€ä¸ªæ›´è¯¦ç»†çš„选项,在使用 hbm2ddl 时会更有用。"
#. Tag: para
#, no-c-format
msgid "A <literal>many-to-many association to OrderLine also uses the composite foreign key:"
msgstr "æŒ‡å‘ <literal>OrderLine 的多对多关è”也使用è”åˆå¤–键:"
#. Tag: para
#, no-c-format
msgid "The collection of <literal>OrderLines in Order would use:"
msgstr "在 <literal>Order ä¸ï¼ŒOrderLine 的集åˆåˆ™æ˜¯è¿™æ ·ï¼š "
#. Tag: para
#, no-c-format
msgid "The <literal><one-to-many> element declares no columns."
msgstr "ä¸Žé€šå¸¸ä¸€æ ·ï¼Œ<literal><one-to-many> å…ƒç´ ä¸å£°æ˜Žä»»ä½•åˆ—。"
#. Tag: para
#, no-c-format
msgid "If <literal>OrderLine itself owns a collection, it also has a composite foreign key."
msgstr "å‡è‹¥ <literal>OrderLine 本身拥有一个集åˆï¼Œå®ƒä¹Ÿå…·æœ‰ç»„åˆå¤–键。"
#. Tag: title
#, no-c-format
msgid "Dynamic components"
msgstr "动æ€ç»„件(Dynamic components)"
#. Tag: para
#, no-c-format
msgid "You can also map a property of type <literal>Map:"
msgstr "ä½ ç”šè‡³å¯ä»¥æ˜ å°„ <literal>Map 类型的属性: "
#. Tag: para
#, no-c-format
msgid "The semantics of a <literal><dynamic-component> mapping are identical to <component>. The advantage of this kind of mapping is the ability to determine the actual properties of the bean at deployment time just by editing the mapping document. Runtime manipulation of the mapping document is also possible, using a DOM parser. You can also access, and change, Hibernate's configuration-time metamodel via the Configuration object."
msgstr "从 <literal><dynamic-component> æ˜ å°„çš„è¯ä¹‰ä¸Šæ¥è®²ï¼Œå®ƒå’Œ <component> 是相åŒçš„。这ç§æ˜ å°„ç±»åž‹çš„ä¼˜ç‚¹åœ¨äºŽé€šè¿‡ä¿®æ”¹æ˜ å°„æ–‡ä»¶ï¼Œå°±å¯ä»¥å…·æœ‰åœ¨éƒ¨ç½²æ—¶æ£€æµ‹çœŸå®žå±žæ€§çš„能力。利用一个 DOM 解æžå™¨ï¼Œä¹Ÿå¯ä»¥åœ¨ç¨‹åºè¿è¡Œæ—¶æ“ä½œæ˜ å°„æ–‡ä»¶ã€‚æ›´å¥½çš„æ˜¯ï¼Œä½ å¯ä»¥é€šè¿‡ Configuration 对象æ¥è®¿é—®ï¼ˆæˆ–者修改)Hibernate çš„è¿è¡Œæ—¶å…ƒæ¨¡åž‹ã€‚ "
#~ msgid ""
#~ "<![CDATA[public class Person {\n"
#~ " private java.util.Date birthday;\n"
#~ " private Name name;\n"
#~ " private String key;\n"
#~ " public String getKey() {\n"
#~ " return key;\n"
#~ " }\n"
#~ " private void setKey(String key) {\n"
#~ " this.key=key;\n"
#~ " }\n"
#~ " public java.util.Date getBirthday() {\n"
#~ " return birthday;\n"
#~ " }\n"
#~ " public void setBirthday(java.util.Date birthday) {\n"
#~ " this.birthday = birthday;\n"
#~ " }\n"
#~ " public Name getName() {\n"
#~ " return name;\n"
#~ " }\n"
#~ " public void setName(Name name) {\n"
#~ " this.name = name;\n"
#~ " }\n"
#~ " ......\n"
#~ " ......\n"
#~ "}]]>"
#~ msgstr ""
#~ "<![CDATA[public class Person {\n"
#~ " private java.util.Date birthday;\n"
#~ " private Name name;\n"
#~ " private String key;\n"
#~ " public String getKey() {\n"
#~ " return key;\n"
#~ " }\n"
#~ " private void setKey(String key) {\n"
#~ " this.key=key;\n"
#~ " }\n"
#~ " public java.util.Date getBirthday() {\n"
#~ " return birthday;\n"
#~ " }\n"
#~ " public void setBirthday(java.util.Date birthday) {\n"
#~ " this.birthday = birthday;\n"
#~ " }\n"
#~ " public Name getName() {\n"
#~ " return name;\n"
#~ " }\n"
#~ " public void setName(Name name) {\n"
#~ " this.name = name;\n"
#~ " }\n"
#~ " ......\n"
#~ " ......\n"
#~ "}]]>"
#~ msgid ""
#~ "<![CDATA[public class Name {\n"
#~ " char initial;\n"
#~ " String first;\n"
#~ " String last;\n"
#~ " public String getFirst() {\n"
#~ " return first;\n"
#~ " }\n"
#~ " void setFirst(String first) {\n"
#~ " this.first = first;\n"
#~ " }\n"
#~ " public String getLast() {\n"
#~ " return last;\n"
#~ " }\n"
#~ " void setLast(String last) {\n"
#~ " this.last = last;\n"
#~ " }\n"
#~ " public char getInitial() {\n"
#~ " return initial;\n"
#~ " }\n"
#~ " void setInitial(char initial) {\n"
#~ " this.initial = initial;\n"
#~ " }\n"
#~ "}]]>"
#~ msgstr ""
#~ "<![CDATA[public class Name {\n"
#~ " char initial;\n"
#~ " String first;\n"
#~ " String last;\n"
#~ " public String getFirst() {\n"
#~ " return first;\n"
#~ " }\n"
#~ " void setFirst(String first) {\n"
#~ " this.first = first;\n"
#~ " }\n"
#~ " public String getLast() {\n"
#~ " return last;\n"
#~ " }\n"
#~ " void setLast(String last) {\n"
#~ " this.last = last;\n"
#~ " }\n"
#~ " public char getInitial() {\n"
#~ " return initial;\n"
#~ " }\n"
#~ " void setInitial(char initial) {\n"
#~ " this.initial = initial;\n"
#~ " }\n"
#~ "}]]>"
#~ msgid ""
#~ "<![CDATA["
#~ msgstr ""
#~ "<![CDATA["
#~ msgid ""
#~ "<![CDATA["
#~ msgstr ""
#~ "<![CDATA["
#~ msgid ""
#~ "<![CDATA["
#~ msgstr ""
#~ "<![CDATA["
#, fuzzy
#~ msgid ""
#~ "<![CDATA["
#~ msgstr ""
#~ "<class name=\"eg.Order\" .... >\n"
#~ " ....\n"
#~ " <set name=\"purchasedItems\" table=\"purchase_items\" lazy=\"true"
#~ "\">\n"
#~ " <key column=\"order_id\">\n"
#~ " <composite-element class=\"eg.Purchase\">\n"
#~ " <property name=\"purchaseDate\"/>\n"
#~ " <property name=\"price\"/>\n"
#~ " <property name=\"quantity\"/>\n"
#~ " <many-to-one name=\"item\" class=\"eg.Item\"/> <!-- "
#~ "class attribute is optional -->\n"
#~ " </composite-element>\n"
#~ " </set>\n"
#~ "</class>"
#, fuzzy
#~ msgid ""
#~ "<![CDATA["
#~ msgstr ""
#~ "<class name=\"eg.Order\" .... >\n"
#~ " ....\n"
#~ " <set name=\"purchasedItems\" table=\"purchase_items\" lazy=\"true"
#~ "\">\n"
#~ " <key column=\"order_id\">\n"
#~ " <composite-element class=\"eg.OrderLine\">\n"
#~ " <many-to-one name=\"purchaseDetails class=\"eg.Purchase\"/"
#~ ">\n"
#~ " <many-to-one name=\"item\" class=\"eg.Item\"/>\n"
#~ " </composite-element>\n"
#~ " </set>\n"
#~ "</class>"
#, fuzzy
#~ msgid ""
#~ "<![CDATA["
#~ msgstr ""
#~ "<class name=\"OrderLine\">\n"
#~ " \n"
#~ " <composite-id name=\"id\" class=\"OrderLineId\">\n"
#~ " <key-property name=\"lineId\"/>\n"
#~ " <key-property name=\"orderId\"/>\n"
#~ " <key-property name=\"customerId\"/>\n"
#~ " </composite-id>\n"
#~ " \n"
#~ " <property name=\"name\"/>\n"
#~ " \n"
#~ " <many-to-one name=\"order\" class=\"Order\"\n"
#~ " insert=\"false\" update=\"false\">\n"
#~ " <column name=\"orderId\"/>\n"
#~ " <column name=\"customerId\"/>\n"
#~ " </many-to-one>\n"
#~ " ....\n"
#~ " \n"
#~ "</class>"
#, fuzzy
#~ msgid ""
#~ "<![CDATA["
#~ msgstr ""
#~ "<many-to-one name=\"orderLine\" class=\"OrderLine\">\n"
#~ "<!-- the \"class\" attribute is optional, as usual -->\n"
#~ " <column name=\"lineId\"/>\n"
#~ " <column name=\"orderId\"/>\n"
#~ " <column name=\"customerId\"/>\n"
#~ "</many-to-one>"
#, fuzzy
#~ msgid ""
#~ "<![CDATA["
#~ msgstr ""
#~ "<set name=\"undeliveredOrderLines\">\n"
#~ " <key column name=\"warehouseId\"/>\n"
#~ " <many-to-many class=\"OrderLine\">\n"
#~ " <column name=\"lineId\"/>\n"
#~ " <column name=\"orderId\"/>\n"
#~ " <column name=\"customerId\"/>\n"
#~ " </many-to-many>\n"
#~ "</set>"
#, fuzzy
#~ msgid ""
#~ "<![CDATA["
#~ msgstr ""
#~ "<set name=\"orderLines\" inverse=\"true\">\n"
#~ " <key>\n"
#~ " <column name=\"orderId\"/>\n"
#~ " <column name=\"customerId\"/>\n"
#~ " </key>\n"
#~ " <one-to-many class=\"OrderLine\"/>\n"
#~ "</set>"
#, fuzzy
#~ msgid ""
#~ "<![CDATA[\n"
#~ " <column name=\"lineId\"/>\n"
#~ " <column name=\"orderId\"/>\n"
#~ " <column name=\"customerId\"/>\n"
#~ " </key>\n"
#~ " <list-index column=\"attemptId\" base=\"1\"/>\n"
#~ " <composite-element class=\"DeliveryAttempt\">\n"
#~ " ...\n"
#~ " </composite-element>\n"
#~ " </set>\n"
#~ "</class>]]>"
#~ msgstr ""
#~ "<class name=\"OrderLine\">\n"
#~ " ....\n"
#~ " ....\n"
#~ " <list name=\"deliveryAttempts\">\n"
#~ " <key> <!-- a collection inherits the composite key "
#~ "type -->\n"
#~ " <column name=\"lineId\"/>\n"
#~ " <column name=\"orderId\"/>\n"
#~ " <column name=\"customerId\"/>\n"
#~ " </key>\n"
#~ " <list-index column=\"attemptId\" base=\"1\"/>\n"
#~ " <composite-element class=\"DeliveryAttempt\">\n"
#~ " ...\n"
#~ " </composite-element>\n"
#~ " </set>\n"
#~ "</class>"
#, fuzzy
#~ msgid ""
#~ "<![CDATA["
#~ msgstr ""
#~ "<dynamic-component name=\"userAttributes\">\n"
#~ " <property name=\"foo\" column=\"FOO\" type=\"string\"/>\n"
#~ " <property name=\"bar\" column=\"BAR\" type=\"integer\"/>\n"
#~ " <many-to-one name=\"baz\" class=\"Baz\" column=\"BAZ_ID\"/>\n"
#~ "</dynamic-component>"
Other Hibernate examples (source code examples)
Here is a short list of links related to this Hibernate component_mapping.po source code file:
|