diff --git a/documentation/manual/src/main/docbook/de-DE/content/basic_mapping.po b/documentation/manual/src/main/docbook/de-DE/content/basic_mapping.po index 8ea584f33a..59697fdb62 100644 --- a/documentation/manual/src/main/docbook/de-DE/content/basic_mapping.po +++ b/documentation/manual/src/main/docbook/de-DE/content/basic_mapping.po @@ -275,7 +275,7 @@ msgid "" msgstr "" "Project-Id-Version: Collection_Mapping\n" "Report-Msgid-Bugs-To: http://bugs.kde.org\n" -"POT-Creation-Date: 2010-07-20 21:02+0000\n" +"POT-Creation-Date: 2011-01-21 21:18+0000\n" "PO-Revision-Date: 2007-02-26 10:27+1000\n" "Last-Translator: \n" "Language-Team: \n" @@ -454,8 +454,7 @@ msgid "" "<?xml version=\"1.0\"?>\n" "<!DOCTYPE hibernate-mapping PUBLIC\n" " \"-//Hibernate/Hibernate Mapping DTD 3.0//EN\"\n" -" \"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd" -"\">\n" +" \"http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd\">\n" "\n" "<hibernate-mapping package=\"eg\">\n" "\n" @@ -1111,7 +1110,7 @@ msgstr "" "literal>): Legt fest, dass die Instanzen der Klasse (nicht) variabel sind." #. Tag: para -#: basic_mapping.xml:349 basic_mapping.xml:2912 +#: basic_mapping.xml:349 basic_mapping.xml:2948 #, fuzzy, no-c-format msgid "" "schema (optional): overrides the schema name specified by " @@ -1122,7 +1121,7 @@ msgstr "" "Schemanamen außer Kraft." #. Tag: para -#: basic_mapping.xml:355 basic_mapping.xml:2918 +#: basic_mapping.xml:355 basic_mapping.xml:2954 #, fuzzy, no-c-format msgid "" "catalog (optional): overrides the catalog name specified " @@ -1472,7 +1471,7 @@ msgid "" msgstr "name (optional): Name der Bezeichner-Property." #. Tag: para -#: basic_mapping.xml:518 basic_mapping.xml:2141 +#: basic_mapping.xml:518 basic_mapping.xml:2152 #, no-c-format msgid "" "type (optional): a name that indicates the Hibernate type." @@ -3840,8 +3839,8 @@ msgstr "Zeitstempel (optional)" #, fuzzy, no-c-format msgid "" "Alternatively, you can use a timestamp. Timestamps are a less safe " -"implementation of optimistic locking. However, sometimes the application " -"might use the timestamps in other ways." +"implementation of optimistic locking. However, sometimes an application " +"might use the timestamps in other ways as well." msgstr "" "Das optionale <timestamp>-Element zeigt an, dass " "die Tabelle Daten mit Zeitstempel enthält. Dies ist als Alternative zur " @@ -3873,20 +3872,34 @@ msgstr "" #: basic_mapping.xml:1598 #, no-c-format msgid "" -"Like version numbers, the timestamp can be generated by the database instead " -"of Hibernate. To do that, use @org.hibernate.annotations.Generated" -"(GenerationTime.ALWAYS)." +"When using timestamp versioning you can tell Hibernate where to retrieve the " +"timestamp value from - database or JVM - by optionally adding the " +"@org.hibernate.annotations.Source annotation to the " +"property. Possible values for the value attribute of the annotation are " +"org.hibernate.annotations.SourceType.VM and " +"org.hibernate.annotations.SourceType.DB. The default " +"is SourceType.DB which is also used in case there is " +"no @Source annotation at all." msgstr "" #. Tag: para -#: basic_mapping.xml:1602 +#: basic_mapping.xml:1609 +#, no-c-format +msgid "" +"Like in the case of version numbers, the timestamp can also be generated by " +"the database instead of Hibernate. To do that, use @org.hibernate." +"annotations.Generated(GenerationTime.ALWAYS)." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1613 #, fuzzy, no-c-format msgid "In hbm.xml, use the <timestamp> element:" msgstr "" "Nehmen wir etwa das folgende <properties>-Mapping:" #. Tag: programlisting -#: basic_mapping.xml:1620 +#: basic_mapping.xml:1631 #, fuzzy, no-c-format msgid "" "<timestamp\n" @@ -3910,7 +3923,7 @@ msgstr "" "/>" #. Tag: para -#: basic_mapping.xml:1624 +#: basic_mapping.xml:1635 #, fuzzy, no-c-format msgid "" "column (optional - defaults to the property name): the " @@ -3920,7 +3933,7 @@ msgstr "" "Property-Name): Der Name einer Spalte, die den Zeitstempel enthält." #. Tag: para -#: basic_mapping.xml:1630 +#: basic_mapping.xml:1641 #, fuzzy, no-c-format msgid "" "name: the name of a JavaBeans style property of Java type " @@ -3932,8 +3945,8 @@ msgstr "" "persistenten Klasse." #. Tag: para -#: basic_mapping.xml:1636 basic_mapping.xml:2163 basic_mapping.xml:2380 -#: basic_mapping.xml:3226 basic_mapping.xml:3420 basic_mapping.xml:3593 +#: basic_mapping.xml:1647 basic_mapping.xml:2174 basic_mapping.xml:2391 +#: basic_mapping.xml:3262 basic_mapping.xml:3456 basic_mapping.xml:3629 #, fuzzy, no-c-format msgid "" "access (optional - defaults to propertyunsaved-value (optional - defaults to nullsource (optional - defaults to vm): " @@ -3985,7 +3998,7 @@ msgstr "" "8)." #. Tag: para -#: basic_mapping.xml:1665 +#: basic_mapping.xml:1676 #, fuzzy, no-c-format msgid "" "generated (optional - defaults to never." #. Tag: title -#: basic_mapping.xml:1675 +#: basic_mapping.xml:1686 #, no-c-format msgid "Note" msgstr "" #. Tag: para -#: basic_mapping.xml:1677 +#: basic_mapping.xml:1688 #, fuzzy, no-c-format msgid "" "<Timestamp> is equivalent to <version " @@ -4019,13 +4032,13 @@ msgstr "" "type=\"dbtimestamp\"> ist" #. Tag: title -#: basic_mapping.xml:1686 +#: basic_mapping.xml:1697 #, fuzzy, no-c-format msgid "Property" msgstr "property" #. Tag: para -#: basic_mapping.xml:1688 +#: basic_mapping.xml:1699 #, no-c-format msgid "" "You need to decide which property needs to be made persistent in a given " @@ -4034,13 +4047,13 @@ msgid "" msgstr "" #. Tag: title -#: basic_mapping.xml:1693 +#: basic_mapping.xml:1704 #, no-c-format msgid "Property mapping with annotations" msgstr "" #. Tag: para -#: basic_mapping.xml:1695 +#: basic_mapping.xml:1706 #, no-c-format msgid "" "In the annotations world, every non static non transient property (field or " @@ -4051,7 +4064,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:1702 +#: basic_mapping.xml:1713 #, no-c-format msgid "" "The @Basic annotation allows you to declare the fetching " @@ -4067,13 +4080,13 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:1715 +#: basic_mapping.xml:1726 #, no-c-format msgid "Let's look at a few examples:" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:1717 +#: basic_mapping.xml:1728 #, no-c-format msgid "" "public transient int counter; //transient property\n" @@ -4099,7 +4112,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:1719 +#: basic_mapping.xml:1730 #, no-c-format msgid "" "counter, a transient field, and lengthInMeter@Lob indicates that the property should be persisted in a " @@ -4154,7 +4167,7 @@ msgid "" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:1759 +#: basic_mapping.xml:1770 #, no-c-format msgid "" "@Lob\n" @@ -4169,7 +4182,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:1761 +#: basic_mapping.xml:1772 #, no-c-format msgid "" "If the property type implements java.io.Serializable " @@ -4179,13 +4192,13 @@ msgid "" msgstr "" #. Tag: title -#: basic_mapping.xml:1768 +#: basic_mapping.xml:1779 #, no-c-format msgid "Type" msgstr "" #. Tag: para -#: basic_mapping.xml:1770 +#: basic_mapping.xml:1781 #, no-c-format msgid "" "You can also manually specify a type using the @org.hibernate." @@ -4194,7 +4207,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:1777 basic_mapping.xml:2209 +#: basic_mapping.xml:1788 basic_mapping.xml:2220 #, fuzzy, no-c-format msgid "" "The name of a Hibernate basic type: integer, string, character, " @@ -4205,7 +4218,7 @@ msgstr "" "literal>)." #. Tag: para -#: basic_mapping.xml:1783 basic_mapping.xml:2215 +#: basic_mapping.xml:1794 basic_mapping.xml:2226 #, fuzzy, no-c-format msgid "" "The name of a Java class with a default basic type: int, float, " @@ -4217,13 +4230,13 @@ msgstr "" "Integer, java.sql.Clob)." #. Tag: para -#: basic_mapping.xml:1789 basic_mapping.xml:2221 +#: basic_mapping.xml:1800 basic_mapping.xml:2232 #, no-c-format msgid "The name of a serializable Java class." msgstr "Der Name einer serialisierbaren Java-Klasse." #. Tag: para -#: basic_mapping.xml:1793 basic_mapping.xml:2225 +#: basic_mapping.xml:1804 basic_mapping.xml:2236 #, fuzzy, no-c-format msgid "" "The class name of a custom type: com.illflow.type.MyCustomType)." #. Tag: para -#: basic_mapping.xml:1798 +#: basic_mapping.xml:1809 #, fuzzy, no-c-format msgid "" "If you do not specify a type, Hibernate will use reflection upon the named " @@ -4251,7 +4264,7 @@ msgstr "" "zu unterscheiden oder einen anwenderdefinierten Typ zu bestimmen)." #. Tag: para -#: basic_mapping.xml:1803 +#: basic_mapping.xml:1814 #, no-c-format msgid "" "@org.hibernate.annotations.TypeDef and @org." @@ -4270,7 +4283,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:1819 +#: basic_mapping.xml:1830 #, no-c-format msgid "" "Package level annotations are placed in a file named package-info." @@ -4279,7 +4292,7 @@ msgid "" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:1824 +#: basic_mapping.xml:1835 #, no-c-format msgid "" "@TypeDef(\n" @@ -4299,7 +4312,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:1826 +#: basic_mapping.xml:1837 #, no-c-format msgid "" "The following example shows the usage of the parameters " @@ -4307,7 +4320,7 @@ msgid "" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:1830 +#: basic_mapping.xml:1841 #, no-c-format msgid "" "//in org/hibernate/test/annotations/entity/package-info.java\n" @@ -4333,7 +4346,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:1832 +#: basic_mapping.xml:1843 #, no-c-format msgid "" "When using composite user type, you will have to express column definitions. " @@ -4341,7 +4354,7 @@ msgid "" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:1836 +#: basic_mapping.xml:1847 #, no-c-format msgid "" "@Type(type=\"org.hibernate.test.annotations.entity.MonetaryAmountUserType" @@ -4363,13 +4376,13 @@ msgid "" msgstr "" #. Tag: title -#: basic_mapping.xml:1840 +#: basic_mapping.xml:1851 #, no-c-format msgid "Access type" msgstr "" #. Tag: para -#: basic_mapping.xml:1842 +#: basic_mapping.xml:1853 #, no-c-format msgid "" "By default the access type of a class hierarchy is defined by the position " @@ -4382,7 +4395,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:1850 +#: basic_mapping.xml:1861 #, no-c-format msgid "" "The placement of annotations within a class hierarchy has to be consistent " @@ -4392,31 +4405,31 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:1857 +#: basic_mapping.xml:1868 #, no-c-format msgid "However in some situations, you need to:" msgstr "" #. Tag: para -#: basic_mapping.xml:1861 +#: basic_mapping.xml:1872 #, no-c-format msgid "force the access type of the entity hierarchy" msgstr "" #. Tag: para -#: basic_mapping.xml:1865 +#: basic_mapping.xml:1876 #, no-c-format msgid "override the access type of a specific entity in the class hierarchy" msgstr "" #. Tag: para -#: basic_mapping.xml:1870 +#: basic_mapping.xml:1881 #, no-c-format msgid "override the access type of an embeddable type" msgstr "" #. Tag: para -#: basic_mapping.xml:1874 +#: basic_mapping.xml:1885 #, no-c-format msgid "" "The best use case is an embeddable class used by several entities that might " @@ -4425,7 +4438,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:1879 +#: basic_mapping.xml:1890 #, no-c-format msgid "" "To force the access type on a given class, use the @AccessFIELD " @@ -4506,13 +4519,13 @@ msgid "" msgstr "" #. Tag: title -#: basic_mapping.xml:1896 +#: basic_mapping.xml:1907 #, no-c-format msgid "@org.hibernate.annotations.AccessType" msgstr "" #. Tag: para -#: basic_mapping.xml:1898 +#: basic_mapping.xml:1909 #, no-c-format msgid "" "The annotation @org.hibernate.annotations.AccessType " @@ -4521,13 +4534,13 @@ msgid "" msgstr "" #. Tag: title -#: basic_mapping.xml:1907 +#: basic_mapping.xml:1918 #, no-c-format msgid "Optimistic lock" msgstr "" #. Tag: para -#: basic_mapping.xml:1909 +#: basic_mapping.xml:1920 #, no-c-format msgid "" "It is sometimes useful to avoid increasing the version number even if a " @@ -4537,7 +4550,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:1914 +#: basic_mapping.xml:1925 #, no-c-format msgid "" "More formally, specifies that updates to this property do not require " @@ -4545,13 +4558,13 @@ msgid "" msgstr "" #. Tag: title -#: basic_mapping.xml:1919 +#: basic_mapping.xml:1930 #, no-c-format msgid "Declaring column attributes" msgstr "" #. Tag: para -#: basic_mapping.xml:1921 +#: basic_mapping.xml:1932 #, no-c-format msgid "" "The column(s) used for a property mapping can be defined using the " @@ -4561,37 +4574,37 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:1929 +#: basic_mapping.xml:1940 #, no-c-format msgid "not annotated at all" msgstr "" #. Tag: para -#: basic_mapping.xml:1933 +#: basic_mapping.xml:1944 #, fuzzy, no-c-format msgid "annotated with @Basic" msgstr "name: Der Property-Name." #. Tag: para -#: basic_mapping.xml:1937 +#: basic_mapping.xml:1948 #, fuzzy, no-c-format msgid "annotated with @Version" msgstr "name: Der Property-Name." #. Tag: para -#: basic_mapping.xml:1941 +#: basic_mapping.xml:1952 #, fuzzy, no-c-format msgid "annotated with @Lob" msgstr "all Prüfung aller Spalten" #. Tag: para -#: basic_mapping.xml:1945 +#: basic_mapping.xml:1956 #, fuzzy, no-c-format msgid "annotated with @Temporal" msgstr "all Prüfung aller Spalten" #. Tag: programlisting -#: basic_mapping.xml:1949 +#: basic_mapping.xml:1960 #, no-c-format msgid "" "@Entity\n" @@ -4603,7 +4616,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:1951 +#: basic_mapping.xml:1962 #, no-c-format msgid "" "The name property is mapped to the flight_namename (optional): the column name (default to the property " @@ -4645,7 +4658,7 @@ msgid "" msgstr "name (optional): Name der Bezeichner-Property." #. Tag: para -#: basic_mapping.xml:1992 +#: basic_mapping.xml:2003 #, fuzzy, no-c-format msgid "" "unique (optional): set a unique constraint on this column " @@ -4656,7 +4669,7 @@ msgstr "" "\") einer property-ref sein." #. Tag: para -#: basic_mapping.xml:1997 +#: basic_mapping.xml:2008 #, fuzzy, no-c-format msgid "" "nullable (optional): set the column as nullable (default " @@ -4664,7 +4677,7 @@ msgid "" msgstr "name (optional): Name der Bezeichner-Property." #. Tag: para -#: basic_mapping.xml:2002 +#: basic_mapping.xml:2013 #, fuzzy, no-c-format msgid "" "insertable (optional): whether or not the column will be " @@ -4672,7 +4685,7 @@ msgid "" msgstr "name (optional): Name der Bezeichner-Property." #. Tag: para -#: basic_mapping.xml:2008 +#: basic_mapping.xml:2019 #, fuzzy, no-c-format msgid "" "updatable (optional): whether or not the column will be " @@ -4681,7 +4694,7 @@ msgstr "" "catalog (optional): Der Name eines Datenbankkatalogs." #. Tag: para -#: basic_mapping.xml:2014 +#: basic_mapping.xml:2025 #, no-c-format msgid "" "columnDefinition (optional): override the sql DDL " @@ -4689,7 +4702,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2020 +#: basic_mapping.xml:2031 #, fuzzy, no-c-format msgid "" "table (optional): define the targeted table (default " @@ -4698,7 +4711,7 @@ msgstr "" "catalog (optional): Der Name eines Datenbankkatalogs." #. Tag: para -#: basic_mapping.xml:2025 +#: basic_mapping.xml:2036 #, no-c-format msgid "" "length (optional): column length " @@ -4706,7 +4719,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2030 +#: basic_mapping.xml:2041 #, no-c-format msgid "" "precision (optional): column decimal " @@ -4714,7 +4727,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2035 +#: basic_mapping.xml:2046 #, no-c-format msgid "" "scale (optional): column decimal scale " @@ -4722,13 +4735,13 @@ msgid "" msgstr "" #. Tag: title -#: basic_mapping.xml:2043 +#: basic_mapping.xml:2054 #, no-c-format msgid "Formula" msgstr "" #. Tag: para -#: basic_mapping.xml:2045 +#: basic_mapping.xml:2056 #, no-c-format msgid "" "Sometimes, you want the Database to do some computation for you rather than " @@ -4739,7 +4752,7 @@ msgid "" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:2051 +#: basic_mapping.xml:2062 #, no-c-format msgid "" "@Formula(\"obj_length * obj_height * obj_width\")\n" @@ -4747,32 +4760,32 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2053 +#: basic_mapping.xml:2064 #, no-c-format msgid "" "The SQL fragment can be as complex as you want and even include subselects." msgstr "" #. Tag: title -#: basic_mapping.xml:2058 +#: basic_mapping.xml:2069 #, no-c-format msgid "Non-annotated property defaults" msgstr "" #. Tag: para -#: basic_mapping.xml:2060 +#: basic_mapping.xml:2071 #, no-c-format msgid "If a property is not annotated, the following rules apply:" msgstr "" #. Tag: para -#: basic_mapping.xml:2063 +#: basic_mapping.xml:2074 #, no-c-format msgid "If the property is of a single type, it is mapped as @Basic" msgstr "" #. Tag: para -#: basic_mapping.xml:2068 +#: basic_mapping.xml:2079 #, no-c-format msgid "" "Otherwise, if the type of the property is annotated as @Embeddable, it is " @@ -4780,7 +4793,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2073 +#: basic_mapping.xml:2084 #, no-c-format msgid "" "Otherwise, if the type of the property is Serializablejava.sql.Clob<property> element declares a persistent " @@ -4815,7 +4828,7 @@ msgstr "" "Property der Klasse nach Art von JavaBean." #. Tag: programlisting -#: basic_mapping.xml:2125 +#: basic_mapping.xml:2136 #, fuzzy, no-c-format msgid "" "<property\n" @@ -4861,7 +4874,7 @@ msgstr "" "/>" #. Tag: para -#: basic_mapping.xml:2129 +#: basic_mapping.xml:2140 #, no-c-format msgid "" "name: the name of the property, with an initial lowercase " @@ -4871,7 +4884,7 @@ msgstr "" "Anfangsbuchstaben." #. Tag: para -#: basic_mapping.xml:2134 +#: basic_mapping.xml:2145 #, fuzzy, no-c-format msgid "" "column (optional - defaults to the property name): the " @@ -4884,7 +4897,7 @@ msgstr "" "spezifiziert werden." #. Tag: para -#: basic_mapping.xml:2146 +#: basic_mapping.xml:2157 #, fuzzy, no-c-format msgid "" "update, insert (optional - defaults to trueformula (optional): an SQL expression that defines the " @@ -4915,7 +4928,7 @@ msgstr "" "Properties besitzen kein eigenes Spalten-Mapping." #. Tag: para -#: basic_mapping.xml:2169 +#: basic_mapping.xml:2180 #, fuzzy, no-c-format msgid "" "lazy (optional - defaults to false): " @@ -4929,7 +4942,7 @@ msgstr "" "Build-time Bytecode Instrumentierung)." #. Tag: para -#: basic_mapping.xml:2176 +#: basic_mapping.xml:2187 #, fuzzy, no-c-format msgid "" "unique (optional): enables the DDL generation of a unique " @@ -4941,7 +4954,7 @@ msgstr "" "\") einer property-ref sein." #. Tag: para -#: basic_mapping.xml:2183 +#: basic_mapping.xml:2194 #, fuzzy, no-c-format msgid "" "not-null (optional): enables the DDL generation of a " @@ -4951,7 +4964,7 @@ msgstr "" "\"Nullability\"-Bedingung für die Spalten." #. Tag: para -#: basic_mapping.xml:2188 basic_mapping.xml:3246 +#: basic_mapping.xml:2199 basic_mapping.xml:3282 #, fuzzy, no-c-format msgid "" "optimistic-lock (optional - defaults to truegenerated (optional - defaults to never." #. Tag: para -#: basic_mapping.xml:2205 +#: basic_mapping.xml:2216 #, no-c-format msgid "typename could be:" msgstr "typename könnte sein:" #. Tag: para -#: basic_mapping.xml:2230 +#: basic_mapping.xml:2241 #, fuzzy, no-c-format msgid "" "If you do not specify a type, Hibernate will use reflection upon the named " @@ -5008,7 +5021,7 @@ msgstr "" "zu unterscheiden oder einen anwenderdefinierten Typ zu bestimmen)." #. Tag: para -#: basic_mapping.xml:2239 +#: basic_mapping.xml:2250 #, fuzzy, no-c-format msgid "" "The access attribute allows you to control how Hibernate " @@ -5029,7 +5042,7 @@ msgstr "" "hibernate.property.PropertyAccessor implementiert." #. Tag: para -#: basic_mapping.xml:2248 +#: basic_mapping.xml:2259 #, fuzzy, no-c-format msgid "" "A powerful feature is derived properties. These properties are by definition " @@ -5044,7 +5057,7 @@ msgstr "" "eine Instanz ladenden SQL-Anfrage übersetzt wird:" #. Tag: programlisting -#: basic_mapping.xml:2254 +#: basic_mapping.xml:2265 #, fuzzy, no-c-format msgid "" "<property name=\"totalPrice\"\n" @@ -5062,7 +5075,7 @@ msgstr "" " AND li.orderNumber = orderNumber )\"/>" #. Tag: para -#: basic_mapping.xml:2256 +#: basic_mapping.xml:2267 #, fuzzy, no-c-format msgid "" "You can reference the entity table by not declaring an alias on a particular " @@ -5077,13 +5090,13 @@ msgstr "" "Mapping-Element statt des Attributs verwenden können." #. Tag: title -#: basic_mapping.xml:2265 +#: basic_mapping.xml:2276 #, no-c-format msgid "Embedded objects (aka components)" msgstr "" #. Tag: para -#: basic_mapping.xml:2267 +#: basic_mapping.xml:2278 #, fuzzy, no-c-format msgid "" "Embeddable objects (or components) are objects whose properties are mapped " @@ -5096,7 +5109,7 @@ msgstr "" "oder \"Collections\" deklarieren. Siehe \"Komponenten\" unten." #. Tag: para -#: basic_mapping.xml:2272 +#: basic_mapping.xml:2283 #, no-c-format msgid "" "It is possible to declare an embedded component inside an entity and even " @@ -5108,7 +5121,7 @@ msgid "" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:2280 +#: basic_mapping.xml:2291 #, no-c-format msgid "" "@Entity\n" @@ -5130,7 +5143,7 @@ msgid "" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:2282 +#: basic_mapping.xml:2293 #, no-c-format msgid "" "@Embeddable\n" @@ -5141,7 +5154,7 @@ msgid "" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:2284 +#: basic_mapping.xml:2295 #, no-c-format msgid "" "@Embeddable\n" @@ -5160,7 +5173,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2286 +#: basic_mapping.xml:2297 #, no-c-format msgid "" "An embeddable object inherits the access type of its owning entity (note " @@ -5168,7 +5181,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2290 +#: basic_mapping.xml:2301 #, no-c-format msgid "" "The Person entity has two component properties, " @@ -5186,7 +5199,7 @@ msgid "" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:2305 +#: basic_mapping.xml:2316 #, no-c-format msgid "" "@Embedded\n" @@ -5203,7 +5216,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2307 +#: basic_mapping.xml:2318 #, no-c-format msgid "" "Hibernate Annotations supports something that is not explicitly supported by " @@ -5214,7 +5227,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2313 +#: basic_mapping.xml:2324 #, no-c-format msgid "" "You can also use association annotations in an embeddable object (ie " @@ -5225,7 +5238,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2319 +#: basic_mapping.xml:2330 #, no-c-format msgid "" "If you want to have the same embeddable object type twice in the same " @@ -5239,7 +5252,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2329 +#: basic_mapping.xml:2340 #, no-c-format msgid "" "If a property of the embedded object points back to the owning entity, " @@ -5248,13 +5261,13 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2334 +#: basic_mapping.xml:2345 #, no-c-format msgid "In XML, use the <component> element." msgstr "" #. Tag: programlisting -#: basic_mapping.xml:2356 +#: basic_mapping.xml:2367 #, fuzzy, no-c-format msgid "" "<component\n" @@ -5292,13 +5305,13 @@ msgstr "" "</component>" #. Tag: para -#: basic_mapping.xml:2360 basic_mapping.xml:3181 basic_mapping.xml:3381 +#: basic_mapping.xml:2371 basic_mapping.xml:3217 basic_mapping.xml:3417 #, fuzzy, no-c-format msgid "name: the name of the property." msgstr "name: Der Name der Property." #. Tag: para -#: basic_mapping.xml:2364 +#: basic_mapping.xml:2375 #, fuzzy, no-c-format msgid "" "class (optional - defaults to the property type " @@ -5309,7 +5322,7 @@ msgstr "" "Komponentenklasse." #. Tag: para -#: basic_mapping.xml:2370 basic_mapping.xml:3641 +#: basic_mapping.xml:2381 basic_mapping.xml:3677 #, fuzzy, no-c-format msgid "" "insert: do the mapped columns appear in SQL " @@ -5319,7 +5332,7 @@ msgstr "" "INSERTs?" #. Tag: para -#: basic_mapping.xml:2375 basic_mapping.xml:3646 +#: basic_mapping.xml:2386 basic_mapping.xml:3682 #, fuzzy, no-c-format msgid "" "update: do the mapped columns appear in SQL " @@ -5329,7 +5342,7 @@ msgstr "" "UPDATEs?" #. Tag: para -#: basic_mapping.xml:2386 +#: basic_mapping.xml:2397 #, fuzzy, no-c-format msgid "" "lazy (optional - defaults to false): " @@ -5342,7 +5355,7 @@ msgstr "" "(erfordert Build-time Bytecode Instrumentierung)." #. Tag: para -#: basic_mapping.xml:2393 +#: basic_mapping.xml:2404 #, fuzzy, no-c-format msgid "" "optimistic-lock (optional - defaults to trueunique (optional - defaults to false): " @@ -5370,7 +5383,7 @@ msgstr "" "gemappten Spalten der Komponente existiert." #. Tag: para -#: basic_mapping.xml:2408 +#: basic_mapping.xml:2419 #, no-c-format msgid "" "The child <property> tags map properties of the " @@ -5380,7 +5393,7 @@ msgstr "" "Properties der untergeordneten Klasse zu den Spalten der Tabelle." #. Tag: para -#: basic_mapping.xml:2411 +#: basic_mapping.xml:2422 #, no-c-format msgid "" "The <component> element allows a <" @@ -5392,7 +5405,7 @@ msgstr "" "Rückreferenz zur enthaltenden Entity mappt." #. Tag: para -#: basic_mapping.xml:2415 +#: basic_mapping.xml:2426 #, fuzzy, no-c-format msgid "" "The <dynamic-component> element allows a " @@ -5406,13 +5419,13 @@ msgstr "" "dynamic\"/>." #. Tag: title -#: basic_mapping.xml:2423 +#: basic_mapping.xml:2434 #, no-c-format msgid "Inheritance strategy" msgstr "" #. Tag: para -#: basic_mapping.xml:2425 +#: basic_mapping.xml:2436 #, no-c-format msgid "" "Java is a language supporting polymorphism: a class can inherit from " @@ -5420,7 +5433,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2431 +#: basic_mapping.xml:2442 #, no-c-format msgid "" "Single table per class hierarchy strategy: a single table hosts all the " @@ -5428,7 +5441,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2436 +#: basic_mapping.xml:2447 #, no-c-format msgid "" "Joined subclass strategy: one table per class and subclass is present and " @@ -5438,7 +5451,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2443 +#: basic_mapping.xml:2454 #, no-c-format msgid "" "Table per class strategy: one table per concrete class and subclass is " @@ -5448,13 +5461,13 @@ msgid "" msgstr "" #. Tag: title -#: basic_mapping.xml:2451 +#: basic_mapping.xml:2462 #, no-c-format msgid "Single table per class hierarchy strategy" msgstr "" #. Tag: para -#: basic_mapping.xml:2453 +#: basic_mapping.xml:2464 #, no-c-format msgid "" "With this approach the properties of all the subclasses in a given mapped " @@ -5462,7 +5475,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2456 +#: basic_mapping.xml:2467 #, fuzzy, no-c-format msgid "" "Each subclass declares its own persistent properties and subclasses. Version " @@ -5478,7 +5491,7 @@ msgstr "" "wird der vollständige Java Klassenname verwendet." #. Tag: programlisting -#: basic_mapping.xml:2462 basic_mapping.xml:2540 +#: basic_mapping.xml:2473 basic_mapping.xml:2581 #, no-c-format msgid "" "@Entity\n" @@ -5496,7 +5509,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2464 +#: basic_mapping.xml:2475 #, fuzzy, no-c-format msgid "" "In hbm.xml, for the table-per-class-hierarchy mapping strategy, the " @@ -5508,7 +5521,7 @@ msgstr "" "<subclass>-Deklaration verwendet." #. Tag: programlisting -#: basic_mapping.xml:2479 +#: basic_mapping.xml:2490 #, fuzzy, no-c-format msgid "" "<subclass\n" @@ -5542,14 +5555,14 @@ msgstr "" "</subclass>" #. Tag: para -#: basic_mapping.xml:2483 basic_mapping.xml:2656 basic_mapping.xml:2720 +#: basic_mapping.xml:2494 basic_mapping.xml:2692 basic_mapping.xml:2756 #, fuzzy, no-c-format msgid "" "name: the fully qualified class name of the subclass." msgstr "name: Der vollständige Klassenname der Subklasse." #. Tag: para -#: basic_mapping.xml:2488 +#: basic_mapping.xml:2499 #, fuzzy, no-c-format msgid "" "discriminator-value (optional - defaults to the class " @@ -5559,7 +5572,7 @@ msgstr "" "ist der Klassenname): Ein Wert, der einzelne Subklassen unterscheidet." #. Tag: para -#: basic_mapping.xml:2494 +#: basic_mapping.xml:2505 #, fuzzy, no-c-format msgid "" "proxy (optional): specifies a class or interface used for " @@ -5570,7 +5583,7 @@ msgstr "" "\"lazy initializing proxies\") verwendet werden soll." #. Tag: para -#: basic_mapping.xml:2499 +#: basic_mapping.xml:2510 #, fuzzy, no-c-format msgid "" "lazy (optional - defaults to true): " @@ -5581,7 +5594,7 @@ msgstr "" "deaktiviert die Verwendung von \"Lazy Fetching\"." #. Tag: para -#: basic_mapping.xml:2507 basic_mapping.xml:2685 basic_mapping.xml:2746 +#: basic_mapping.xml:2518 basic_mapping.xml:2721 basic_mapping.xml:2782 #, fuzzy, no-c-format msgid "" "For information about inheritance mappings see ." #. Tag: title -#: basic_mapping.xml:2511 +#: basic_mapping.xml:2522 #, fuzzy, no-c-format msgid "Discriminator" msgstr "discriminator" #. Tag: para -#: basic_mapping.xml:2513 +#: basic_mapping.xml:2524 #, fuzzy, no-c-format msgid "" "Discriminators are required for polymorphic persistence using the table-per-" "class-hierarchy mapping strategy. It declares a discriminator column of the " "table. The discriminator column contains marker values that tell the " -"persistence layer what subclass to instantiate for a particular row. A " -"restricted set of types can be used: string, " -"character, integer, byte, short, boolean, " -"yes_no, true_false." +"persistence layer what subclass to instantiate for a particular row. " +"Hibernate Core supports the follwoing restricted set of types as " +"discriminator column: string, character, integer, byte, " +"short, boolean, yes_no, true_false." msgstr "" "Das <discriminator>-Element wird für die polymorphe " "Persistenz unter Verwendung der Tabelle-pro-Klasse-Hierarchie (sog. \"table-" @@ -5621,21 +5635,56 @@ msgstr "" "yes_no, true_false." #. Tag: para -#: basic_mapping.xml:2523 +#: basic_mapping.xml:2535 #, no-c-format msgid "" "Use the @DiscriminatorColumn to define the " -"discriminator column as well as the discriminator type. Alternatively, you " -"can also use @DiscriminatorFormula to express in SQL " -"what would be in a virtual discriminator column. This is particularly handy " -"when the discriminator value can be extracted from one or more columns of " -"the table. Both @DiscriminatorColumn and " -"@DiscriminatorFormula are to be set on the root " -"entity (once per persisted hierarchy)." +"discriminator column as well as the discriminator type. " +"The enum DiscriminatorType used in " +"javax.persitence.DiscriminatorColumn only contains " +"the values STRING, CHAR and " +"INTEGER which means that not all Hibernate supported " +"types are available via the @DiscriminatorColumn " +"annotation. You can also use @DiscriminatorFormula to express in SQL a virtual discriminator column. This is " +"particularly useful when the discriminator value can be extracted from one " +"or more columns of the table. Both @DiscriminatorColumn and @DiscriminatorFormula are to be set on " +"the root entity (once per persisted hierarchy)." msgstr "" #. Tag: para -#: basic_mapping.xml:2534 +#: basic_mapping.xml:2552 +#, no-c-format +msgid "" +"@org.hibernate.annotations.DiscriminatorOptions " +"allows to optionally specify Hibernate specific discriminator options which " +"are not standardized in JPA. The available options are force and insert. The force " +"attribute is useful if the table contains rows with \"extra\" discriminator " +"values that are not mapped to a persistent class. This could for example " +"occur when working with a legacy database. If force is " +"set to true Hibernate will specify the allowed " +"discriminator values in the SELECT query, even when " +"retrieving all instances of the root class. The second option - " +"insert - tells Hibernate whether or not to include the " +"discriminator column in SQL INSERTs. Usually the column " +"should be part of the INSERT statement, but if your " +"discriminator column is also part of a mapped composite identifier you have " +"to set this option to false." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2569 +#, no-c-format +msgid "" +"There is also a @org.hibernate.annotations.ForceDiscriminator annotation which is deprecated since version 3.6. Use " +"@DiscriminatorOptions instead." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2575 #, no-c-format msgid "" "Finally, use @DiscriminatorValue on each class of the " @@ -5645,7 +5694,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2542 +#: basic_mapping.xml:2583 #, no-c-format msgid "" "In hbm.xml, the <discriminator> element is used to " @@ -5653,7 +5702,7 @@ msgid "" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:2559 +#: basic_mapping.xml:2600 #, fuzzy, no-c-format msgid "" "<discriminator\n" @@ -5673,7 +5722,7 @@ msgstr "" "/>" #. Tag: para -#: basic_mapping.xml:2563 +#: basic_mapping.xml:2604 #, fuzzy, no-c-format msgid "" "column (optional - defaults to class): " @@ -5683,7 +5732,7 @@ msgstr "" "class) der Name der Diskriminatorspalte." #. Tag: para -#: basic_mapping.xml:2569 +#: basic_mapping.xml:2610 #, fuzzy, no-c-format msgid "" "type (optional - defaults to string): " @@ -5693,7 +5742,7 @@ msgstr "" "string) ein Name, der den Hibernate-Typ angibt." #. Tag: para -#: basic_mapping.xml:2575 +#: basic_mapping.xml:2616 #, fuzzy, no-c-format msgid "" "force (optional - defaults to false): " @@ -5706,7 +5755,7 @@ msgstr "" "spezifizieren." #. Tag: para -#: basic_mapping.xml:2582 +#: basic_mapping.xml:2623 #, fuzzy, no-c-format msgid "" "insert (optional - defaults to true): " @@ -5721,7 +5770,7 @@ msgstr "" "INSERTs mit einzuschließen)." #. Tag: para -#: basic_mapping.xml:2590 +#: basic_mapping.xml:2631 #, fuzzy, no-c-format msgid "" "formula (optional): an arbitrary SQL expression that is " @@ -5733,7 +5782,7 @@ msgstr "" "Unterscheidung (sog. \"discrimination\")." #. Tag: para -#: basic_mapping.xml:2597 +#: basic_mapping.xml:2638 #, no-c-format msgid "" "Actual values of the discriminator column are specified by the " @@ -5745,20 +5794,7 @@ msgstr "" "literal> und <subclass>-Elemente spezifiziert." #. Tag: para -#: basic_mapping.xml:2602 -#, fuzzy, no-c-format -msgid "" -"The force attribute is only useful if the table contains " -"rows with \"extra\" discriminator values that are not mapped to a persistent " -"class. This will not usually be the case." -msgstr "" -"Das force-Attribut ist (nur) von Nutzen, wenn die Tabelle " -"eine Reihe mit \"zusätzlichen\" Diskriminatorwerten enthält, die nicht zu " -"einer persistenten Klasse gemappt sind. Dies ist in der Regel jedoch nicht " -"der Fall." - -#. Tag: para -#: basic_mapping.xml:2607 +#: basic_mapping.xml:2643 #, fuzzy, no-c-format msgid "" "The formula attribute allows you to declare an arbitrary " @@ -5768,7 +5804,7 @@ msgstr "" "Ausdruck deklarieren, der dann zur Evaluierung des Reihentyps verwendet wird:" #. Tag: programlisting -#: basic_mapping.xml:2611 +#: basic_mapping.xml:2647 #, fuzzy, no-c-format msgid "" "<discriminator\n" @@ -5780,13 +5816,13 @@ msgstr "" " type=\"integer\"/>" #. Tag: title -#: basic_mapping.xml:2616 +#: basic_mapping.xml:2652 #, fuzzy, no-c-format msgid "Joined subclass strategy" msgstr "joined-subclass" #. Tag: para -#: basic_mapping.xml:2618 +#: basic_mapping.xml:2654 #, fuzzy, no-c-format msgid "" "Each subclass can also be mapped to its own table. This is called the table-" @@ -5804,7 +5840,7 @@ msgstr "" "<joined-subclass>-Element verwendet." #. Tag: programlisting -#: basic_mapping.xml:2628 +#: basic_mapping.xml:2664 #, no-c-format msgid "" "@Entity @Table(name=\"CATS\")\n" @@ -5825,7 +5861,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2631 +#: basic_mapping.xml:2667 #, no-c-format msgid "" "The table name still defaults to the non qualified class name. Also if " @@ -5835,7 +5871,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2638 +#: basic_mapping.xml:2674 #, fuzzy, no-c-format msgid "" "In hbm.xml, use the <joined-subclass> element. For " @@ -5845,7 +5881,7 @@ msgstr "" "persistente Klasse deklarieren:" #. Tag: programlisting -#: basic_mapping.xml:2652 +#: basic_mapping.xml:2688 #, fuzzy, no-c-format msgid "" "<joined-subclass\n" @@ -5891,13 +5927,13 @@ msgstr "" "</joined-subclass>" #. Tag: para -#: basic_mapping.xml:2661 basic_mapping.xml:2725 +#: basic_mapping.xml:2697 basic_mapping.xml:2761 #, fuzzy, no-c-format msgid "table: the name of the subclass table." msgstr "table: Der Name der Subklassentabelle." #. Tag: para -#: basic_mapping.xml:2666 basic_mapping.xml:2730 +#: basic_mapping.xml:2702 basic_mapping.xml:2766 #, fuzzy, no-c-format msgid "" "proxy (optional): specifies a class or interface to use " @@ -5908,7 +5944,7 @@ msgstr "" "\"lazy initializing proxies\") verwendet werden soll." #. Tag: para -#: basic_mapping.xml:2671 basic_mapping.xml:2735 +#: basic_mapping.xml:2707 basic_mapping.xml:2771 #, fuzzy, no-c-format msgid "" "lazy (optional, defaults to true): " @@ -5919,7 +5955,7 @@ msgstr "" "deaktiviert die Verwendung von \"Lazy Fetching\"." #. Tag: para -#: basic_mapping.xml:2679 +#: basic_mapping.xml:2715 #, no-c-format msgid "" "Use the <key> element to declare the primary key / " @@ -5928,13 +5964,13 @@ msgid "" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:2683 +#: basic_mapping.xml:2719 #, fuzzy, no-c-format msgid "" "<?xml version=\"1.0\"?>\n" "<!DOCTYPE hibernate-mapping PUBLIC\n" " \"-//Hibernate/Hibernate Mapping DTD//EN\"\n" -" \"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd\">\n" +" \"http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd\">\n" "\n" "<hibernate-mapping package=\"eg\">\n" "\n" @@ -5998,13 +6034,13 @@ msgstr "" "</hibernate-mapping>" #. Tag: title -#: basic_mapping.xml:2690 +#: basic_mapping.xml:2726 #, no-c-format msgid "Table per class strategy" msgstr "" #. Tag: para -#: basic_mapping.xml:2692 +#: basic_mapping.xml:2728 #, fuzzy, no-c-format msgid "" "A third option is to map only the concrete classes of an inheritance " @@ -6027,7 +6063,7 @@ msgstr "" "Sie das <union-subclass>-Mapping verwenden." #. Tag: programlisting -#: basic_mapping.xml:2701 +#: basic_mapping.xml:2737 #, no-c-format msgid "" "@Entity\n" @@ -6036,13 +6072,13 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2703 +#: basic_mapping.xml:2739 #, no-c-format msgid "Or in hbm.xml:" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:2716 +#: basic_mapping.xml:2752 #, fuzzy, no-c-format msgid "" "<union-subclass\n" @@ -6086,7 +6122,7 @@ msgstr "" "</union-subclass>" #. Tag: para -#: basic_mapping.xml:2743 +#: basic_mapping.xml:2779 #, no-c-format msgid "" "No discriminator column or key column is required for this mapping strategy." @@ -6095,13 +6131,13 @@ msgstr "" "Schlüsselspalte erforderlich." #. Tag: title -#: basic_mapping.xml:2751 +#: basic_mapping.xml:2787 #, no-c-format msgid "Inherit properties from superclasses" msgstr "" #. Tag: para -#: basic_mapping.xml:2753 +#: basic_mapping.xml:2789 #, no-c-format msgid "" "This is sometimes useful to share common properties through a technical or a " @@ -6111,7 +6147,7 @@ msgid "" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:2758 +#: basic_mapping.xml:2794 #, no-c-format msgid "" "@MappedSuperclass\n" @@ -6130,7 +6166,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2760 +#: basic_mapping.xml:2796 #, no-c-format msgid "" "In database, this hierarchy will be represented as an Order@MappedSuperclass@Embeddable objects to " @@ -6167,7 +6203,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2786 +#: basic_mapping.xml:2822 #, no-c-format msgid "" "It is allowed to mark a class as @MappedSuperclass in the " @@ -6175,7 +6211,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2792 +#: basic_mapping.xml:2828 #, no-c-format msgid "" "Any class in the hierarchy non annotated with @MappedSuperclassaltitude property will be persisted in an " @@ -6236,7 +6272,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2809 +#: basic_mapping.xml:2845 #, no-c-format msgid "" "You can define @AttributeOverride(s) and " @@ -6246,7 +6282,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2815 +#: basic_mapping.xml:2851 #, no-c-format msgid "" "In hbm.xml, simply map the properties of the superclass in the <" @@ -6254,13 +6290,13 @@ msgid "" msgstr "" #. Tag: title -#: basic_mapping.xml:2821 +#: basic_mapping.xml:2857 #, no-c-format msgid "Mapping one entity to several tables" msgstr "" #. Tag: para -#: basic_mapping.xml:2823 +#: basic_mapping.xml:2859 #, no-c-format msgid "" "While not recommended for a fresh schema, some legacy databases force your " @@ -6268,7 +6304,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2826 +#: basic_mapping.xml:2862 #, no-c-format msgid "" "Using the @SecondaryTable or @SecondaryTablesname will be in MainCat@org.hibernate." @@ -6341,7 +6377,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2850 +#: basic_mapping.xml:2886 #, fuzzy, no-c-format msgid "" "fetch: If set to JOIN, the default, Hibernate will use an " @@ -6367,7 +6403,7 @@ msgstr "" "oder deren Superklasse definierten <join> abzurufen." #. Tag: para -#: basic_mapping.xml:2862 +#: basic_mapping.xml:2898 #, fuzzy, no-c-format msgid "" "inverse: If true, Hibernate will not try to insert or " @@ -6379,7 +6415,7 @@ msgstr "" "aktualisieren." #. Tag: para -#: basic_mapping.xml:2868 +#: basic_mapping.xml:2904 #, fuzzy, no-c-format msgid "" "optional: If enabled (the default), Hibernate will insert " @@ -6393,7 +6429,7 @@ msgstr "" "der Properties verwenden." #. Tag: para -#: basic_mapping.xml:2875 +#: basic_mapping.xml:2911 #, no-c-format msgid "" "foreignKey: defines the Foreign Key name of a secondary " @@ -6401,7 +6437,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2880 +#: basic_mapping.xml:2916 #, no-c-format msgid "" "Make sure to use the secondary table name in the appliesto<join> element." msgstr "" "Nehmen wir etwa das folgende <properties>-Mapping:" #. Tag: programlisting -#: basic_mapping.xml:2903 +#: basic_mapping.xml:2939 #, fuzzy, no-c-format msgid "" "<join\n" @@ -6487,13 +6523,13 @@ msgstr "" "</join>" #. Tag: para -#: basic_mapping.xml:2907 +#: basic_mapping.xml:2943 #, fuzzy, no-c-format msgid "table: the name of the joined table." msgstr "table: Der Name der verbundenen Tabelle." #. Tag: para -#: basic_mapping.xml:2924 +#: basic_mapping.xml:2960 #, fuzzy, no-c-format msgid "" "fetch (optional - defaults to join): " @@ -6520,7 +6556,7 @@ msgstr "" "oder deren Superklasse definierten <join> abzurufen." #. Tag: para -#: basic_mapping.xml:2939 +#: basic_mapping.xml:2975 #, fuzzy, no-c-format msgid "" "inverse (optional - defaults to falseoptional (optional - defaults to false@ManyToOne or " @@ -6627,7 +6663,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2978 +#: basic_mapping.xml:3014 #, no-c-format msgid "" "@ManyToOne and @OneToOne have a " @@ -6639,7 +6675,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2985 +#: basic_mapping.xml:3021 #, no-c-format msgid "" "Setting a value of the cascade attribute to any " @@ -6648,7 +6684,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2992 +#: basic_mapping.xml:3028 #, no-c-format msgid "" "basic operations, which include: persist, merge, delete, save-" @@ -6656,7 +6692,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2998 +#: basic_mapping.xml:3034 #, fuzzy, no-c-format msgid "" "special values: delete-orphan or all ;" @@ -6665,7 +6701,7 @@ msgstr "" "name statt class spezifiziert werden." #. Tag: para -#: basic_mapping.xml:3003 +#: basic_mapping.xml:3039 #, no-c-format msgid "" "comma-separated combinations of operation names: cascade=\"persist," @@ -6675,7 +6711,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:3012 +#: basic_mapping.xml:3048 #, no-c-format msgid "" "By default, single point associations are eagerly fetched in JPA 2. You can " @@ -6690,7 +6726,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:3022 +#: basic_mapping.xml:3058 #, no-c-format msgid "" "With the default JPA options, single-ended associations are loaded with a " @@ -6706,13 +6742,13 @@ msgid "" msgstr "" #. Tag: title -#: basic_mapping.xml:3034 +#: basic_mapping.xml:3070 #, fuzzy, no-c-format msgid "Using a foreign key or an association table" msgstr "Assoziationen eines eindeutigen Fremdschlüssels" #. Tag: para -#: basic_mapping.xml:3036 +#: basic_mapping.xml:3072 #, fuzzy, no-c-format msgid "An ordinary association to another persistent class is declared using a" msgstr "" @@ -6720,7 +6756,7 @@ msgstr "" "unter Verwendung eines one-to-one-Elements deklariert." #. Tag: para -#: basic_mapping.xml:3041 +#: basic_mapping.xml:3077 #, no-c-format msgid "" "@ManyToOne if several entities can point to the the " @@ -6728,7 +6764,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:3046 +#: basic_mapping.xml:3082 #, no-c-format msgid "" "@OneToOne if only a single entity can point to the " @@ -6736,7 +6772,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:3051 +#: basic_mapping.xml:3087 #, no-c-format msgid "" "and a foreign key in one table is referencing the primary key column(s) of " @@ -6744,7 +6780,7 @@ msgid "" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:3054 +#: basic_mapping.xml:3090 #, no-c-format msgid "" "@Entity\n" @@ -6759,7 +6795,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:3056 +#: basic_mapping.xml:3092 #, no-c-format msgid "" "The @JoinColumn attribute is optional, the default value" @@ -6771,7 +6807,7 @@ msgid "" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:3064 +#: basic_mapping.xml:3100 #, no-c-format msgid "" "@Entity\n" @@ -6791,7 +6827,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:3066 +#: basic_mapping.xml:3102 #, no-c-format msgid "" "You can also map a to one association through an association table. This " @@ -6803,7 +6839,7 @@ msgid "" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:3074 +#: basic_mapping.xml:3110 #, no-c-format msgid "" "@Entity\n" @@ -6821,7 +6857,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:3077 +#: basic_mapping.xml:3113 #, no-c-format msgid "" "You can use a SQL fragment to simulate a physical join column using the " @@ -6832,7 +6868,7 @@ msgid "" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:3083 +#: basic_mapping.xml:3119 #, no-c-format msgid "" "@Entity\n" @@ -6847,7 +6883,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:3086 +#: basic_mapping.xml:3122 #, no-c-format msgid "" "You can mark an association as mandatory by using the " @@ -6858,7 +6894,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:3092 +#: basic_mapping.xml:3128 #, no-c-format msgid "" "When Hibernate cannot resolve the association because the expected " @@ -6869,13 +6905,13 @@ msgid "" msgstr "" #. Tag: title -#: basic_mapping.xml:3100 +#: basic_mapping.xml:3136 #, no-c-format msgid "@NotFound annotation" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:3102 +#: basic_mapping.xml:3138 #, no-c-format msgid "" "@Entity\n" @@ -6889,7 +6925,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:3105 +#: basic_mapping.xml:3141 #, no-c-format msgid "" "Sometimes you want to delegate to your database the deletion of cascade when " @@ -6898,13 +6934,13 @@ msgid "" msgstr "" #. Tag: title -#: basic_mapping.xml:3110 +#: basic_mapping.xml:3146 #, no-c-format msgid "@OnDelete annotation" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:3112 +#: basic_mapping.xml:3148 #, no-c-format msgid "" "@Entity\n" @@ -6918,7 +6954,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:3115 +#: basic_mapping.xml:3151 #, no-c-format msgid "" "Foreign key constraints, while generated by Hibernate, have a fairly " @@ -6927,13 +6963,13 @@ msgid "" msgstr "" #. Tag: title -#: basic_mapping.xml:3120 +#: basic_mapping.xml:3156 #, fuzzy, no-c-format msgid "@ForeignKey annotation" msgstr "Assoziationen eines eindeutigen Fremdschlüssels" #. Tag: programlisting -#: basic_mapping.xml:3122 +#: basic_mapping.xml:3158 #, no-c-format msgid "" "@Entity\n" @@ -6950,7 +6986,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:3125 +#: basic_mapping.xml:3161 #, no-c-format msgid "" "Sometimes, you want to link one entity to an other not by the target entity " @@ -6960,7 +6996,7 @@ msgid "" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:3130 basic_mapping.xml:3682 +#: basic_mapping.xml:3166 basic_mapping.xml:3718 #, no-c-format msgid "" "@Entity\n" @@ -6985,14 +7021,14 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:3132 +#: basic_mapping.xml:3168 #, no-c-format msgid "" "This is not encouraged however and should be reserved to legacy mappings." msgstr "" #. Tag: para -#: basic_mapping.xml:3135 +#: basic_mapping.xml:3171 #, no-c-format msgid "" "In hbm.xml, mapping an association is similar. The main difference is that a " @@ -7001,7 +7037,7 @@ msgid "" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:3177 +#: basic_mapping.xml:3213 #, fuzzy, no-c-format msgid "" "<many-to-one\n" @@ -7053,7 +7089,7 @@ msgstr "" "/>" #. Tag: para -#: basic_mapping.xml:3185 basic_mapping.xml:3868 +#: basic_mapping.xml:3221 basic_mapping.xml:3904 #, fuzzy, no-c-format msgid "" "column (optional): the name of the foreign key column. " @@ -7065,7 +7101,7 @@ msgstr "" "spezifiziert werden." #. Tag: para -#: basic_mapping.xml:3191 basic_mapping.xml:3385 +#: basic_mapping.xml:3227 basic_mapping.xml:3421 #, fuzzy, no-c-format msgid "" "class (optional - defaults to the property type " @@ -7075,7 +7111,7 @@ msgstr "" "bestimmte Property-Typ): Der Name der assoziierten Klasse." #. Tag: para -#: basic_mapping.xml:3197 basic_mapping.xml:3391 +#: basic_mapping.xml:3233 basic_mapping.xml:3427 #, fuzzy, no-c-format msgid "" "cascade (optional): specifies which operations should be " @@ -7085,7 +7121,7 @@ msgstr "" "übergeordneten Objekt an das assoziierte Objekt weitergegeben werden sollen." #. Tag: para -#: basic_mapping.xml:3203 basic_mapping.xml:3407 +#: basic_mapping.xml:3239 basic_mapping.xml:3443 #, fuzzy, no-c-format msgid "" "fetch (optional - defaults to select): " @@ -7096,7 +7132,7 @@ msgstr "" "sequentiellem \"Select-Fetching\"." #. Tag: para -#: basic_mapping.xml:3209 +#: basic_mapping.xml:3245 #, fuzzy, no-c-format msgid "" "update, insert (optional - defaults to trueproperty-ref (optional): the name of a property of the " @@ -7128,7 +7164,7 @@ msgstr "" "festgelegt, so wird der Primärschlüssel der assoziierten Klasse verwendet." #. Tag: para -#: basic_mapping.xml:3232 +#: basic_mapping.xml:3268 #, fuzzy, no-c-format msgid "" "unique (optional): enables the DDL generation of a unique " @@ -7142,7 +7178,7 @@ msgstr "" "Assoziationsmultiplizität \"one-to-one\" effektiv." #. Tag: para -#: basic_mapping.xml:3240 +#: basic_mapping.xml:3276 #, fuzzy, no-c-format msgid "" "not-null (optional): enables the DDL generation of a " @@ -7152,7 +7188,7 @@ msgstr "" "\"Nullability\"-Bedingung für die Fremdschlüsselspalten." #. Tag: para -#: basic_mapping.xml:3254 +#: basic_mapping.xml:3290 #, fuzzy, no-c-format msgid "" "lazy (optional - defaults to proxy): " @@ -7173,7 +7209,7 @@ msgstr "" "assoziierten Objekten mit Verbundoperationen)." #. Tag: para -#: basic_mapping.xml:3264 +#: basic_mapping.xml:3300 #, fuzzy, no-c-format msgid "" "not-found (optional - defaults to exceptionentity-name (optional): the entity name of the associated " @@ -7197,7 +7233,7 @@ msgstr "" "Klasse." #. Tag: para -#: basic_mapping.xml:3277 +#: basic_mapping.xml:3313 #, no-c-format msgid "" "formula (optional): an SQL expression that defines the " @@ -7207,7 +7243,7 @@ msgstr "" "einen errechneten Fremdschlüssel definiert." #. Tag: para -#: basic_mapping.xml:3284 +#: basic_mapping.xml:3320 #, fuzzy, no-c-format msgid "" "Setting a value of the cascade attribute to any " @@ -7236,7 +7272,7 @@ msgstr "" "\"Orphan Delete\" nicht unterstützen." #. Tag: para -#: basic_mapping.xml:3298 +#: basic_mapping.xml:3334 #, fuzzy, no-c-format msgid "" "Here is an example of a typical many-to-one declaration:" @@ -7245,7 +7281,7 @@ msgstr "" "unkompliziert wie die Folgende aus:" #. Tag: programlisting -#: basic_mapping.xml:3301 +#: basic_mapping.xml:3337 #, fuzzy, no-c-format msgid "" "<many-to-one name=\"product\" class=\"Product\" column=\"PRODUCT_ID\"/>" @@ -7253,7 +7289,7 @@ msgstr "" "<many-to-one name=\"product\" class=\"Product\" column=\"PRODUCT_ID\"/>" #. Tag: para -#: basic_mapping.xml:3303 +#: basic_mapping.xml:3339 #, fuzzy, no-c-format msgid "" "The property-ref attribute should only be used for " @@ -7274,7 +7310,7 @@ msgstr "" "steuert Hibernates DDL-Generierung mittels dem SchemaExport-Tool)." #. Tag: programlisting -#: basic_mapping.xml:3311 +#: basic_mapping.xml:3347 #, fuzzy, no-c-format msgid "" "<property name=\"serialNumber\" unique=\"true\" type=\"string\" column=" @@ -7284,14 +7320,14 @@ msgstr "" "\"SERIAL_NUMBER\"/>" #. Tag: para -#: basic_mapping.xml:3313 +#: basic_mapping.xml:3349 #, no-c-format msgid "Then the mapping for OrderItem might use:" msgstr "" "Dann könnte das Mapping für OrderItem folgendes verwenden:" #. Tag: programlisting -#: basic_mapping.xml:3316 +#: basic_mapping.xml:3352 #, fuzzy, no-c-format msgid "" "<many-to-one name=\"product\" property-ref=\"serialNumber\" column=" @@ -7301,13 +7337,13 @@ msgstr "" "\"PRODUCT_SERIAL_NUMBER\"/>" #. Tag: para -#: basic_mapping.xml:3318 +#: basic_mapping.xml:3354 #, fuzzy, no-c-format msgid "This is not encouraged, however." msgstr "Allerdings wird dies nicht empfohlen." #. Tag: para -#: basic_mapping.xml:3320 +#: basic_mapping.xml:3356 #, no-c-format msgid "" "If the referenced unique key comprises multiple properties of the associated " @@ -7320,7 +7356,7 @@ msgstr "" "gemappt werden." #. Tag: para -#: basic_mapping.xml:3324 +#: basic_mapping.xml:3360 #, fuzzy, no-c-format msgid "" "If the referenced unique key is the property of a component, you can specify " @@ -7330,7 +7366,7 @@ msgstr "" "Komponente ist, so können Sie einen Property-Pfad festlegen:" #. Tag: programlisting -#: basic_mapping.xml:3327 +#: basic_mapping.xml:3363 #, fuzzy, no-c-format msgid "" "<many-to-one name=\"owner\" property-ref=\"identity.ssn\" column=" @@ -7340,13 +7376,13 @@ msgstr "" "\"OWNER_SSN\"/>" #. Tag: title -#: basic_mapping.xml:3331 +#: basic_mapping.xml:3367 #, no-c-format msgid "Sharing the primary key with the associated entity" msgstr "" #. Tag: para -#: basic_mapping.xml:3333 +#: basic_mapping.xml:3369 #, no-c-format msgid "" "The second approach is to ensure an entity and its associated entity share " @@ -7355,13 +7391,13 @@ msgid "" msgstr "" #. Tag: title -#: basic_mapping.xml:3339 +#: basic_mapping.xml:3375 #, fuzzy, no-c-format msgid "One to One association" msgstr "Assoziationen eines eindeutigen Fremdschlüssels" #. Tag: programlisting -#: basic_mapping.xml:3341 +#: basic_mapping.xml:3377 #, no-c-format msgid "" "@Entity\n" @@ -7385,7 +7421,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:3345 +#: basic_mapping.xml:3381 #, no-c-format msgid "" "Many people got confused by these primary key based one to one associations. " @@ -7395,13 +7431,13 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:3352 +#: basic_mapping.xml:3388 #, no-c-format msgid "In hbm.xml, use the following mapping." msgstr "" #. Tag: programlisting -#: basic_mapping.xml:3377 +#: basic_mapping.xml:3413 #, fuzzy, no-c-format msgid "" "<one-to-one\n" @@ -7437,7 +7473,7 @@ msgstr "" "/>" #. Tag: para -#: basic_mapping.xml:3397 +#: basic_mapping.xml:3433 #, fuzzy, no-c-format msgid "" "constrained (optional): specifies that a foreign key " @@ -7455,7 +7491,7 @@ msgstr "" "werden kann (wird auch vom Schema-Export-Tool verwendet)." #. Tag: para -#: basic_mapping.xml:3413 +#: basic_mapping.xml:3449 #, fuzzy, no-c-format msgid "" "property-ref (optional): the name of a property of the " @@ -7468,7 +7504,7 @@ msgstr "" "assoziierten Klasse verwendet." #. Tag: para -#: basic_mapping.xml:3426 +#: basic_mapping.xml:3462 #, fuzzy, no-c-format msgid "" "formula (optional): almost all one-to-one associations " @@ -7485,7 +7521,7 @@ msgstr "" "literal>)." #. Tag: para -#: basic_mapping.xml:3435 +#: basic_mapping.xml:3471 #, fuzzy, no-c-format msgid "" "lazy (optional - defaults to proxy): " @@ -7511,7 +7547,7 @@ msgstr "" "anwendet!" #. Tag: para -#: basic_mapping.xml:3454 +#: basic_mapping.xml:3490 #, fuzzy, no-c-format msgid "" "Primary key associations do not need an extra table column. If two rows are " @@ -7527,7 +7563,7 @@ msgstr "" "Bezeichnerwert zugeschrieben wird!" #. Tag: para -#: basic_mapping.xml:3460 +#: basic_mapping.xml:3496 #, fuzzy, no-c-format msgid "" "For a primary key association, add the following mappings to " @@ -7538,13 +7574,13 @@ msgstr "" "hinzu." #. Tag: programlisting -#: basic_mapping.xml:3464 +#: basic_mapping.xml:3500 #, fuzzy, no-c-format msgid "<one-to-one name=\"person\" class=\"Person\"/>" msgstr "<one-to-one name=\"person\" class=\"Person\"/>" #. Tag: programlisting -#: basic_mapping.xml:3466 +#: basic_mapping.xml:3502 #, fuzzy, no-c-format msgid "" "<one-to-one name=\"employee\" class=\"Employee\" constrained=\"true\"/>" @@ -7552,7 +7588,7 @@ msgstr "" "<one-to-one name=\"employee\" class=\"Employee\" constrained=\"true\"/>" #. Tag: para -#: basic_mapping.xml:3468 +#: basic_mapping.xml:3504 #, fuzzy, no-c-format msgid "" "Ensure that the primary keys of the related rows in the PERSON and EMPLOYEE " @@ -7565,7 +7601,7 @@ msgstr "" "Bezeichners durch Hibernate zum Einsatz:" #. Tag: programlisting -#: basic_mapping.xml:3472 +#: basic_mapping.xml:3508 #, fuzzy, no-c-format msgid "" "<class name=\"person\" table=\"PERSON\">\n" @@ -7593,7 +7629,7 @@ msgstr "" "</class>" #. Tag: para -#: basic_mapping.xml:3474 +#: basic_mapping.xml:3510 #, fuzzy, no-c-format msgid "" "A newly saved instance of Person is assigned the same " @@ -7606,13 +7642,13 @@ msgstr "" "Person referenziert ist." #. Tag: title -#: basic_mapping.xml:3482 +#: basic_mapping.xml:3518 #, fuzzy, no-c-format msgid "Natural-id" msgstr "natural-id" #. Tag: para -#: basic_mapping.xml:3484 +#: basic_mapping.xml:3520 #, fuzzy, no-c-format msgid "" "Although we recommend the use of surrogate keys as primary keys, you should " @@ -7633,7 +7669,7 @@ msgstr "" "\"Nullability\"-Bedingungen, und Ihr Mapping wird selbst-dokumentierender." #. Tag: programlisting -#: basic_mapping.xml:3493 +#: basic_mapping.xml:3529 #, no-c-format msgid "" "@Entity\n" @@ -7663,13 +7699,13 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:3495 +#: basic_mapping.xml:3531 #, no-c-format msgid "Or in XML," msgstr "" #. Tag: programlisting -#: basic_mapping.xml:3497 +#: basic_mapping.xml:3533 #, fuzzy, no-c-format msgid "" "<natural-id mutable=\"true|false\"/>\n" @@ -7685,7 +7721,7 @@ msgstr "" "</natural-id>" #. Tag: para -#: basic_mapping.xml:3499 +#: basic_mapping.xml:3535 #, fuzzy, no-c-format msgid "" "It is recommended that you implement equals() and " @@ -7697,7 +7733,7 @@ msgstr "" "Schlüssels der Entity zu vergleichen." #. Tag: para -#: basic_mapping.xml:3503 +#: basic_mapping.xml:3539 #, fuzzy, no-c-format msgid "" "This mapping is not intended for use with entities that have natural primary " @@ -7707,7 +7743,7 @@ msgstr "" "Primärschlüsseln vorgesehen." #. Tag: para -#: basic_mapping.xml:3508 +#: basic_mapping.xml:3544 #, fuzzy, no-c-format msgid "" "mutable (optional - defaults to falseAny" msgstr "any" #. Tag: para -#: basic_mapping.xml:3518 +#: basic_mapping.xml:3554 #, fuzzy, no-c-format msgid "" "There is one more type of property mapping. The @Any " @@ -7749,7 +7785,7 @@ msgstr "" "anwenden (z.B. für Überprüfungsprotokolle, Daten der Benutzersession usw.)." #. Tag: para -#: basic_mapping.xml:3528 +#: basic_mapping.xml:3564 #, fuzzy, no-c-format msgid "" "The @Any annotation describes the column holding the " @@ -7768,7 +7804,7 @@ msgstr "" "Klassennamen bestimmt werden." #. Tag: programlisting -#: basic_mapping.xml:3538 +#: basic_mapping.xml:3574 #, no-c-format msgid "" "@Any( metaColumn = @Column( name = \"property_type\" ), fetch=FetchType." @@ -7787,7 +7823,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:3540 +#: basic_mapping.xml:3576 #, no-c-format msgid "" "Note that @AnyDef can be mutualized and reused. It is " @@ -7795,7 +7831,7 @@ msgid "" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:3544 +#: basic_mapping.xml:3580 #, no-c-format msgid "" "//on a package\n" @@ -7819,13 +7855,13 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:3546 +#: basic_mapping.xml:3582 #, no-c-format msgid "The hbm.xml equivalent is:" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:3548 +#: basic_mapping.xml:3584 #, fuzzy, no-c-format msgid "" "<any name=\"being\" id-type=\"long\" meta-type=\"string\">\n" @@ -7845,13 +7881,13 @@ msgstr "" "</any>" #. Tag: para -#: basic_mapping.xml:3551 +#: basic_mapping.xml:3587 #, no-c-format msgid "You cannot mutualize the metadata in hbm.xml as you can in annotations." msgstr "" #. Tag: programlisting -#: basic_mapping.xml:3570 +#: basic_mapping.xml:3606 #, fuzzy, no-c-format msgid "" "<any\n" @@ -7887,19 +7923,19 @@ msgstr "" "</any>" #. Tag: para -#: basic_mapping.xml:3574 +#: basic_mapping.xml:3610 #, no-c-format msgid "name: the property name." msgstr "name: Der Property-Name." #. Tag: para -#: basic_mapping.xml:3578 +#: basic_mapping.xml:3614 #, no-c-format msgid "id-type: the identifier type." msgstr "id-type: Der Bezeichnertyp." #. Tag: para -#: basic_mapping.xml:3582 +#: basic_mapping.xml:3618 #, fuzzy, no-c-format msgid "" "meta-type (optional - defaults to stringcascade (optional- defaults to none): " @@ -7920,7 +7956,7 @@ msgstr "" "none): der \"Cascade-Style\" (Weitergabestil)." #. Tag: para -#: basic_mapping.xml:3599 +#: basic_mapping.xml:3635 #, fuzzy, no-c-format msgid "" "optimistic-lock (optional - defaults to true<properties> element allows the definition of a " @@ -7958,7 +7994,7 @@ msgstr "" "zu definieren." #. Tag: programlisting -#: basic_mapping.xml:3632 +#: basic_mapping.xml:3668 #, fuzzy, no-c-format msgid "" "<properties\n" @@ -7988,7 +8024,7 @@ msgstr "" "</properties>" #. Tag: para -#: basic_mapping.xml:3636 +#: basic_mapping.xml:3672 #, fuzzy, no-c-format msgid "" "name: the logical name of the grouping. It is " @@ -7998,7 +8034,7 @@ msgstr "" "emphasis> tatsächlicher Property-Name." #. Tag: para -#: basic_mapping.xml:3651 +#: basic_mapping.xml:3687 #, fuzzy, no-c-format msgid "" "optimistic-lock (optional - defaults to true<properties> " @@ -8023,7 +8059,7 @@ msgstr "" "Nehmen wir etwa das folgende <properties>-Mapping:" #. Tag: programlisting -#: basic_mapping.xml:3669 +#: basic_mapping.xml:3705 #, fuzzy, no-c-format msgid "" "<class name=\"Person\">\n" @@ -8050,7 +8086,7 @@ msgstr "" "</class>" #. Tag: para -#: basic_mapping.xml:3671 +#: basic_mapping.xml:3707 #, fuzzy, no-c-format msgid "" "You might have some legacy data association that refers to this unique key " @@ -8061,7 +8097,7 @@ msgstr "" "Primärschlüssel:" #. Tag: programlisting -#: basic_mapping.xml:3675 +#: basic_mapping.xml:3711 #, fuzzy, no-c-format msgid "" "<many-to-one name=\"owner\"\n" @@ -8079,7 +8115,7 @@ msgstr "" "</many-to-one>" #. Tag: para -#: basic_mapping.xml:3678 +#: basic_mapping.xml:3714 #, no-c-format msgid "" "When using annotations as a mapping strategy, such construct is not " @@ -8088,7 +8124,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:3685 +#: basic_mapping.xml:3721 #, fuzzy, no-c-format msgid "" "The use of this outside the context of mapping legacy data is not " @@ -8098,13 +8134,13 @@ msgstr "" "jedoch nicht empfohlen." #. Tag: title -#: basic_mapping.xml:3690 +#: basic_mapping.xml:3726 #, no-c-format msgid "Some hbm.xml specificities" msgstr "" #. Tag: para -#: basic_mapping.xml:3692 +#: basic_mapping.xml:3728 #, no-c-format msgid "" "The hbm.xml structure has some specificities naturally not present when " @@ -8112,13 +8148,13 @@ msgid "" msgstr "" #. Tag: title -#: basic_mapping.xml:3696 +#: basic_mapping.xml:3732 #, no-c-format msgid "Doctype" msgstr "Doctype" #. Tag: para -#: basic_mapping.xml:3698 +#: basic_mapping.xml:3734 #, fuzzy, no-c-format msgid "" "All XML mappings should declare the doctype shown. The actual DTD can be " @@ -8137,13 +8173,13 @@ msgstr "" "Ihre DTD-Deklaration hinsichtlich der Inhalte Ihres Klassenpfads." #. Tag: title -#: basic_mapping.xml:3707 +#: basic_mapping.xml:3743 #, no-c-format msgid "EntityResolver" msgstr "EntityResolver" #. Tag: para -#: basic_mapping.xml:3709 +#: basic_mapping.xml:3745 #, fuzzy, no-c-format msgid "" "Hibernate will first attempt to resolve DTDs in its classpath. It does this " @@ -8160,12 +8196,12 @@ msgstr "" "verschiedene \"systemId\"-Namensräume." #. Tag: para -#: basic_mapping.xml:3718 +#: basic_mapping.xml:3754 #, fuzzy, no-c-format msgid "" "a hibernate namespace is recognized whenever the resolver " -"encounters a systemId starting with http://hibernate.sourceforge." -"net/. The resolver attempts to resolve these entities via the " +"encounters a systemId starting with http://www.hibernate.org/dtd/. The resolver attempts to resolve these entities via the " "classloader which loaded the Hibernate classes." msgstr "" "ein hibernate namespace wird erkannt, sobald der " @@ -8175,7 +8211,7 @@ msgstr "" "Klassen geladen hat, aufzulösen." #. Tag: para -#: basic_mapping.xml:3726 +#: basic_mapping.xml:3762 #, fuzzy, no-c-format msgid "" "a user namespace is recognized whenever the resolver " @@ -8191,13 +8227,13 @@ msgstr "" "Klassen geladen hat, aufzulösen." #. Tag: para -#: basic_mapping.xml:3735 +#: basic_mapping.xml:3771 #, fuzzy, no-c-format msgid "The following is an example of utilizing user namespacing:" msgstr "Ein Beispiel der Verwendung des Benutzer-Namespacing:" #. Tag: programlisting -#: basic_mapping.xml:3738 +#: basic_mapping.xml:3774 #, no-c-format msgid "" "types.xml is a resource in the your." @@ -8217,13 +8253,13 @@ msgstr "" "custom\"/>-Typedef enthält." #. Tag: title -#: basic_mapping.xml:3747 +#: basic_mapping.xml:3783 #, fuzzy, no-c-format msgid "Hibernate-mapping" msgstr "hibernate-mapping" #. Tag: para -#: basic_mapping.xml:3749 +#: basic_mapping.xml:3785 #, fuzzy, no-c-format msgid "" "This element has several optional attributes. The schema " @@ -8250,7 +8286,7 @@ msgstr "" "Standardeinstellung." #. Tag: programlisting -#: basic_mapping.xml:3778 +#: basic_mapping.xml:3814 #, fuzzy, no-c-format msgid "" "<hibernate-mapping\n" @@ -8274,20 +8310,20 @@ msgstr "" " />" #. Tag: para -#: basic_mapping.xml:3782 +#: basic_mapping.xml:3818 #, fuzzy, no-c-format msgid "schema (optional): the name of a database schema." msgstr "schema (optional): Der Name eines Datenbankschemas." #. Tag: para -#: basic_mapping.xml:3787 +#: basic_mapping.xml:3823 #, fuzzy, no-c-format msgid "catalog (optional): the name of a database catalog." msgstr "" "catalog (optional): Der Name eines Datenbankkatalogs." #. Tag: para -#: basic_mapping.xml:3792 +#: basic_mapping.xml:3828 #, fuzzy, no-c-format msgid "" "default-cascade (optional - defaults to nonedefault-access (optional - defaults to propertyPropertyAccessor sein." #. Tag: para -#: basic_mapping.xml:3804 +#: basic_mapping.xml:3840 #, fuzzy, no-c-format msgid "" "default-lazy (optional - defaults to truelazy Attribute von Klassen- und Collection-Mappings." #. Tag: para -#: basic_mapping.xml:3811 +#: basic_mapping.xml:3847 #, fuzzy, no-c-format msgid "" "auto-import (optional - defaults to truepackage (optional): specifies a package prefix to use for " @@ -8346,7 +8382,7 @@ msgstr "" "für undefinierte Klassennamen im Mapping-Dokument angenommen werden soll." #. Tag: para -#: basic_mapping.xml:3825 +#: basic_mapping.xml:3861 #, fuzzy, no-c-format msgid "" "If you have two persistent classes with the same unqualified name, you " @@ -8359,7 +8395,7 @@ msgstr "" "zwei Klassen demselben \"importierten\" Namen zuzuordnen." #. Tag: para -#: basic_mapping.xml:3830 +#: basic_mapping.xml:3866 #, fuzzy, no-c-format msgid "" "The hibernate-mapping element allows you to nest several " @@ -8381,13 +8417,13 @@ msgstr "" "xml." #. Tag: title -#: basic_mapping.xml:3841 +#: basic_mapping.xml:3877 #, fuzzy, no-c-format msgid "Key" msgstr "key" #. Tag: para -#: basic_mapping.xml:3843 +#: basic_mapping.xml:3879 #, fuzzy, no-c-format msgid "" "The <key> element is featured a few times within " @@ -8402,7 +8438,7 @@ msgstr "" "Originaltabelle verweist." #. Tag: programlisting -#: basic_mapping.xml:3864 +#: basic_mapping.xml:3900 #, fuzzy, no-c-format msgid "" "<key\n" @@ -8424,7 +8460,7 @@ msgstr "" "/>" #. Tag: para -#: basic_mapping.xml:3874 +#: basic_mapping.xml:3910 #, fuzzy, no-c-format msgid "" "on-delete (optional - defaults to noactionproperty-ref (optional): specifies that the foreign key " @@ -8448,7 +8484,7 @@ msgstr "" "Originaltabelle sind (für existierende Daten, sog. \"Legacy Data\")." #. Tag: para -#: basic_mapping.xml:3886 +#: basic_mapping.xml:3922 #, fuzzy, no-c-format msgid "" "not-null (optional): specifies that the foreign key " @@ -8460,7 +8496,7 @@ msgstr "" "vorausgesetzt, wenn der Fremdschlüssel auch Teil des Primärschlüssels ist)." #. Tag: para -#: basic_mapping.xml:3892 +#: basic_mapping.xml:3928 #, fuzzy, no-c-format msgid "" "update (optional): specifies that the foreign key should " @@ -8472,7 +8508,7 @@ msgstr "" "Fremdschlüssel auch Teil des Primärschlüssels ist)." #. Tag: para -#: basic_mapping.xml:3898 +#: basic_mapping.xml:3934 #, fuzzy, no-c-format msgid "" "unique (optional): specifies that the foreign key should " @@ -8484,7 +8520,7 @@ msgstr "" "der Fremdschlüssel auch der Primärschlüssel ist)." #. Tag: para -#: basic_mapping.xml:3905 +#: basic_mapping.xml:3941 #, fuzzy, no-c-format msgid "" "For systems where delete performance is important, we recommend that all " @@ -8502,7 +8538,7 @@ msgstr "" "Strategie für optimistisches Sperren für versionierte Daten umgeht." #. Tag: para -#: basic_mapping.xml:3913 +#: basic_mapping.xml:3949 #, fuzzy, no-c-format msgid "" "The not-null and update attributes are " @@ -8519,13 +8555,13 @@ msgstr "" "\"> deklarieren." #. Tag: title -#: basic_mapping.xml:3922 +#: basic_mapping.xml:3958 #, fuzzy, no-c-format msgid "Import" msgstr "import" #. Tag: para -#: basic_mapping.xml:3924 +#: basic_mapping.xml:3960 #, fuzzy, no-c-format msgid "" "If your application has two persistent classes with the same name, and you " @@ -8541,13 +8577,13 @@ msgstr "" "sogar Klassen und Interfaces importieren, die nicht explizit gemappt sind." #. Tag: programlisting -#: basic_mapping.xml:3930 +#: basic_mapping.xml:3966 #, fuzzy, no-c-format msgid "<import class=\"java.lang.Object\" rename=\"Universe\"/>" msgstr "<import class=\"java.lang.Object\" rename=\"Universe\"/>" #. Tag: programlisting -#: basic_mapping.xml:3939 +#: basic_mapping.xml:3975 #, fuzzy, no-c-format msgid "" "<import\n" @@ -8561,7 +8597,7 @@ msgstr "" "/>" #. Tag: para -#: basic_mapping.xml:3943 +#: basic_mapping.xml:3979 #, fuzzy, no-c-format msgid "" "class: the fully qualified class name of any Java class." @@ -8569,7 +8605,7 @@ msgstr "" "class: Der vollständige Klassenname einer Java-Klasse." #. Tag: para -#: basic_mapping.xml:3948 +#: basic_mapping.xml:3984 #, fuzzy, no-c-format msgid "" "rename (optional - defaults to the unqualified class " @@ -8580,19 +8616,19 @@ msgstr "" "werden kann." #. Tag: para -#: basic_mapping.xml:3956 +#: basic_mapping.xml:3992 #, no-c-format msgid "This feature is unique to hbm.xml and is not supported in annotations." msgstr "" #. Tag: title -#: basic_mapping.xml:3962 +#: basic_mapping.xml:3998 #, fuzzy, no-c-format msgid "Column and formula elements" msgstr "Spalten- und Formel-Elemente" #. Tag: para -#: basic_mapping.xml:3964 +#: basic_mapping.xml:4000 #, fuzzy, no-c-format msgid "" "Mapping elements which accept a column attribute will " @@ -8606,7 +8642,7 @@ msgstr "" "formula-Attribut." #. Tag: programlisting -#: basic_mapping.xml:3970 +#: basic_mapping.xml:4006 #, fuzzy, no-c-format msgid "" "<column\n" @@ -8638,13 +8674,13 @@ msgstr "" " default=\"SQL expression\"/>" #. Tag: programlisting -#: basic_mapping.xml:3972 +#: basic_mapping.xml:4008 #, fuzzy, no-c-format msgid "<formula>SQL expression</formula>" msgstr "<formula>SQL expression</formula>" #. Tag: para -#: basic_mapping.xml:3974 +#: basic_mapping.xml:4010 #, no-c-format msgid "" "Most of the attributes on column provide a means of " @@ -8656,7 +8692,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:3982 +#: basic_mapping.xml:4018 #, fuzzy, no-c-format msgid "" "The column and formula elements can " @@ -8669,7 +8705,7 @@ msgstr "" "Verbundbedingungen." #. Tag: programlisting -#: basic_mapping.xml:3986 +#: basic_mapping.xml:4022 #, fuzzy, no-c-format msgid "" "<many-to-one name=\"homeAddress\" class=\"Address\"\n" @@ -8685,19 +8721,19 @@ msgstr "" "</many-to-one>" #. Tag: title -#: basic_mapping.xml:3992 +#: basic_mapping.xml:4028 #, fuzzy, no-c-format msgid "Hibernate types" msgstr "Hibernate-Typen" #. Tag: title -#: basic_mapping.xml:3995 +#: basic_mapping.xml:4031 #, no-c-format msgid "Entities and values" msgstr "Entities und Werte" #. Tag: para -#: basic_mapping.xml:3997 +#: basic_mapping.xml:4033 #, no-c-format msgid "" "In relation to the persistence service, Java language-level objects are " @@ -8705,7 +8741,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:4000 +#: basic_mapping.xml:4036 #, fuzzy, no-c-format msgid "" "An entity exists independently of any other objects " @@ -8730,7 +8766,7 @@ msgstr "" "zirkulare und geteilte Verweise. Sie können auch versioniert werden." #. Tag: para -#: basic_mapping.xml:4010 +#: basic_mapping.xml:4046 #, fuzzy, no-c-format msgid "" "An entity's persistent state consists of references to other entities and " @@ -8755,7 +8791,7 @@ msgstr "" "Entities oder Collections geteilt werden." #. Tag: para -#: basic_mapping.xml:4020 +#: basic_mapping.xml:4056 #, fuzzy, no-c-format msgid "" "Until now, we have been using the term \"persistent class\" to refer to " @@ -8785,7 +8821,7 @@ msgstr "" "Komposition oder Aggregation in der Regel für einen Wertetyp geeignet sind. " #. Tag: para -#: basic_mapping.xml:4033 +#: basic_mapping.xml:4069 #, fuzzy, no-c-format msgid "We will revisit both concepts throughout this reference guide." msgstr "" @@ -8793,7 +8829,7 @@ msgstr "" "aufgegriffen." #. Tag: para -#: basic_mapping.xml:4036 +#: basic_mapping.xml:4072 #, fuzzy, no-c-format msgid "" "The challenge is to map the Java type system, and the developers' definition " @@ -8821,7 +8857,7 @@ msgstr "" "Darauf gehen wir später noch ein." #. Tag: para -#: basic_mapping.xml:4049 +#: basic_mapping.xml:4085 #, fuzzy, no-c-format msgid "" "With the exception of collections, all built-in Hibernate types support null " @@ -8831,13 +8867,13 @@ msgstr "" "Semantik (sog. \"null semantics\"." #. Tag: title -#: basic_mapping.xml:4054 +#: basic_mapping.xml:4090 #, no-c-format msgid "Basic value types" msgstr "Grundlegende Wertetypen" #. Tag: para -#: basic_mapping.xml:4056 +#: basic_mapping.xml:4092 #, fuzzy, no-c-format msgid "" "The built-in basic mapping types can be roughly " @@ -8847,7 +8883,7 @@ msgstr "" "Wesentlichen wie folgt kategorisiert werden" #. Tag: literal -#: basic_mapping.xml:4059 +#: basic_mapping.xml:4095 #, fuzzy, no-c-format msgid "" "integer, long, short, float, double, character, byte, boolean, yes_no, " @@ -8857,7 +8893,7 @@ msgstr "" "true_false" #. Tag: para -#: basic_mapping.xml:4063 +#: basic_mapping.xml:4099 #, no-c-format msgid "" "Type mappings from Java primitives or wrapper classes to appropriate (vendor-" @@ -8872,13 +8908,13 @@ msgstr "" "literal>." #. Tag: literal -#: basic_mapping.xml:4073 +#: basic_mapping.xml:4109 #, no-c-format msgid "string" msgstr "string" #. Tag: para -#: basic_mapping.xml:4076 +#: basic_mapping.xml:4112 #, no-c-format msgid "" "A type mapping from java.lang.String to VARCHARVARCHAR (oder Oracle VARCHAR2)." #. Tag: literal -#: basic_mapping.xml:4083 +#: basic_mapping.xml:4119 #, fuzzy, no-c-format msgid "date, time, timestamp" msgstr "date, time, timestamp" #. Tag: para -#: basic_mapping.xml:4086 +#: basic_mapping.xml:4122 #, no-c-format msgid "" "Type mappings from java.util.Date and its subclasses to " @@ -8906,13 +8942,13 @@ msgstr "" "TIMESTAMP (oder äquivalent)." #. Tag: literal -#: basic_mapping.xml:4094 +#: basic_mapping.xml:4130 #, fuzzy, no-c-format msgid "calendar, calendar_date" msgstr "calendar, calendar_date" #. Tag: para -#: basic_mapping.xml:4097 +#: basic_mapping.xml:4133 #, no-c-format msgid "" "Type mappings from java.util.Calendar to SQL types " @@ -8922,13 +8958,13 @@ msgstr "" "TIMESTAMP und DATE (oder äquivalent)." #. Tag: literal -#: basic_mapping.xml:4104 +#: basic_mapping.xml:4140 #, fuzzy, no-c-format msgid "big_decimal, big_integer" msgstr "big_decimal, big_integer" #. Tag: para -#: basic_mapping.xml:4107 +#: basic_mapping.xml:4143 #, no-c-format msgid "" "Type mappings from java.math.BigDecimal and java." @@ -8940,13 +8976,13 @@ msgstr "" "NUMBER)." #. Tag: literal -#: basic_mapping.xml:4115 +#: basic_mapping.xml:4151 #, fuzzy, no-c-format msgid "locale, timezone, currency" msgstr "locale, timezone, currency" #. Tag: para -#: basic_mapping.xml:4118 +#: basic_mapping.xml:4154 #, no-c-format msgid "" "Type mappings from java.util.Locale, java.util." @@ -8964,13 +9000,13 @@ msgstr "" "werden zu ihrer ID gemappt." #. Tag: literal -#: basic_mapping.xml:4131 +#: basic_mapping.xml:4167 #, fuzzy, no-c-format msgid "class" msgstr "subclass" #. Tag: para -#: basic_mapping.xml:4134 +#: basic_mapping.xml:4170 #, no-c-format msgid "" "A type mapping from java.lang.Class to VARCHAR wird zu ihrem vollständigen Namen gemappt." #. Tag: literal -#: basic_mapping.xml:4142 +#: basic_mapping.xml:4178 #, no-c-format msgid "binary" msgstr "binary" #. Tag: para -#: basic_mapping.xml:4145 +#: basic_mapping.xml:4181 #, no-c-format msgid "Maps byte arrays to an appropriate SQL binary type." msgstr "Mappt Byte-Arrays zum zugehörigen SQL-Binärtyp." #. Tag: literal -#: basic_mapping.xml:4150 +#: basic_mapping.xml:4186 #, no-c-format msgid "text" msgstr "text" #. Tag: para -#: basic_mapping.xml:4153 -#, no-c-format +#: basic_mapping.xml:4189 +#, fuzzy, no-c-format msgid "" -"Maps long Java strings to a SQL CLOB or TEXT type." +"Maps long Java strings to a SQL LONGVARCHAR or " +"TEXT type." msgstr "" "Mappt lange Java-Strings zum SQL CLOB oder TEXT-Typ." #. Tag: literal -#: basic_mapping.xml:4159 +#: basic_mapping.xml:4195 +#, no-c-format +msgid "image" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:4198 +#, fuzzy, no-c-format +msgid "Maps long byte arrays to a SQL LONGVARBINARY." +msgstr "" +"Mappt lange Java-Strings zum SQL CLOB oder TEXT-Typ." + +#. Tag: literal +#: basic_mapping.xml:4203 #, no-c-format msgid "serializable" msgstr "serializable" #. Tag: para -#: basic_mapping.xml:4162 +#: basic_mapping.xml:4206 #, fuzzy, no-c-format msgid "" "Maps serializable Java types to an appropriate SQL binary type. You can also " @@ -9029,13 +9079,13 @@ msgstr "" "Standardeinstellung kein Grundtyp ist) anzeigen." #. Tag: literal -#: basic_mapping.xml:4171 +#: basic_mapping.xml:4215 #, no-c-format msgid "clob, blob" msgstr "clob, blob" #. Tag: para -#: basic_mapping.xml:4174 +#: basic_mapping.xml:4218 #, fuzzy, no-c-format msgid "" "Type mappings for the JDBC classes java.sql.Clob and " @@ -9050,7 +9100,41 @@ msgstr "" "Treiber-Support ist lückenhaft und uneinheitlich)." #. Tag: literal -#: basic_mapping.xml:4184 +#: basic_mapping.xml:4228 +#, no-c-format +msgid "materialized_clob" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:4231 +#, no-c-format +msgid "" +"Maps long Java strings to a SQL CLOB type. When read, the " +"CLOB value is immediately materialized into a Java " +"string. Some drivers require the CLOB value to be read " +"within a transaction. Once materialized, the Java string is available " +"outside of the transaction." +msgstr "" + +#. Tag: literal +#: basic_mapping.xml:4241 +#, fuzzy, no-c-format +msgid "materialized_blob" +msgstr "serializable" + +#. Tag: para +#: basic_mapping.xml:4244 +#, no-c-format +msgid "" +"Maps long Java byte arrays to a SQL BLOB type. When read, " +"the BLOB value is immediately materialized into a byte " +"array. Some drivers require the BLOB value to be read " +"within a transaction. Once materialized, the byte array is available outside " +"of the transaction." +msgstr "" + +#. Tag: literal +#: basic_mapping.xml:4254 #, fuzzy, no-c-format msgid "" "imm_date, imm_time, imm_timestamp, imm_calendar, imm_calendar_date, " @@ -9060,7 +9144,7 @@ msgstr "" "imm_serializable, imm_binary" #. Tag: para -#: basic_mapping.xml:4188 +#: basic_mapping.xml:4258 #, fuzzy, no-c-format msgid "" "Type mappings for what are considered mutable Java types. This is where " @@ -9081,7 +9165,7 @@ msgstr "" "zuordnen." #. Tag: para -#: basic_mapping.xml:4200 +#: basic_mapping.xml:4270 #, fuzzy, no-c-format msgid "" "Unique identifiers of entities and collections can be of any basic type " @@ -9095,7 +9179,7 @@ msgstr "" "siehe unten)." #. Tag: para -#: basic_mapping.xml:4205 +#: basic_mapping.xml:4275 #, no-c-format msgid "" "The basic value types have corresponding Type constants " @@ -9109,13 +9193,13 @@ msgstr "" "string-Typ." #. Tag: title -#: basic_mapping.xml:4212 +#: basic_mapping.xml:4282 #, no-c-format msgid "Custom value types" msgstr "Angepasste Wertetypen" #. Tag: para -#: basic_mapping.xml:4214 +#: basic_mapping.xml:4284 #, fuzzy, no-c-format msgid "" "It is relatively easy for developers to create their own value types. For " @@ -9140,7 +9224,7 @@ msgstr "" "literal>, SURNAME persistiert ist." #. Tag: para -#: basic_mapping.xml:4225 +#: basic_mapping.xml:4295 #, fuzzy, no-c-format msgid "" "To implement a custom type, implement either org.hibernate." @@ -9157,7 +9241,7 @@ msgstr "" "die es dabei gibt." #. Tag: programlisting -#: basic_mapping.xml:4232 +#: basic_mapping.xml:4302 #, fuzzy, no-c-format msgid "" "<property name=\"twoStrings\" type=\"org.hibernate.test.DoubleStringType" @@ -9173,7 +9257,7 @@ msgstr "" "</property>" #. Tag: para -#: basic_mapping.xml:4234 +#: basic_mapping.xml:4304 #, no-c-format msgid "" "Notice the use of <column> tags to map a property " @@ -9183,7 +9267,7 @@ msgstr "" "Mappen einer Property zu mehreren Spalten." #. Tag: para -#: basic_mapping.xml:4237 +#: basic_mapping.xml:4307 #, no-c-format msgid "" "The CompositeUserType, EnhancedUserTypeUserType in the " @@ -9214,7 +9298,7 @@ msgstr "" "Mappingdateien verwenden." #. Tag: programlisting -#: basic_mapping.xml:4250 +#: basic_mapping.xml:4320 #, fuzzy, no-c-format msgid "" "<property name=\"priority\">\n" @@ -9230,7 +9314,7 @@ msgstr "" "</property>" #. Tag: para -#: basic_mapping.xml:4252 +#: basic_mapping.xml:4322 #, no-c-format msgid "" "The UserType can now retrieve the value for the parameter " @@ -9242,7 +9326,7 @@ msgstr "" "Properties-Objekt abrufen." #. Tag: para -#: basic_mapping.xml:4256 +#: basic_mapping.xml:4326 #, fuzzy, no-c-format msgid "" "If you regularly use a certain UserType, it is useful to " @@ -9259,7 +9343,7 @@ msgstr "" "parametriert wird." #. Tag: programlisting -#: basic_mapping.xml:4262 +#: basic_mapping.xml:4332 #, fuzzy, no-c-format msgid "" "<typedef class=\"com.mycompany.usertypes.DefaultValueIntegerType\" name=" @@ -9273,13 +9357,13 @@ msgstr "" "</typedef>" #. Tag: programlisting -#: basic_mapping.xml:4264 +#: basic_mapping.xml:4334 #, fuzzy, no-c-format msgid "<property name=\"priority\" type=\"default_zero\"/>" msgstr "<property name=\"priority\" type=\"default_zero\"/>" #. Tag: para -#: basic_mapping.xml:4266 +#: basic_mapping.xml:4336 #, no-c-format msgid "" "It is also possible to override the parameters supplied in a typedef on a " @@ -9290,7 +9374,7 @@ msgstr "" "Kraft zu setzen." #. Tag: para -#: basic_mapping.xml:4270 +#: basic_mapping.xml:4340 #, fuzzy, no-c-format msgid "" "Even though Hibernate's rich range of built-in types and support for " @@ -9314,13 +9398,13 @@ msgstr "" "Geldwerte repräsentiert werden, gesichert." #. Tag: title -#: basic_mapping.xml:4283 +#: basic_mapping.xml:4353 #, no-c-format msgid "Mapping a class more than once" msgstr "Das mehrfache Mappen einer Klasse" #. Tag: para -#: basic_mapping.xml:4285 +#: basic_mapping.xml:4355 #, fuzzy, no-c-format msgid "" "It is possible to provide more than one mapping for a particular persistent " @@ -9339,7 +9423,7 @@ msgstr "" "schreiben oder Assoziationen zu der genannten Entity mappen." #. Tag: programlisting -#: basic_mapping.xml:4293 +#: basic_mapping.xml:4363 #, fuzzy, no-c-format msgid "" "<class name=\"Contract\" table=\"Contracts\"\n" @@ -9379,7 +9463,7 @@ msgstr "" "</class>" #. Tag: para -#: basic_mapping.xml:4295 +#: basic_mapping.xml:4365 #, fuzzy, no-c-format msgid "" "Associations are now specified using entity-name instead " @@ -9389,19 +9473,19 @@ msgstr "" "name statt class spezifiziert werden." #. Tag: para -#: basic_mapping.xml:4299 basic_mapping.xml:4379 basic_mapping.xml:4414 +#: basic_mapping.xml:4369 basic_mapping.xml:4497 #, no-c-format msgid "This feature is not supported in Annotations" msgstr "" #. Tag: title -#: basic_mapping.xml:4304 +#: basic_mapping.xml:4374 #, no-c-format msgid "SQL quoted identifiers" msgstr "SQL angeführte Bezeichner" #. Tag: para -#: basic_mapping.xml:4306 +#: basic_mapping.xml:4376 #, fuzzy, no-c-format msgid "" "You can force Hibernate to quote an identifier in the generated SQL by " @@ -9418,7 +9502,7 @@ msgstr "" "für MySQL)." #. Tag: programlisting -#: basic_mapping.xml:4312 +#: basic_mapping.xml:4382 #, fuzzy, no-c-format msgid "" "@Entity @Table(name=\"`Line Item`\")\n" @@ -9442,13 +9526,13 @@ msgstr "" "</class>" #. Tag: title -#: basic_mapping.xml:4316 +#: basic_mapping.xml:4386 #, fuzzy, no-c-format msgid "Generated properties" msgstr "Generierte Properties" #. Tag: para -#: basic_mapping.xml:4318 +#: basic_mapping.xml:4388 #, fuzzy, no-c-format msgid "" "Generated properties are properties that have their values generated by the " @@ -9470,7 +9554,7 @@ msgstr "" "abzufragen." #. Tag: para -#: basic_mapping.xml:4327 +#: basic_mapping.xml:4397 #, fuzzy, no-c-format msgid "" "Properties marked as generated must additionally be non-insertable and non-" @@ -9487,7 +9571,7 @@ msgstr "" "als generiert gekennzeichnet sein." #. Tag: para -#: basic_mapping.xml:4334 +#: basic_mapping.xml:4404 #, fuzzy, no-c-format msgid "" "never (the default): the given property value is not " @@ -9497,7 +9581,7 @@ msgstr "" "Property-Wert nicht innerhalb der Datenbank generiert wird." #. Tag: para -#: basic_mapping.xml:4337 +#: basic_mapping.xml:4407 #, fuzzy, no-c-format msgid "" "insert: the given property value is generated on insert, " @@ -9516,7 +9600,7 @@ msgstr "" "diese Option dort jedoch nicht existiert." #. Tag: para -#: basic_mapping.xml:4344 +#: basic_mapping.xml:4414 #, fuzzy, no-c-format msgid "" "always: the property value is generated both on insert " @@ -9526,19 +9610,19 @@ msgstr "" "Einfügung als auch bei der Aktualisierung generiert wird." #. Tag: para -#: basic_mapping.xml:4347 +#: basic_mapping.xml:4417 #, no-c-format msgid "To mark a property as generated, use @Generated." msgstr "" #. Tag: title -#: basic_mapping.xml:4352 +#: basic_mapping.xml:4422 #, no-c-format -msgid "Column read and write expressions" +msgid "Column transformers: read and write expressions" msgstr "" #. Tag: para -#: basic_mapping.xml:4354 +#: basic_mapping.xml:4424 #, no-c-format msgid "" "Hibernate allows you to customize the SQL it uses to read and write the " @@ -9549,7 +9633,30 @@ msgid "" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:4359 +#: basic_mapping.xml:4430 +#, no-c-format +msgid "" +"@Entity\n" +"class CreditCard {\n" +" @Column(name=\"credit_card_num\")\n" +" @ColumnTransformer(\n" +" read=\"decrypt(credit_card_num)\", \n" +" write=\"encrypt(?)\")\n" +" public String getCreditCardNumber() { return creditCardNumber; }\n" +" public void setCreditCardNumber(String number) { this.creditCardNumber = " +"number; }\n" +" private String creditCardNumber;\n" +"}" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:4432 +#, no-c-format +msgid "or in XML" +msgstr "" + +#. Tag: programlisting +#: basic_mapping.xml:4434 #, no-c-format msgid "" "<property name=\"creditCardNumber\">\n" @@ -9561,7 +9668,44 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:4361 +#: basic_mapping.xml:4437 +#, no-c-format +msgid "" +"You can use the plural form @ColumnTransformers if " +"more than one columns need to define either of these rules." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:4442 +#, no-c-format +msgid "" +"If a property uses more that one column, you must use the " +"forColumn attribute to specify which column, the " +"expressions are targeting." +msgstr "" + +#. Tag: programlisting +#: basic_mapping.xml:4446 +#, no-c-format +msgid "" +"@Entity\n" +"class User {\n" +" @Type(type=\"com.acme.type.CreditCardType\")\n" +" @Columns( {\n" +" @Column(name=\"credit_card_num\"),\n" +" @Column(name=\"exp_date\") } )\n" +" @ColumnTransformer(\n" +" forColumn=\"credit_card_num\", \n" +" read=\"decrypt(credit_card_num)\", \n" +" write=\"encrypt(?)\")\n" +" public CreditCard getCreditCard() { return creditCard; }\n" +" public void setCreditCard(CreditCard card) { this.creditCard = card; }\n" +" private CreditCard creditCard;\n" +"}" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:4448 #, no-c-format msgid "" "Hibernate applies the custom expressions automatically whenever the property " @@ -9570,7 +9714,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:4366 +#: basic_mapping.xml:4453 #, no-c-format msgid "" "The property is backed by one or more columns that are exported as part of " @@ -9578,13 +9722,13 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:4371 +#: basic_mapping.xml:4458 #, no-c-format msgid "The property is read-write, not read-only." msgstr "" #. Tag: para -#: basic_mapping.xml:4375 +#: basic_mapping.xml:4462 #, no-c-format msgid "" "The write expression, if specified, must contain exactly " @@ -9592,13 +9736,13 @@ msgid "" msgstr "" #. Tag: title -#: basic_mapping.xml:4384 +#: basic_mapping.xml:4467 #, fuzzy, no-c-format msgid "Auxiliary database objects" msgstr "Datenbankhilfsobjekte" #. Tag: para -#: basic_mapping.xml:4386 +#: basic_mapping.xml:4469 #, fuzzy, no-c-format msgid "" "Auxiliary database objects allow for the CREATE and DROP of arbitrary " @@ -9620,7 +9764,7 @@ msgstr "" "gibt im Wesentlichen zwei Modi der Definition von Datenbankhilfsobjekten..." #. Tag: para -#: basic_mapping.xml:4396 +#: basic_mapping.xml:4479 #, fuzzy, no-c-format msgid "" "The first mode is to explicitly list the CREATE and DROP commands in the " @@ -9630,7 +9774,7 @@ msgstr "" "in der Mapping-Datei:" #. Tag: programlisting -#: basic_mapping.xml:4399 +#: basic_mapping.xml:4482 #, fuzzy, no-c-format msgid "" "<hibernate-mapping>\n" @@ -9650,7 +9794,7 @@ msgstr "" "</hibernate-mapping>" #. Tag: para -#: basic_mapping.xml:4401 +#: basic_mapping.xml:4484 #, fuzzy, no-c-format msgid "" "The second mode is to supply a custom class that constructs the CREATE and " @@ -9663,7 +9807,7 @@ msgstr "" "Interface implementieren." #. Tag: programlisting -#: basic_mapping.xml:4406 +#: basic_mapping.xml:4489 #, fuzzy, no-c-format msgid "" "<hibernate-mapping>\n" @@ -9681,7 +9825,7 @@ msgstr "" "</hibernate-mapping>" #. Tag: para -#: basic_mapping.xml:4408 +#: basic_mapping.xml:4491 #, fuzzy, no-c-format msgid "" "Additionally, these database objects can be optionally scoped so that they " @@ -9691,7 +9835,7 @@ msgstr "" "dass Sie nur in Kraft treten, wenn bestimmte Dialekte verwendet werden." #. Tag: programlisting -#: basic_mapping.xml:4411 +#: basic_mapping.xml:4494 #, fuzzy, no-c-format msgid "" "<hibernate-mapping>\n" @@ -9715,6 +9859,17 @@ msgstr "" " </database-object>\n" "</hibernate-mapping>" +#, fuzzy +#~ msgid "" +#~ "The force attribute is only useful if the table " +#~ "contains rows with \"extra\" discriminator values that are not mapped to " +#~ "a persistent class. This will not usually be the case." +#~ msgstr "" +#~ "Das force-Attribut ist (nur) von Nutzen, wenn die " +#~ "Tabelle eine Reihe mit \"zusätzlichen\" Diskriminatorwerten enthält, die " +#~ "nicht zu einer persistenten Klasse gemappt sind. Dies ist in der Regel " +#~ "jedoch nicht der Fall." + #, fuzzy #~ msgid "Class" #~ msgstr "subclass" diff --git a/documentation/manual/src/main/docbook/de-DE/content/type.po b/documentation/manual/src/main/docbook/de-DE/content/type.po index 53207a160f..2d95f9b3e1 100644 --- a/documentation/manual/src/main/docbook/de-DE/content/type.po +++ b/documentation/manual/src/main/docbook/de-DE/content/type.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: http://bugs.kde.org\n" -"POT-Creation-Date: 2010-07-21 04:35+0000\n" +"POT-Creation-Date: 2011-01-21 21:18+0000\n" "PO-Revision-Date: 2010-07-21 04:32+0000\n" "Last-Translator: Automatically generated\n" "Language-Team: none\n" @@ -714,25 +714,53 @@ msgstr "" #. Tag: classname #: type.xml:456 #, no-c-format -msgid "java.lang.Class" +msgid "java.net.URL" msgstr "" #. Tag: classname #: type.xml:459 #, no-c-format -msgid "org.hibernate.type.ClassType" +msgid "org.hibernate.type.UrlType" msgstr "" #. Tag: para #: type.xml:461 #, no-c-format msgid "" +"Maps a java.net.URL to a JDBC VARCHAR (using the " +"external form)" +msgstr "" + +#. Tag: para +#: type.xml:464 +#, no-c-format +msgid "" +"Registered under url and java.net.URL " +"in the type registry (see )." +msgstr "" + +#. Tag: classname +#: type.xml:473 +#, no-c-format +msgid "java.lang.Class" +msgstr "" + +#. Tag: classname +#: type.xml:476 +#, no-c-format +msgid "org.hibernate.type.ClassType" +msgstr "" + +#. Tag: para +#: type.xml:478 +#, no-c-format +msgid "" "Maps a java.lang.Class to a JDBC VARCHAR (using the " "Class name)" msgstr "" #. Tag: para -#: type.xml:464 +#: type.xml:481 #, no-c-format msgid "" "Registered under class and java.lang.Classjava.sql.Blob to a JDBC BLOB" msgstr "" #. Tag: para -#: type.xml:481 +#: type.xml:498 #, no-c-format msgid "" "Registered under blob and java.sql.Blobjava.sql.Clob to a JDBC CLOB" msgstr "" #. Tag: para -#: type.xml:498 +#: type.xml:515 #, no-c-format msgid "" "Registered under clob and java.sql.Clobbinary and byte[] in " @@ -818,33 +846,59 @@ msgid "" msgstr "" #. Tag: classname -#: type.xml:522 +#: type.xml:539 #, no-c-format msgid "org.hibernate.type.MaterializedBlobType" msgstr "" #. Tag: para -#: type.xml:524 +#: type.xml:541 #, no-c-format msgid "Maps a primitive byte[] to a JDBC BLOB" msgstr "" #. Tag: para -#: type.xml:527 +#: type.xml:544 #, no-c-format msgid "" "Registered under materialized_blob in the type registry " "(see )." msgstr "" +#. Tag: classname +#: type.xml:551 +#, no-c-format +msgid "org.hibernate.type.ImageType" +msgstr "" + #. Tag: para -#: type.xml:541 +#: type.xml:553 +#, no-c-format +msgid "Maps a primitive byte[] to a JDBC LONGVARBINARY" +msgstr "" + +#. Tag: para +#: type.xml:556 +#, no-c-format +msgid "" +"Registered under image in the type registry (see )." +msgstr "" + +#. Tag: title +#: type.xml:565 +#, no-c-format +msgid "Byte[]" +msgstr "" + +#. Tag: para +#: type.xml:570 #, no-c-format msgid "Maps a java.lang.Byte[] to a JDBC VARBINARY" msgstr "" #. Tag: para -#: type.xml:544 +#: type.xml:573 #, no-c-format msgid "" "Registered under wrapper-binary, Byte[]characters and char[] " "in the type registry (see )." msgstr "" +#. Tag: title +#: type.xml:599 +#, no-c-format +msgid "Character[]" +msgstr "" + #. Tag: classname -#: type.xml:573 +#: type.xml:602 #, no-c-format msgid "org.hibernate.type.CharacterArrayType" msgstr "" #. Tag: para -#: type.xml:575 +#: type.xml:604 #, no-c-format msgid "Maps a java.lang.Character[] to a JDBC VARCHAR" msgstr "" #. Tag: para -#: type.xml:578 +#: type.xml:607 #, no-c-format msgid "" "Registered under wrapper-characters, Character[]" @@ -900,25 +960,25 @@ msgid "" msgstr "" #. Tag: classname -#: type.xml:587 +#: type.xml:616 #, no-c-format msgid "java.util.UUID" msgstr "" #. Tag: classname -#: type.xml:590 +#: type.xml:619 #, no-c-format msgid "org.hibernate.type.UUIDBinaryType" msgstr "" #. Tag: para -#: type.xml:592 +#: type.xml:621 #, no-c-format msgid "Maps a java.util.UUID to a JDBC BINARY" msgstr "" #. Tag: para -#: type.xml:595 +#: type.xml:624 #, no-c-format msgid "" "Registered under uuid-binary and java.util.UUIDuuid-char in the type registry (see " @@ -948,13 +1008,13 @@ msgid "" msgstr "" #. Tag: classname -#: type.xml:614 +#: type.xml:643 #, no-c-format msgid "org.hibernate.type.PostgresUUIDType" msgstr "" #. Tag: para -#: type.xml:616 +#: type.xml:645 #, no-c-format msgid "" "Maps a java.util.UUID to the PostgreSQL UUID data type (through " @@ -963,7 +1023,7 @@ msgid "" msgstr "" #. Tag: para -#: type.xml:620 +#: type.xml:649 #, no-c-format msgid "" "Registered under pg-uuid in the type registry (see ." msgstr "" #. Tag: title -#: type.xml:686 +#: type.xml:715 #, no-c-format msgid "Entity types" msgstr "" #. Tag: para -#: type.xml:687 +#: type.xml:716 #, no-c-format msgid "" "The definition of entities is covered in detail in to that Product sku. " @@ -1118,19 +1178,19 @@ msgid "" msgstr "" #. Tag: para -#: type.xml:722 +#: type.xml:751 #, no-c-format msgid "TBC..." msgstr "" #. Tag: title -#: type.xml:728 +#: type.xml:757 #, no-c-format msgid "Custom types" msgstr "" #. Tag: para -#: type.xml:729 +#: type.xml:758 #, no-c-format msgid "" "Hibernate makes it relatively easy for developers to create their own " @@ -1144,7 +1204,7 @@ msgid "" msgstr "" #. Tag: para -#: type.xml:737 +#: type.xml:766 #, no-c-format msgid "" "There are 3 approaches to developing a custom Hibernate type. As a means of " @@ -1155,14 +1215,14 @@ msgid "" msgstr "" #. Tag: title -#: type.xml:744 +#: type.xml:773 #, no-c-format msgid "" "Custom types using org.hibernate.type.Type" msgstr "" #. Tag: para -#: type.xml:745 +#: type.xml:774 #, no-c-format msgid "" "The first approach is to directly implement the org.hibernate." @@ -1178,13 +1238,13 @@ msgid "" msgstr "" #. Tag: title -#: type.xml:756 +#: type.xml:785 #, no-c-format msgid "Defining and registering the custom Type" msgstr "" #. Tag: programlisting -#: type.xml:757 +#: type.xml:786 #, no-c-format msgid "" "before " @@ -1257,7 +1317,7 @@ msgid "" msgstr "" #. Tag: title -#: type.xml:767 +#: type.xml:796 #, no-c-format msgid "" "Custom types using org.hibernate.usertype.UserTypeorg.hibernate.usertype.UserType and " @@ -1275,7 +1335,7 @@ msgid "" msgstr "" #. Tag: para -#: type.xml:776 +#: type.xml:805 #, no-c-format msgid "" "The second approach is the use the org.hibernate.usertype." @@ -1287,13 +1347,13 @@ msgid "" msgstr "" #. Tag: title -#: type.xml:783 +#: type.xml:812 #, no-c-format msgid "Defining the custom UserType" msgstr "" #. Tag: programlisting -#: type.xml:784 +#: type.xml:813 #, no-c-format msgid "" "org.hibernate.type." @@ -1351,7 +1411,7 @@ msgid "" msgstr "" #. Tag: title -#: type.xml:796 +#: type.xml:825 #, no-c-format msgid "" "Custom types using org.hibernate.usertype.CompositeUserTypeorg.hibernate." @@ -1374,13 +1434,13 @@ msgid "" msgstr "" #. Tag: title -#: type.xml:808 +#: type.xml:837 #, no-c-format msgid "Defining the custom CompositeUserType" msgstr "" #. Tag: programlisting -#: type.xml:809 +#: type.xml:838 #, no-c-format msgid "" "StringType" msgstr "" #. Tag: programlisting -#: type.xml:831 +#: type.xml:860 #, no-c-format msgid "" "registerTypeOverride is a " @@ -1525,13 +1585,13 @@ msgid "" msgstr "" #. Tag: title -#: type.xml:839 +#: type.xml:868 #, no-c-format msgid "Snippet from BasicType.java" msgstr "" #. Tag: programlisting -#: type.xml:840 +#: type.xml:869 #, no-c-format msgid "" "/**\n" @@ -1544,7 +1604,7 @@ msgid "" msgstr "" #. Tag: para -#: type.xml:842 +#: type.xml:871 #, no-c-format msgid "" "One approach is to use inheritance (SuperDuperStringType -
+
Basic value types The built-in basic mapping types can be @@ -5573,11 +5573,19 @@ class Home { text - Maps long Java strings to a SQL CLOB or + Maps long Java strings to a SQL LONGVARCHAR or TEXT type. + + image + + + Maps long byte arrays to a SQL LONGVARBINARY. + + + serializable @@ -5603,6 +5611,32 @@ class Home { + + materialized_clob + + + Maps long Java strings to a SQL CLOB + type. When read, the CLOB value is + immediately materialized into a Java string. Some drivers + require the CLOB value to be read within + a transaction. Once materialized, the Java string is + available outside of the transaction. + + + + + materialized_blob + + + Maps long Java byte arrays to a SQL BLOB + type. When read, the BLOB value is + immediately materialized into a byte array. Some drivers + require the BLOB value to be read within + a transaction. Once materialized, the byte array is + available outside of the transaction. + + + imm_date, imm_time, imm_timestamp, imm_calendar, imm_calendar_date, imm_serializable, imm_binary diff --git a/documentation/manual/src/main/docbook/en-US/content/type.xml b/documentation/manual/src/main/docbook/en-US/content/type.xml index cc0c42b524..fd05981fbe 100644 --- a/documentation/manual/src/main/docbook/en-US/content/type.xml +++ b/documentation/manual/src/main/docbook/en-US/content/type.xml @@ -520,7 +520,7 @@
-
+
byte[] @@ -547,10 +547,22 @@ + + org.hibernate.type.ImageType + + + Maps a primitive byte[] to a JDBC LONGVARBINARY + + + Registered under image in the type registry (see + ). + + +
-
- byte[] +
+ Byte[] org.hibernate.type.BinaryType @@ -583,8 +595,8 @@
-
- char[] +
+ Character[] org.hibernate.type.CharacterArrayType diff --git a/documentation/manual/src/main/docbook/es-ES/content/basic_mapping.po b/documentation/manual/src/main/docbook/es-ES/content/basic_mapping.po index ec25c49416..caff512f79 100644 --- a/documentation/manual/src/main/docbook/es-ES/content/basic_mapping.po +++ b/documentation/manual/src/main/docbook/es-ES/content/basic_mapping.po @@ -14,7 +14,7 @@ msgid "" msgstr "" "Project-Id-Version: basic_mapping\n" "Report-Msgid-Bugs-To: http://bugs.kde.org\n" -"POT-Creation-Date: 2010-07-20 21:02+0000\n" +"POT-Creation-Date: 2011-01-21 21:18+0000\n" "PO-Revision-Date: 2010-03-15 12:49+1000\n" "Last-Translator: Angela Garcia \n" "Language-Team: \n" @@ -193,8 +193,7 @@ msgid "" "<?xml version=\"1.0\"?>\n" "<!DOCTYPE hibernate-mapping PUBLIC\n" " \"-//Hibernate/Hibernate Mapping DTD 3.0//EN\"\n" -" \"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd" -"\">\n" +" \"http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd\">\n" "\n" "<hibernate-mapping package=\"eg\">\n" "\n" @@ -746,7 +745,7 @@ msgstr "" "literal>): Especifica que las instancias de la clase (no) son mutables. " #. Tag: para -#: basic_mapping.xml:349 basic_mapping.xml:2912 +#: basic_mapping.xml:349 basic_mapping.xml:2948 #, no-c-format msgid "" "schema (optional): overrides the schema name specified by " @@ -757,7 +756,7 @@ msgstr "" "literal>. " #. Tag: para -#: basic_mapping.xml:355 basic_mapping.xml:2918 +#: basic_mapping.xml:355 basic_mapping.xml:2954 #, no-c-format msgid "" "catalog (optional): overrides the catalog name specified " @@ -1084,7 +1083,7 @@ msgstr "" "identificador. s" #. Tag: para -#: basic_mapping.xml:518 basic_mapping.xml:2141 +#: basic_mapping.xml:518 basic_mapping.xml:2152 #, no-c-format msgid "" "type (optional): a name that indicates the Hibernate type." @@ -3452,8 +3451,8 @@ msgstr "Timestamp (opcional)" #, fuzzy, no-c-format msgid "" "Alternatively, you can use a timestamp. Timestamps are a less safe " -"implementation of optimistic locking. However, sometimes the application " -"might use the timestamps in other ways." +"implementation of optimistic locking. However, sometimes an application " +"might use the timestamps in other ways as well." msgstr "" "El elemento opcional <timestamp> indica que la " "tabla contiene datos con sellos de fecha. Esto brinda una alternativa al " @@ -3485,13 +3484,27 @@ msgstr "" #: basic_mapping.xml:1598 #, no-c-format msgid "" -"Like version numbers, the timestamp can be generated by the database instead " -"of Hibernate. To do that, use @org.hibernate.annotations.Generated" -"(GenerationTime.ALWAYS)." +"When using timestamp versioning you can tell Hibernate where to retrieve the " +"timestamp value from - database or JVM - by optionally adding the " +"@org.hibernate.annotations.Source annotation to the " +"property. Possible values for the value attribute of the annotation are " +"org.hibernate.annotations.SourceType.VM and " +"org.hibernate.annotations.SourceType.DB. The default " +"is SourceType.DB which is also used in case there is " +"no @Source annotation at all." msgstr "" #. Tag: para -#: basic_mapping.xml:1602 +#: basic_mapping.xml:1609 +#, no-c-format +msgid "" +"Like in the case of version numbers, the timestamp can also be generated by " +"the database instead of Hibernate. To do that, use @org.hibernate." +"annotations.Generated(GenerationTime.ALWAYS)." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1613 #, fuzzy, no-c-format msgid "In hbm.xml, use the <timestamp> element:" msgstr "" @@ -3499,7 +3512,7 @@ msgstr "" "literal>:" #. Tag: programlisting -#: basic_mapping.xml:1620 +#: basic_mapping.xml:1631 #, no-c-format msgid "" "<timestamp\n" @@ -3514,7 +3527,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:1624 +#: basic_mapping.xml:1635 #, no-c-format msgid "" "column (optional - defaults to the property name): the " @@ -3524,7 +3537,7 @@ msgstr "" "propiedad): El nombre de una columna que tiene el sello de fecha. " #. Tag: para -#: basic_mapping.xml:1630 +#: basic_mapping.xml:1641 #, no-c-format msgid "" "name: the name of a JavaBeans style property of Java type " @@ -3536,8 +3549,8 @@ msgstr "" "persistente. " #. Tag: para -#: basic_mapping.xml:1636 basic_mapping.xml:2163 basic_mapping.xml:2380 -#: basic_mapping.xml:3226 basic_mapping.xml:3420 basic_mapping.xml:3593 +#: basic_mapping.xml:1647 basic_mapping.xml:2174 basic_mapping.xml:2391 +#: basic_mapping.xml:3262 basic_mapping.xml:3456 basic_mapping.xml:3629 #, no-c-format msgid "" "access (optional - defaults to propertyunsaved-value (optional - defaults to nullsource (optional - defaults to vm): " @@ -3588,7 +3601,7 @@ msgstr "" "debido a la falta de precisión (por ejemplo, Oracle 8)." #. Tag: para -#: basic_mapping.xml:1665 +#: basic_mapping.xml:1676 #, no-c-format msgid "" "generated (optional - defaults to never<Timestamp> is equivalent to <version " @@ -3623,13 +3636,13 @@ msgstr "" "literal>." #. Tag: title -#: basic_mapping.xml:1686 +#: basic_mapping.xml:1697 #, no-c-format msgid "Property" msgstr "Propiedad" #. Tag: para -#: basic_mapping.xml:1688 +#: basic_mapping.xml:1699 #, no-c-format msgid "" "You need to decide which property needs to be made persistent in a given " @@ -3638,13 +3651,13 @@ msgid "" msgstr "" #. Tag: title -#: basic_mapping.xml:1693 +#: basic_mapping.xml:1704 #, no-c-format msgid "Property mapping with annotations" msgstr "" #. Tag: para -#: basic_mapping.xml:1695 +#: basic_mapping.xml:1706 #, no-c-format msgid "" "In the annotations world, every non static non transient property (field or " @@ -3655,7 +3668,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:1702 +#: basic_mapping.xml:1713 #, no-c-format msgid "" "The @Basic annotation allows you to declare the fetching " @@ -3671,13 +3684,13 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:1715 +#: basic_mapping.xml:1726 #, no-c-format msgid "Let's look at a few examples:" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:1717 +#: basic_mapping.xml:1728 #, no-c-format msgid "" "public transient int counter; //transient property\n" @@ -3703,7 +3716,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:1719 +#: basic_mapping.xml:1730 #, no-c-format msgid "" "counter, a transient field, and lengthInMeter@Lob indicates that the property should be persisted in a " @@ -3758,7 +3771,7 @@ msgid "" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:1759 +#: basic_mapping.xml:1770 #, no-c-format msgid "" "@Lob\n" @@ -3773,7 +3786,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:1761 +#: basic_mapping.xml:1772 #, no-c-format msgid "" "If the property type implements java.io.Serializable " @@ -3783,13 +3796,13 @@ msgid "" msgstr "" #. Tag: title -#: basic_mapping.xml:1768 +#: basic_mapping.xml:1779 #, no-c-format msgid "Type" msgstr "" #. Tag: para -#: basic_mapping.xml:1770 +#: basic_mapping.xml:1781 #, no-c-format msgid "" "You can also manually specify a type using the @org.hibernate." @@ -3798,7 +3811,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:1777 basic_mapping.xml:2209 +#: basic_mapping.xml:1788 basic_mapping.xml:2220 #, no-c-format msgid "" "The name of a Hibernate basic type: integer, string, character, " @@ -3809,7 +3822,7 @@ msgstr "" "literal>, etc." #. Tag: para -#: basic_mapping.xml:1783 basic_mapping.xml:2215 +#: basic_mapping.xml:1794 basic_mapping.xml:2226 #, no-c-format msgid "" "The name of a Java class with a default basic type: int, float, " @@ -3821,13 +3834,13 @@ msgstr "" "Clob, etc." #. Tag: para -#: basic_mapping.xml:1789 basic_mapping.xml:2221 +#: basic_mapping.xml:1800 basic_mapping.xml:2232 #, no-c-format msgid "The name of a serializable Java class." msgstr "El nombre de una clase Java serializable." #. Tag: para -#: basic_mapping.xml:1793 basic_mapping.xml:2225 +#: basic_mapping.xml:1804 basic_mapping.xml:2236 #, no-c-format msgid "" "The class name of a custom type: com.illflow.type.MyCustomType etc." #. Tag: para -#: basic_mapping.xml:1798 +#: basic_mapping.xml:1809 #, fuzzy, no-c-format msgid "" "If you do not specify a type, Hibernate will use reflection upon the named " @@ -3854,7 +3867,7 @@ msgstr "" "literal>, o especificar un tipo personalizado." #. Tag: para -#: basic_mapping.xml:1803 +#: basic_mapping.xml:1814 #, no-c-format msgid "" "@org.hibernate.annotations.TypeDef and @org." @@ -3873,7 +3886,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:1819 +#: basic_mapping.xml:1830 #, no-c-format msgid "" "Package level annotations are placed in a file named package-info." @@ -3882,7 +3895,7 @@ msgid "" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:1824 +#: basic_mapping.xml:1835 #, no-c-format msgid "" "@TypeDef(\n" @@ -3902,7 +3915,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:1826 +#: basic_mapping.xml:1837 #, no-c-format msgid "" "The following example shows the usage of the parameters " @@ -3910,7 +3923,7 @@ msgid "" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:1830 +#: basic_mapping.xml:1841 #, no-c-format msgid "" "//in org/hibernate/test/annotations/entity/package-info.java\n" @@ -3936,7 +3949,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:1832 +#: basic_mapping.xml:1843 #, no-c-format msgid "" "When using composite user type, you will have to express column definitions. " @@ -3944,7 +3957,7 @@ msgid "" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:1836 +#: basic_mapping.xml:1847 #, no-c-format msgid "" "@Type(type=\"org.hibernate.test.annotations.entity.MonetaryAmountUserType" @@ -3966,13 +3979,13 @@ msgid "" msgstr "" #. Tag: title -#: basic_mapping.xml:1840 +#: basic_mapping.xml:1851 #, no-c-format msgid "Access type" msgstr "" #. Tag: para -#: basic_mapping.xml:1842 +#: basic_mapping.xml:1853 #, no-c-format msgid "" "By default the access type of a class hierarchy is defined by the position " @@ -3985,7 +3998,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:1850 +#: basic_mapping.xml:1861 #, no-c-format msgid "" "The placement of annotations within a class hierarchy has to be consistent " @@ -3995,31 +4008,31 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:1857 +#: basic_mapping.xml:1868 #, no-c-format msgid "However in some situations, you need to:" msgstr "" #. Tag: para -#: basic_mapping.xml:1861 +#: basic_mapping.xml:1872 #, no-c-format msgid "force the access type of the entity hierarchy" msgstr "" #. Tag: para -#: basic_mapping.xml:1865 +#: basic_mapping.xml:1876 #, no-c-format msgid "override the access type of a specific entity in the class hierarchy" msgstr "" #. Tag: para -#: basic_mapping.xml:1870 +#: basic_mapping.xml:1881 #, no-c-format msgid "override the access type of an embeddable type" msgstr "" #. Tag: para -#: basic_mapping.xml:1874 +#: basic_mapping.xml:1885 #, no-c-format msgid "" "The best use case is an embeddable class used by several entities that might " @@ -4028,7 +4041,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:1879 +#: basic_mapping.xml:1890 #, no-c-format msgid "" "To force the access type on a given class, use the @AccessFIELD " @@ -4109,13 +4122,13 @@ msgid "" msgstr "" #. Tag: title -#: basic_mapping.xml:1896 +#: basic_mapping.xml:1907 #, no-c-format msgid "@org.hibernate.annotations.AccessType" msgstr "" #. Tag: para -#: basic_mapping.xml:1898 +#: basic_mapping.xml:1909 #, no-c-format msgid "" "The annotation @org.hibernate.annotations.AccessType " @@ -4124,13 +4137,13 @@ msgid "" msgstr "" #. Tag: title -#: basic_mapping.xml:1907 +#: basic_mapping.xml:1918 #, no-c-format msgid "Optimistic lock" msgstr "" #. Tag: para -#: basic_mapping.xml:1909 +#: basic_mapping.xml:1920 #, no-c-format msgid "" "It is sometimes useful to avoid increasing the version number even if a " @@ -4140,7 +4153,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:1914 +#: basic_mapping.xml:1925 #, no-c-format msgid "" "More formally, specifies that updates to this property do not require " @@ -4148,13 +4161,13 @@ msgid "" msgstr "" #. Tag: title -#: basic_mapping.xml:1919 +#: basic_mapping.xml:1930 #, no-c-format msgid "Declaring column attributes" msgstr "" #. Tag: para -#: basic_mapping.xml:1921 +#: basic_mapping.xml:1932 #, no-c-format msgid "" "The column(s) used for a property mapping can be defined using the " @@ -4164,37 +4177,37 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:1929 +#: basic_mapping.xml:1940 #, no-c-format msgid "not annotated at all" msgstr "" #. Tag: para -#: basic_mapping.xml:1933 +#: basic_mapping.xml:1944 #, fuzzy, no-c-format msgid "annotated with @Basic" msgstr "assigned" #. Tag: para -#: basic_mapping.xml:1937 +#: basic_mapping.xml:1948 #, fuzzy, no-c-format msgid "annotated with @Version" msgstr "string" #. Tag: para -#: basic_mapping.xml:1941 +#: basic_mapping.xml:1952 #, fuzzy, no-c-format msgid "annotated with @Lob" msgstr "hilo" #. Tag: para -#: basic_mapping.xml:1945 +#: basic_mapping.xml:1956 #, fuzzy, no-c-format msgid "annotated with @Temporal" msgstr "serializable" #. Tag: programlisting -#: basic_mapping.xml:1949 +#: basic_mapping.xml:1960 #, no-c-format msgid "" "@Entity\n" @@ -4206,7 +4219,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:1951 +#: basic_mapping.xml:1962 #, no-c-format msgid "" "The name property is mapped to the flight_namename (optional): the column name (default to the property " @@ -4250,7 +4263,7 @@ msgstr "" "identificador. s" #. Tag: para -#: basic_mapping.xml:1992 +#: basic_mapping.xml:2003 #, fuzzy, no-c-format msgid "" "unique (optional): set a unique constraint on this column " @@ -4261,7 +4274,7 @@ msgstr "" "objetivo de una property-ref. " #. Tag: para -#: basic_mapping.xml:1997 +#: basic_mapping.xml:2008 #, fuzzy, no-c-format msgid "" "nullable (optional): set the column as nullable (default " @@ -4271,7 +4284,7 @@ msgstr "" "identificador. s" #. Tag: para -#: basic_mapping.xml:2002 +#: basic_mapping.xml:2013 #, fuzzy, no-c-format msgid "" "insertable (optional): whether or not the column will be " @@ -4281,7 +4294,7 @@ msgstr "" "identificador. s" #. Tag: para -#: basic_mapping.xml:2008 +#: basic_mapping.xml:2019 #, fuzzy, no-c-format msgid "" "updatable (optional): whether or not the column will be " @@ -4291,7 +4304,7 @@ msgstr "" "de datos. " #. Tag: para -#: basic_mapping.xml:2014 +#: basic_mapping.xml:2025 #, no-c-format msgid "" "columnDefinition (optional): override the sql DDL " @@ -4299,7 +4312,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2020 +#: basic_mapping.xml:2031 #, fuzzy, no-c-format msgid "" "table (optional): define the targeted table (default " @@ -4309,7 +4322,7 @@ msgstr "" "de datos. " #. Tag: para -#: basic_mapping.xml:2025 +#: basic_mapping.xml:2036 #, no-c-format msgid "" "length (optional): column length " @@ -4317,7 +4330,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2030 +#: basic_mapping.xml:2041 #, no-c-format msgid "" "precision (optional): column decimal " @@ -4325,7 +4338,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2035 +#: basic_mapping.xml:2046 #, no-c-format msgid "" "scale (optional): column decimal scale " @@ -4333,13 +4346,13 @@ msgid "" msgstr "" #. Tag: title -#: basic_mapping.xml:2043 +#: basic_mapping.xml:2054 #, no-c-format msgid "Formula" msgstr "" #. Tag: para -#: basic_mapping.xml:2045 +#: basic_mapping.xml:2056 #, no-c-format msgid "" "Sometimes, you want the Database to do some computation for you rather than " @@ -4350,7 +4363,7 @@ msgid "" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:2051 +#: basic_mapping.xml:2062 #, no-c-format msgid "" "@Formula(\"obj_length * obj_height * obj_width\")\n" @@ -4358,32 +4371,32 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2053 +#: basic_mapping.xml:2064 #, no-c-format msgid "" "The SQL fragment can be as complex as you want and even include subselects." msgstr "" #. Tag: title -#: basic_mapping.xml:2058 +#: basic_mapping.xml:2069 #, no-c-format msgid "Non-annotated property defaults" msgstr "" #. Tag: para -#: basic_mapping.xml:2060 +#: basic_mapping.xml:2071 #, no-c-format msgid "If a property is not annotated, the following rules apply:" msgstr "" #. Tag: para -#: basic_mapping.xml:2063 +#: basic_mapping.xml:2074 #, no-c-format msgid "If the property is of a single type, it is mapped as @Basic" msgstr "" #. Tag: para -#: basic_mapping.xml:2068 +#: basic_mapping.xml:2079 #, no-c-format msgid "" "Otherwise, if the type of the property is annotated as @Embeddable, it is " @@ -4391,7 +4404,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2073 +#: basic_mapping.xml:2084 #, no-c-format msgid "" "Otherwise, if the type of the property is Serializablejava.sql.Clob<property> element declares a persistent " @@ -4426,7 +4439,7 @@ msgstr "" "persistente estilo JavaBean de la clase. " #. Tag: programlisting -#: basic_mapping.xml:2125 +#: basic_mapping.xml:2136 #, no-c-format msgid "" "<property\n" @@ -4452,7 +4465,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2129 +#: basic_mapping.xml:2140 #, no-c-format msgid "" "name: the name of the property, with an initial lowercase " @@ -4462,7 +4475,7 @@ msgstr "" "minúscula." #. Tag: para -#: basic_mapping.xml:2134 +#: basic_mapping.xml:2145 #, no-c-format msgid "" "column (optional - defaults to the property name): the " @@ -4475,7 +4488,7 @@ msgstr "" "<column>." #. Tag: para -#: basic_mapping.xml:2146 +#: basic_mapping.xml:2157 #, no-c-format msgid "" "update, insert (optional - defaults to trueformula (optional): an SQL expression that defines the " @@ -4505,7 +4518,7 @@ msgstr "" "computadas no tienen una columna mapeada propia." #. Tag: para -#: basic_mapping.xml:2169 +#: basic_mapping.xml:2180 #, no-c-format msgid "" "lazy (optional - defaults to false): " @@ -4518,7 +4531,7 @@ msgstr "" "instrumentación de código byte en tiempo de compilación." #. Tag: para -#: basic_mapping.xml:2176 +#: basic_mapping.xml:2187 #, no-c-format msgid "" "unique (optional): enables the DDL generation of a unique " @@ -4530,7 +4543,7 @@ msgstr "" "objetivo de una property-ref. " #. Tag: para -#: basic_mapping.xml:2183 +#: basic_mapping.xml:2194 #, no-c-format msgid "" "not-null (optional): enables the DDL generation of a " @@ -4540,7 +4553,7 @@ msgstr "" "restricción de nulabilidad para las columnas. " #. Tag: para -#: basic_mapping.xml:2188 basic_mapping.xml:3246 +#: basic_mapping.xml:2199 basic_mapping.xml:3282 #, no-c-format msgid "" "optimistic-lock (optional - defaults to truegenerated (optional - defaults to neverpropiedades generadas para obtener mayor información. " #. Tag: para -#: basic_mapping.xml:2205 +#: basic_mapping.xml:2216 #, no-c-format msgid "typename could be:" msgstr "escribanombre puede ser:" #. Tag: para -#: basic_mapping.xml:2230 +#: basic_mapping.xml:2241 #, no-c-format msgid "" "If you do not specify a type, Hibernate will use reflection upon the named " @@ -4595,7 +4608,7 @@ msgstr "" "literal>, o especificar un tipo personalizado." #. Tag: para -#: basic_mapping.xml:2239 +#: basic_mapping.xml:2250 #, no-c-format msgid "" "The access attribute allows you to control how Hibernate " @@ -4616,7 +4629,7 @@ msgstr "" "literal>." #. Tag: para -#: basic_mapping.xml:2248 +#: basic_mapping.xml:2259 #, no-c-format msgid "" "A powerful feature is derived properties. These properties are by definition " @@ -4631,7 +4644,7 @@ msgstr "" "SELECT en la consulta SQL que carga una instancia:" #. Tag: programlisting -#: basic_mapping.xml:2254 +#: basic_mapping.xml:2265 #, no-c-format msgid "" "<property name=\"totalPrice\"\n" @@ -4643,7 +4656,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2256 +#: basic_mapping.xml:2267 #, no-c-format msgid "" "You can reference the entity table by not declaring an alias on a particular " @@ -4657,13 +4670,13 @@ msgstr "" " si no quiere utilizar el atributo." #. Tag: title -#: basic_mapping.xml:2265 +#: basic_mapping.xml:2276 #, no-c-format msgid "Embedded objects (aka components)" msgstr "" #. Tag: para -#: basic_mapping.xml:2267 +#: basic_mapping.xml:2278 #, fuzzy, no-c-format msgid "" "Embeddable objects (or components) are objects whose properties are mapped " @@ -4676,7 +4689,7 @@ msgstr "" "colecciones. Vea a continuación los \"componentes\":" #. Tag: para -#: basic_mapping.xml:2272 +#: basic_mapping.xml:2283 #, no-c-format msgid "" "It is possible to declare an embedded component inside an entity and even " @@ -4688,7 +4701,7 @@ msgid "" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:2280 +#: basic_mapping.xml:2291 #, no-c-format msgid "" "@Entity\n" @@ -4710,7 +4723,7 @@ msgid "" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:2282 +#: basic_mapping.xml:2293 #, no-c-format msgid "" "@Embeddable\n" @@ -4721,7 +4734,7 @@ msgid "" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:2284 +#: basic_mapping.xml:2295 #, no-c-format msgid "" "@Embeddable\n" @@ -4740,7 +4753,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2286 +#: basic_mapping.xml:2297 #, no-c-format msgid "" "An embeddable object inherits the access type of its owning entity (note " @@ -4748,7 +4761,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2290 +#: basic_mapping.xml:2301 #, no-c-format msgid "" "The Person entity has two component properties, " @@ -4766,7 +4779,7 @@ msgid "" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:2305 +#: basic_mapping.xml:2316 #, no-c-format msgid "" "@Embedded\n" @@ -4783,7 +4796,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2307 +#: basic_mapping.xml:2318 #, no-c-format msgid "" "Hibernate Annotations supports something that is not explicitly supported by " @@ -4794,7 +4807,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2313 +#: basic_mapping.xml:2324 #, no-c-format msgid "" "You can also use association annotations in an embeddable object (ie " @@ -4805,7 +4818,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2319 +#: basic_mapping.xml:2330 #, no-c-format msgid "" "If you want to have the same embeddable object type twice in the same " @@ -4819,7 +4832,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2329 +#: basic_mapping.xml:2340 #, no-c-format msgid "" "If a property of the embedded object points back to the owning entity, " @@ -4828,13 +4841,13 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2334 +#: basic_mapping.xml:2345 #, no-c-format msgid "In XML, use the <component> element." msgstr "" #. Tag: programlisting -#: basic_mapping.xml:2356 +#: basic_mapping.xml:2367 #, no-c-format msgid "" "<component\n" @@ -4856,13 +4869,13 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2360 basic_mapping.xml:3181 basic_mapping.xml:3381 +#: basic_mapping.xml:2371 basic_mapping.xml:3217 basic_mapping.xml:3417 #, no-c-format msgid "name: the name of the property." msgstr "name: El nombre de la propiedad. " #. Tag: para -#: basic_mapping.xml:2364 +#: basic_mapping.xml:2375 #, no-c-format msgid "" "class (optional - defaults to the property type " @@ -4872,7 +4885,7 @@ msgstr "" "determinado por reflección): El nombre de la clase del componente (hijo). " #. Tag: para -#: basic_mapping.xml:2370 basic_mapping.xml:3641 +#: basic_mapping.xml:2381 basic_mapping.xml:3677 #, no-c-format msgid "" "insert: do the mapped columns appear in SQL " @@ -4882,7 +4895,7 @@ msgstr "" "INSERTs SQL? " #. Tag: para -#: basic_mapping.xml:2375 basic_mapping.xml:3646 +#: basic_mapping.xml:2386 basic_mapping.xml:3682 #, no-c-format msgid "" "update: do the mapped columns appear in SQL " @@ -4892,7 +4905,7 @@ msgstr "" "UPDATEs SQL?" #. Tag: para -#: basic_mapping.xml:2386 +#: basic_mapping.xml:2397 #, no-c-format msgid "" "lazy (optional - defaults to false): " @@ -4905,7 +4918,7 @@ msgstr "" "instrumentación de código byte en tiempo de compilación." #. Tag: para -#: basic_mapping.xml:2393 +#: basic_mapping.xml:2404 #, no-c-format msgid "" "optimistic-lock (optional - defaults to trueunique (optional - defaults to false): " @@ -4931,7 +4944,7 @@ msgstr "" "columnas mapeadas del componente." #. Tag: para -#: basic_mapping.xml:2408 +#: basic_mapping.xml:2419 #, no-c-format msgid "" "The child <property> tags map properties of the " @@ -4941,7 +4954,7 @@ msgstr "" "de la clase hija a las columnas de la tabla." #. Tag: para -#: basic_mapping.xml:2411 +#: basic_mapping.xml:2422 #, no-c-format msgid "" "The <component> element allows a <" @@ -4953,7 +4966,7 @@ msgstr "" "componente como una referencia a la entidad contenedora." #. Tag: para -#: basic_mapping.xml:2415 +#: basic_mapping.xml:2426 #, fuzzy, no-c-format msgid "" "The <dynamic-component> element allows a " @@ -4967,13 +4980,13 @@ msgstr "" "linkend=\"components-dynamic\" /> para obtener mayor información. " #. Tag: title -#: basic_mapping.xml:2423 +#: basic_mapping.xml:2434 #, no-c-format msgid "Inheritance strategy" msgstr "" #. Tag: para -#: basic_mapping.xml:2425 +#: basic_mapping.xml:2436 #, no-c-format msgid "" "Java is a language supporting polymorphism: a class can inherit from " @@ -4981,7 +4994,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2431 +#: basic_mapping.xml:2442 #, no-c-format msgid "" "Single table per class hierarchy strategy: a single table hosts all the " @@ -4989,7 +5002,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2436 +#: basic_mapping.xml:2447 #, no-c-format msgid "" "Joined subclass strategy: one table per class and subclass is present and " @@ -4999,7 +5012,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2443 +#: basic_mapping.xml:2454 #, no-c-format msgid "" "Table per class strategy: one table per concrete class and subclass is " @@ -5009,13 +5022,13 @@ msgid "" msgstr "" #. Tag: title -#: basic_mapping.xml:2451 +#: basic_mapping.xml:2462 #, no-c-format msgid "Single table per class hierarchy strategy" msgstr "" #. Tag: para -#: basic_mapping.xml:2453 +#: basic_mapping.xml:2464 #, no-c-format msgid "" "With this approach the properties of all the subclasses in a given mapped " @@ -5023,7 +5036,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2456 +#: basic_mapping.xml:2467 #, fuzzy, no-c-format msgid "" "Each subclass declares its own persistent properties and subclasses. Version " @@ -5039,7 +5052,7 @@ msgstr "" "completamente calificado de clase Java." #. Tag: programlisting -#: basic_mapping.xml:2462 basic_mapping.xml:2540 +#: basic_mapping.xml:2473 basic_mapping.xml:2581 #, no-c-format msgid "" "@Entity\n" @@ -5057,7 +5070,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2464 +#: basic_mapping.xml:2475 #, fuzzy, no-c-format msgid "" "In hbm.xml, for the table-per-class-hierarchy mapping strategy, the " @@ -5069,7 +5082,7 @@ msgstr "" "ejemplo:" #. Tag: programlisting -#: basic_mapping.xml:2479 +#: basic_mapping.xml:2490 #, no-c-format msgid "" "<subclass\n" @@ -5089,7 +5102,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2483 basic_mapping.xml:2656 basic_mapping.xml:2720 +#: basic_mapping.xml:2494 basic_mapping.xml:2692 basic_mapping.xml:2756 #, no-c-format msgid "" "name: the fully qualified class name of the subclass." @@ -5098,7 +5111,7 @@ msgstr "" "subclase. " #. Tag: para -#: basic_mapping.xml:2488 +#: basic_mapping.xml:2499 #, no-c-format msgid "" "discriminator-value (optional - defaults to the class " @@ -5108,7 +5121,7 @@ msgstr "" "de la clase): Un valor que distingue subclases individuales. " #. Tag: para -#: basic_mapping.xml:2494 +#: basic_mapping.xml:2505 #, no-c-format msgid "" "proxy (optional): specifies a class or interface used for " @@ -5118,7 +5131,7 @@ msgstr "" "utiliza para proxies de inicialización perezosa." #. Tag: para -#: basic_mapping.xml:2499 +#: basic_mapping.xml:2510 #, no-c-format msgid "" "lazy (optional - defaults to true): " @@ -5129,7 +5142,7 @@ msgstr "" "recuperación perezosa. " #. Tag: para -#: basic_mapping.xml:2507 basic_mapping.xml:2685 basic_mapping.xml:2746 +#: basic_mapping.xml:2518 basic_mapping.xml:2721 basic_mapping.xml:2782 #, fuzzy, no-c-format msgid "" "For information about inheritance mappings see ." #. Tag: title -#: basic_mapping.xml:2511 +#: basic_mapping.xml:2522 #, no-c-format msgid "Discriminator" msgstr "Discriminador" #. Tag: para -#: basic_mapping.xml:2513 +#: basic_mapping.xml:2524 #, fuzzy, no-c-format msgid "" "Discriminators are required for polymorphic persistence using the table-per-" "class-hierarchy mapping strategy. It declares a discriminator column of the " "table. The discriminator column contains marker values that tell the " -"persistence layer what subclass to instantiate for a particular row. A " -"restricted set of types can be used: string, " -"character, integer, byte, short, boolean, " -"yes_no, true_false." +"persistence layer what subclass to instantiate for a particular row. " +"Hibernate Core supports the follwoing restricted set of types as " +"discriminator column: string, character, integer, byte, " +"short, boolean, yes_no, true_false." msgstr "" "Se necesita el elemento <discriminator> para la " "persistencia polimórfica utilizando la estrategia de mapeo de tabla-por-" @@ -5168,21 +5182,56 @@ msgstr "" "yes_no, true_false." #. Tag: para -#: basic_mapping.xml:2523 +#: basic_mapping.xml:2535 #, no-c-format msgid "" "Use the @DiscriminatorColumn to define the " -"discriminator column as well as the discriminator type. Alternatively, you " -"can also use @DiscriminatorFormula to express in SQL " -"what would be in a virtual discriminator column. This is particularly handy " -"when the discriminator value can be extracted from one or more columns of " -"the table. Both @DiscriminatorColumn and " -"@DiscriminatorFormula are to be set on the root " -"entity (once per persisted hierarchy)." +"discriminator column as well as the discriminator type. " +"The enum DiscriminatorType used in " +"javax.persitence.DiscriminatorColumn only contains " +"the values STRING, CHAR and " +"INTEGER which means that not all Hibernate supported " +"types are available via the @DiscriminatorColumn " +"annotation. You can also use @DiscriminatorFormula to express in SQL a virtual discriminator column. This is " +"particularly useful when the discriminator value can be extracted from one " +"or more columns of the table. Both @DiscriminatorColumn and @DiscriminatorFormula are to be set on " +"the root entity (once per persisted hierarchy)." msgstr "" #. Tag: para -#: basic_mapping.xml:2534 +#: basic_mapping.xml:2552 +#, no-c-format +msgid "" +"@org.hibernate.annotations.DiscriminatorOptions " +"allows to optionally specify Hibernate specific discriminator options which " +"are not standardized in JPA. The available options are force and insert. The force " +"attribute is useful if the table contains rows with \"extra\" discriminator " +"values that are not mapped to a persistent class. This could for example " +"occur when working with a legacy database. If force is " +"set to true Hibernate will specify the allowed " +"discriminator values in the SELECT query, even when " +"retrieving all instances of the root class. The second option - " +"insert - tells Hibernate whether or not to include the " +"discriminator column in SQL INSERTs. Usually the column " +"should be part of the INSERT statement, but if your " +"discriminator column is also part of a mapped composite identifier you have " +"to set this option to false." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2569 +#, no-c-format +msgid "" +"There is also a @org.hibernate.annotations.ForceDiscriminator annotation which is deprecated since version 3.6. Use " +"@DiscriminatorOptions instead." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2575 #, no-c-format msgid "" "Finally, use @DiscriminatorValue on each class of the " @@ -5192,7 +5241,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2542 +#: basic_mapping.xml:2583 #, no-c-format msgid "" "In hbm.xml, the <discriminator> element is used to " @@ -5200,7 +5249,7 @@ msgid "" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:2559 +#: basic_mapping.xml:2600 #, no-c-format msgid "" "<discriminator\n" @@ -5213,7 +5262,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2563 +#: basic_mapping.xml:2604 #, no-c-format msgid "" "column (optional - defaults to class): " @@ -5223,7 +5272,7 @@ msgstr "" "literal>) el nombre de la columna discriminadora. " #. Tag: para -#: basic_mapping.xml:2569 +#: basic_mapping.xml:2610 #, no-c-format msgid "" "type (optional - defaults to string): " @@ -5233,7 +5282,7 @@ msgstr "" "literal>) un nombre que indica el tipo Hibernate. " #. Tag: para -#: basic_mapping.xml:2575 +#: basic_mapping.xml:2616 #, no-c-format msgid "" "force (optional - defaults to false): " @@ -5246,7 +5295,7 @@ msgstr "" "de la clase raíz. " #. Tag: para -#: basic_mapping.xml:2582 +#: basic_mapping.xml:2623 #, no-c-format msgid "" "insert (optional - defaults to true): " @@ -5261,7 +5310,7 @@ msgstr "" "literal>." #. Tag: para -#: basic_mapping.xml:2590 +#: basic_mapping.xml:2631 #, no-c-format msgid "" "formula (optional): an arbitrary SQL expression that is " @@ -5273,7 +5322,7 @@ msgstr "" "base en el contenido." #. Tag: para -#: basic_mapping.xml:2597 +#: basic_mapping.xml:2638 #, no-c-format msgid "" "Actual values of the discriminator column are specified by the " @@ -5285,19 +5334,7 @@ msgstr "" "<class> y <subclass>." #. Tag: para -#: basic_mapping.xml:2602 -#, no-c-format -msgid "" -"The force attribute is only useful if the table contains " -"rows with \"extra\" discriminator values that are not mapped to a persistent " -"class. This will not usually be the case." -msgstr "" -"El atributo force es sólamente útil si la tabla contiene " -"filas con valores discriminadores \"extra\" que no estén mapeados a una " -"clase persistente. Generalmente este no es el caso." - -#. Tag: para -#: basic_mapping.xml:2607 +#: basic_mapping.xml:2643 #, no-c-format msgid "" "The formula attribute allows you to declare an arbitrary " @@ -5307,7 +5344,7 @@ msgstr "" "arbitraria que será utilizada para evaluar el tipo de una fila. Por ejemplo: " #. Tag: programlisting -#: basic_mapping.xml:2611 +#: basic_mapping.xml:2647 #, no-c-format msgid "" "<discriminator\n" @@ -5316,13 +5353,13 @@ msgid "" msgstr "" #. Tag: title -#: basic_mapping.xml:2616 +#: basic_mapping.xml:2652 #, fuzzy, no-c-format msgid "Joined subclass strategy" msgstr "joined-subclass " #. Tag: para -#: basic_mapping.xml:2618 +#: basic_mapping.xml:2654 #, fuzzy, no-c-format msgid "" "Each subclass can also be mapped to its own table. This is called the table-" @@ -5340,7 +5377,7 @@ msgstr "" "<joined-subclass>. Por ejemplo:" #. Tag: programlisting -#: basic_mapping.xml:2628 +#: basic_mapping.xml:2664 #, no-c-format msgid "" "@Entity @Table(name=\"CATS\")\n" @@ -5361,7 +5398,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2631 +#: basic_mapping.xml:2667 #, no-c-format msgid "" "The table name still defaults to the non qualified class name. Also if " @@ -5371,7 +5408,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2638 +#: basic_mapping.xml:2674 #, fuzzy, no-c-format msgid "" "In hbm.xml, use the <joined-subclass> element. For " @@ -5381,7 +5418,7 @@ msgstr "" "literal>. Por ejemplo:" #. Tag: programlisting -#: basic_mapping.xml:2652 +#: basic_mapping.xml:2688 #, no-c-format msgid "" "<joined-subclass\n" @@ -5407,13 +5444,13 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2661 basic_mapping.xml:2725 +#: basic_mapping.xml:2697 basic_mapping.xml:2761 #, no-c-format msgid "table: the name of the subclass table." msgstr "table: El nombre de tabla de la subclase. " #. Tag: para -#: basic_mapping.xml:2666 basic_mapping.xml:2730 +#: basic_mapping.xml:2702 basic_mapping.xml:2766 #, no-c-format msgid "" "proxy (optional): specifies a class or interface to use " @@ -5423,7 +5460,7 @@ msgstr "" "debe utilizar para proxies de inicialización perezosa. " #. Tag: para -#: basic_mapping.xml:2671 basic_mapping.xml:2735 +#: basic_mapping.xml:2707 basic_mapping.xml:2771 #, no-c-format msgid "" "lazy (optional, defaults to true): " @@ -5434,7 +5471,7 @@ msgstr "" "recuperación perezosa. " #. Tag: para -#: basic_mapping.xml:2679 +#: basic_mapping.xml:2715 #, no-c-format msgid "" "Use the <key> element to declare the primary key / " @@ -5443,13 +5480,13 @@ msgid "" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:2683 +#: basic_mapping.xml:2719 #, no-c-format msgid "" "<?xml version=\"1.0\"?>\n" "<!DOCTYPE hibernate-mapping PUBLIC\n" " \"-//Hibernate/Hibernate Mapping DTD//EN\"\n" -" \"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd\">\n" +" \"http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd\">\n" "\n" "<hibernate-mapping package=\"eg\">\n" "\n" @@ -5481,13 +5518,13 @@ msgid "" msgstr "" #. Tag: title -#: basic_mapping.xml:2690 +#: basic_mapping.xml:2726 #, no-c-format msgid "Table per class strategy" msgstr "" #. Tag: para -#: basic_mapping.xml:2692 +#: basic_mapping.xml:2728 #, fuzzy, no-c-format msgid "" "A third option is to map only the concrete classes of an inheritance " @@ -5510,7 +5547,7 @@ msgstr "" "ejemplo:" #. Tag: programlisting -#: basic_mapping.xml:2701 +#: basic_mapping.xml:2737 #, no-c-format msgid "" "@Entity\n" @@ -5519,13 +5556,13 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2703 +#: basic_mapping.xml:2739 #, no-c-format msgid "Or in hbm.xml:" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:2716 +#: basic_mapping.xml:2752 #, no-c-format msgid "" "<union-subclass\n" @@ -5550,7 +5587,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2743 +#: basic_mapping.xml:2779 #, no-c-format msgid "" "No discriminator column or key column is required for this mapping strategy." @@ -5559,13 +5596,13 @@ msgstr "" "estrategia de mapeo." #. Tag: title -#: basic_mapping.xml:2751 +#: basic_mapping.xml:2787 #, no-c-format msgid "Inherit properties from superclasses" msgstr "" #. Tag: para -#: basic_mapping.xml:2753 +#: basic_mapping.xml:2789 #, no-c-format msgid "" "This is sometimes useful to share common properties through a technical or a " @@ -5575,7 +5612,7 @@ msgid "" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:2758 +#: basic_mapping.xml:2794 #, no-c-format msgid "" "@MappedSuperclass\n" @@ -5594,7 +5631,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2760 +#: basic_mapping.xml:2796 #, no-c-format msgid "" "In database, this hierarchy will be represented as an Order@MappedSuperclass@Embeddable objects to " @@ -5631,7 +5668,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2786 +#: basic_mapping.xml:2822 #, no-c-format msgid "" "It is allowed to mark a class as @MappedSuperclass in the " @@ -5639,7 +5676,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2792 +#: basic_mapping.xml:2828 #, no-c-format msgid "" "Any class in the hierarchy non annotated with @MappedSuperclassaltitude property will be persisted in an " @@ -5700,7 +5737,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2809 +#: basic_mapping.xml:2845 #, no-c-format msgid "" "You can define @AttributeOverride(s) and " @@ -5710,7 +5747,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2815 +#: basic_mapping.xml:2851 #, no-c-format msgid "" "In hbm.xml, simply map the properties of the superclass in the <" @@ -5718,13 +5755,13 @@ msgid "" msgstr "" #. Tag: title -#: basic_mapping.xml:2821 +#: basic_mapping.xml:2857 #, no-c-format msgid "Mapping one entity to several tables" msgstr "" #. Tag: para -#: basic_mapping.xml:2823 +#: basic_mapping.xml:2859 #, no-c-format msgid "" "While not recommended for a fresh schema, some legacy databases force your " @@ -5732,7 +5769,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2826 +#: basic_mapping.xml:2862 #, no-c-format msgid "" "Using the @SecondaryTable or @SecondaryTablesname will be in MainCat@org.hibernate." @@ -5805,7 +5842,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2850 +#: basic_mapping.xml:2886 #, fuzzy, no-c-format msgid "" "fetch: If set to JOIN, the default, Hibernate will use an " @@ -5830,7 +5867,7 @@ msgstr "" "literal> definido por la clase y sus superclases." #. Tag: para -#: basic_mapping.xml:2862 +#: basic_mapping.xml:2898 #, fuzzy, no-c-format msgid "" "inverse: If true, Hibernate will not try to insert or " @@ -5841,7 +5878,7 @@ msgstr "" "propiedades definidas por esta unión. " #. Tag: para -#: basic_mapping.xml:2868 +#: basic_mapping.xml:2904 #, fuzzy, no-c-format msgid "" "optional: If enabled (the default), Hibernate will insert " @@ -5854,7 +5891,7 @@ msgstr "" "unión externa para recuperar las propiedades." #. Tag: para -#: basic_mapping.xml:2875 +#: basic_mapping.xml:2911 #, no-c-format msgid "" "foreignKey: defines the Foreign Key name of a secondary " @@ -5862,7 +5899,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2880 +#: basic_mapping.xml:2916 #, no-c-format msgid "" "Make sure to use the secondary table name in the appliesto<join> element." msgstr "" @@ -5917,7 +5954,7 @@ msgstr "" "literal>:" #. Tag: programlisting -#: basic_mapping.xml:2903 +#: basic_mapping.xml:2939 #, no-c-format msgid "" "<join\n" @@ -5936,13 +5973,13 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2907 +#: basic_mapping.xml:2943 #, no-c-format msgid "table: the name of the joined table." msgstr "table: El nombre de la tabla unida. " #. Tag: para -#: basic_mapping.xml:2924 +#: basic_mapping.xml:2960 #, no-c-format msgid "" "fetch (optional - defaults to join): " @@ -5968,7 +6005,7 @@ msgstr "" "literal> definido por la clase y sus superclases." #. Tag: para -#: basic_mapping.xml:2939 +#: basic_mapping.xml:2975 #, no-c-format msgid "" "inverse (optional - defaults to falseoptional (optional - defaults to false@ManyToOne or " @@ -6061,7 +6098,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2978 +#: basic_mapping.xml:3014 #, no-c-format msgid "" "@ManyToOne and @OneToOne have a " @@ -6073,7 +6110,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2985 +#: basic_mapping.xml:3021 #, no-c-format msgid "" "Setting a value of the cascade attribute to any " @@ -6082,7 +6119,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2992 +#: basic_mapping.xml:3028 #, no-c-format msgid "" "basic operations, which include: persist, merge, delete, save-" @@ -6090,7 +6127,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2998 +#: basic_mapping.xml:3034 #, fuzzy, no-c-format msgid "" "special values: delete-orphan or all ;" @@ -6099,7 +6136,7 @@ msgstr "" "literal> en lugar de class." #. Tag: para -#: basic_mapping.xml:3003 +#: basic_mapping.xml:3039 #, no-c-format msgid "" "comma-separated combinations of operation names: cascade=\"persist," @@ -6109,7 +6146,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:3012 +#: basic_mapping.xml:3048 #, no-c-format msgid "" "By default, single point associations are eagerly fetched in JPA 2. You can " @@ -6124,7 +6161,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:3022 +#: basic_mapping.xml:3058 #, no-c-format msgid "" "With the default JPA options, single-ended associations are loaded with a " @@ -6140,13 +6177,13 @@ msgid "" msgstr "" #. Tag: title -#: basic_mapping.xml:3034 +#: basic_mapping.xml:3070 #, fuzzy, no-c-format msgid "Using a foreign key or an association table" msgstr "asociaciones de clave foránea única" #. Tag: para -#: basic_mapping.xml:3036 +#: basic_mapping.xml:3072 #, fuzzy, no-c-format msgid "An ordinary association to another persistent class is declared using a" msgstr "" @@ -6154,7 +6191,7 @@ msgstr "" "utilizando un elemento one-to-one." #. Tag: para -#: basic_mapping.xml:3041 +#: basic_mapping.xml:3077 #, no-c-format msgid "" "@ManyToOne if several entities can point to the the " @@ -6162,7 +6199,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:3046 +#: basic_mapping.xml:3082 #, no-c-format msgid "" "@OneToOne if only a single entity can point to the " @@ -6170,7 +6207,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:3051 +#: basic_mapping.xml:3087 #, no-c-format msgid "" "and a foreign key in one table is referencing the primary key column(s) of " @@ -6178,7 +6215,7 @@ msgid "" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:3054 +#: basic_mapping.xml:3090 #, no-c-format msgid "" "@Entity\n" @@ -6193,7 +6230,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:3056 +#: basic_mapping.xml:3092 #, no-c-format msgid "" "The @JoinColumn attribute is optional, the default value" @@ -6205,7 +6242,7 @@ msgid "" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:3064 +#: basic_mapping.xml:3100 #, no-c-format msgid "" "@Entity\n" @@ -6225,7 +6262,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:3066 +#: basic_mapping.xml:3102 #, no-c-format msgid "" "You can also map a to one association through an association table. This " @@ -6237,7 +6274,7 @@ msgid "" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:3074 +#: basic_mapping.xml:3110 #, no-c-format msgid "" "@Entity\n" @@ -6255,7 +6292,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:3077 +#: basic_mapping.xml:3113 #, no-c-format msgid "" "You can use a SQL fragment to simulate a physical join column using the " @@ -6266,7 +6303,7 @@ msgid "" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:3083 +#: basic_mapping.xml:3119 #, no-c-format msgid "" "@Entity\n" @@ -6281,7 +6318,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:3086 +#: basic_mapping.xml:3122 #, no-c-format msgid "" "You can mark an association as mandatory by using the " @@ -6292,7 +6329,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:3092 +#: basic_mapping.xml:3128 #, no-c-format msgid "" "When Hibernate cannot resolve the association because the expected " @@ -6303,13 +6340,13 @@ msgid "" msgstr "" #. Tag: title -#: basic_mapping.xml:3100 +#: basic_mapping.xml:3136 #, no-c-format msgid "@NotFound annotation" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:3102 +#: basic_mapping.xml:3138 #, no-c-format msgid "" "@Entity\n" @@ -6323,7 +6360,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:3105 +#: basic_mapping.xml:3141 #, no-c-format msgid "" "Sometimes you want to delegate to your database the deletion of cascade when " @@ -6332,13 +6369,13 @@ msgid "" msgstr "" #. Tag: title -#: basic_mapping.xml:3110 +#: basic_mapping.xml:3146 #, no-c-format msgid "@OnDelete annotation" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:3112 +#: basic_mapping.xml:3148 #, no-c-format msgid "" "@Entity\n" @@ -6352,7 +6389,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:3115 +#: basic_mapping.xml:3151 #, no-c-format msgid "" "Foreign key constraints, while generated by Hibernate, have a fairly " @@ -6361,13 +6398,13 @@ msgid "" msgstr "" #. Tag: title -#: basic_mapping.xml:3120 +#: basic_mapping.xml:3156 #, fuzzy, no-c-format msgid "@ForeignKey annotation" msgstr "asociaciones de clave foránea única" #. Tag: programlisting -#: basic_mapping.xml:3122 +#: basic_mapping.xml:3158 #, no-c-format msgid "" "@Entity\n" @@ -6384,7 +6421,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:3125 +#: basic_mapping.xml:3161 #, no-c-format msgid "" "Sometimes, you want to link one entity to an other not by the target entity " @@ -6394,7 +6431,7 @@ msgid "" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:3130 basic_mapping.xml:3682 +#: basic_mapping.xml:3166 basic_mapping.xml:3718 #, no-c-format msgid "" "@Entity\n" @@ -6419,14 +6456,14 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:3132 +#: basic_mapping.xml:3168 #, no-c-format msgid "" "This is not encouraged however and should be reserved to legacy mappings." msgstr "" #. Tag: para -#: basic_mapping.xml:3135 +#: basic_mapping.xml:3171 #, no-c-format msgid "" "In hbm.xml, mapping an association is similar. The main difference is that a " @@ -6435,7 +6472,7 @@ msgid "" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:3177 +#: basic_mapping.xml:3213 #, no-c-format msgid "" "<many-to-one\n" @@ -6464,7 +6501,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:3185 basic_mapping.xml:3868 +#: basic_mapping.xml:3221 basic_mapping.xml:3904 #, no-c-format msgid "" "column (optional): the name of the foreign key column. " @@ -6476,7 +6513,7 @@ msgstr "" "elementos anidados <column>. " #. Tag: para -#: basic_mapping.xml:3191 basic_mapping.xml:3385 +#: basic_mapping.xml:3227 basic_mapping.xml:3421 #, no-c-format msgid "" "class (optional - defaults to the property type " @@ -6486,7 +6523,7 @@ msgstr "" "determinado por reflección): El nombre de la clase asociada. " #. Tag: para -#: basic_mapping.xml:3197 basic_mapping.xml:3391 +#: basic_mapping.xml:3233 basic_mapping.xml:3427 #, no-c-format msgid "" "cascade (optional): specifies which operations should be " @@ -6496,7 +6533,7 @@ msgstr "" "cascada desde el objeto padre hasta el objeto asociado. " #. Tag: para -#: basic_mapping.xml:3203 basic_mapping.xml:3407 +#: basic_mapping.xml:3239 basic_mapping.xml:3443 #, no-c-format msgid "" "fetch (optional - defaults to select): " @@ -6507,7 +6544,7 @@ msgstr "" "recuperación por selección secuencial." #. Tag: para -#: basic_mapping.xml:3209 +#: basic_mapping.xml:3245 #, no-c-format msgid "" "update, insert (optional - defaults to trueproperty-ref (optional): the name of a property of the " @@ -6538,7 +6575,7 @@ msgstr "" "especifica, se utiliza la llave principal de la clase asociada." #. Tag: para -#: basic_mapping.xml:3232 +#: basic_mapping.xml:3268 #, no-c-format msgid "" "unique (optional): enables the DDL generation of a unique " @@ -6552,7 +6589,7 @@ msgstr "" "que la asociación sea de multiplicidad uno-a-uno." #. Tag: para -#: basic_mapping.xml:3240 +#: basic_mapping.xml:3276 #, no-c-format msgid "" "not-null (optional): enables the DDL generation of a " @@ -6562,7 +6599,7 @@ msgstr "" "restricción de nulabilidad para las columnas de clave foránea. " #. Tag: para -#: basic_mapping.xml:3254 +#: basic_mapping.xml:3290 #, no-c-format msgid "" "lazy (optional - defaults to proxy): " @@ -6581,7 +6618,7 @@ msgstr "" "siempre será recuperada tempranamente." #. Tag: para -#: basic_mapping.xml:3264 +#: basic_mapping.xml:3300 #, no-c-format msgid "" "not-found (optional - defaults to exceptionentity-name (optional): the entity name of the associated " @@ -6605,7 +6642,7 @@ msgstr "" "asociada. " #. Tag: para -#: basic_mapping.xml:3277 +#: basic_mapping.xml:3313 #, no-c-format msgid "" "formula (optional): an SQL expression that defines the " @@ -6615,7 +6652,7 @@ msgstr "" "para una clave foránea computada." #. Tag: para -#: basic_mapping.xml:3284 +#: basic_mapping.xml:3320 #, fuzzy, no-c-format msgid "" "Setting a value of the cascade attribute to any " @@ -6644,7 +6681,7 @@ msgstr "" "muchos-a-uno y uno-a-uno no soportan el borrado de huérfanos." #. Tag: para -#: basic_mapping.xml:3298 +#: basic_mapping.xml:3334 #, no-c-format msgid "" "Here is an example of a typical many-to-one declaration:" @@ -6652,14 +6689,14 @@ msgstr "" "Este es un ejemplo de una declaración típica muchos-a-uno:" #. Tag: programlisting -#: basic_mapping.xml:3301 +#: basic_mapping.xml:3337 #, no-c-format msgid "" "<many-to-one name=\"product\" class=\"Product\" column=\"PRODUCT_ID\"/>" msgstr "" #. Tag: para -#: basic_mapping.xml:3303 +#: basic_mapping.xml:3339 #, no-c-format msgid "" "The property-ref attribute should only be used for " @@ -6679,7 +6716,7 @@ msgstr "" "DDL de Hibernate con la herramienta SchemaExport." #. Tag: programlisting -#: basic_mapping.xml:3311 +#: basic_mapping.xml:3347 #, no-c-format msgid "" "<property name=\"serialNumber\" unique=\"true\" type=\"string\" column=" @@ -6687,13 +6724,13 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:3313 +#: basic_mapping.xml:3349 #, no-c-format msgid "Then the mapping for OrderItem might use:" msgstr "Entonces el mapeo para OrderItem puede utilizar:" #. Tag: programlisting -#: basic_mapping.xml:3316 +#: basic_mapping.xml:3352 #, no-c-format msgid "" "<many-to-one name=\"product\" property-ref=\"serialNumber\" column=" @@ -6701,13 +6738,13 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:3318 +#: basic_mapping.xml:3354 #, no-c-format msgid "This is not encouraged, however." msgstr "Sin embargo, esto ciertamente no se aconseja. " #. Tag: para -#: basic_mapping.xml:3320 +#: basic_mapping.xml:3356 #, no-c-format msgid "" "If the referenced unique key comprises multiple properties of the associated " @@ -6719,7 +6756,7 @@ msgstr "" "<properties>." #. Tag: para -#: basic_mapping.xml:3324 +#: basic_mapping.xml:3360 #, no-c-format msgid "" "If the referenced unique key is the property of a component, you can specify " @@ -6729,7 +6766,7 @@ msgstr "" "especificar una ruta de propiedad: " #. Tag: programlisting -#: basic_mapping.xml:3327 +#: basic_mapping.xml:3363 #, no-c-format msgid "" "<many-to-one name=\"owner\" property-ref=\"identity.ssn\" column=" @@ -6737,13 +6774,13 @@ msgid "" msgstr "" #. Tag: title -#: basic_mapping.xml:3331 +#: basic_mapping.xml:3367 #, no-c-format msgid "Sharing the primary key with the associated entity" msgstr "" #. Tag: para -#: basic_mapping.xml:3333 +#: basic_mapping.xml:3369 #, no-c-format msgid "" "The second approach is to ensure an entity and its associated entity share " @@ -6752,13 +6789,13 @@ msgid "" msgstr "" #. Tag: title -#: basic_mapping.xml:3339 +#: basic_mapping.xml:3375 #, fuzzy, no-c-format msgid "One to One association" msgstr "asociaciones de clave foránea única" #. Tag: programlisting -#: basic_mapping.xml:3341 +#: basic_mapping.xml:3377 #, no-c-format msgid "" "@Entity\n" @@ -6782,7 +6819,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:3345 +#: basic_mapping.xml:3381 #, no-c-format msgid "" "Many people got confused by these primary key based one to one associations. " @@ -6792,13 +6829,13 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:3352 +#: basic_mapping.xml:3388 #, no-c-format msgid "In hbm.xml, use the following mapping." msgstr "" #. Tag: programlisting -#: basic_mapping.xml:3377 +#: basic_mapping.xml:3413 #, no-c-format msgid "" "<one-to-one\n" @@ -6819,7 +6856,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:3397 +#: basic_mapping.xml:3433 #, no-c-format msgid "" "constrained (optional): specifies that a foreign key " @@ -6837,7 +6874,7 @@ msgstr "" "de esquemas también lo utiliza." #. Tag: para -#: basic_mapping.xml:3413 +#: basic_mapping.xml:3449 #, no-c-format msgid "" "property-ref (optional): the name of a property of the " @@ -6849,7 +6886,7 @@ msgstr "" "especifica, se utiliza la clave principal de la clase asociada." #. Tag: para -#: basic_mapping.xml:3426 +#: basic_mapping.xml:3462 #, no-c-format msgid "" "formula (optional): almost all one-to-one associations " @@ -6865,7 +6902,7 @@ msgstr "" "hibernate.test.onetooneformula." #. Tag: para -#: basic_mapping.xml:3435 +#: basic_mapping.xml:3471 #, no-c-format msgid "" "lazy (optional - defaults to proxy): " @@ -6888,7 +6925,7 @@ msgstr "" "imposible e Hibernate recuperará tempranamente la asociación." #. Tag: para -#: basic_mapping.xml:3454 +#: basic_mapping.xml:3490 #, no-c-format msgid "" "Primary key associations do not need an extra table column. If two rows are " @@ -6903,7 +6940,7 @@ msgstr "" "de que se les asigne el mismo valor de identificador." #. Tag: para -#: basic_mapping.xml:3460 +#: basic_mapping.xml:3496 #, no-c-format msgid "" "For a primary key association, add the following mappings to " @@ -6913,20 +6950,20 @@ msgstr "" "Employee y Person respectivamente:" #. Tag: programlisting -#: basic_mapping.xml:3464 +#: basic_mapping.xml:3500 #, no-c-format msgid "<one-to-one name=\"person\" class=\"Person\"/>" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:3466 +#: basic_mapping.xml:3502 #, no-c-format msgid "" "<one-to-one name=\"employee\" class=\"Employee\" constrained=\"true\"/>" msgstr "" #. Tag: para -#: basic_mapping.xml:3468 +#: basic_mapping.xml:3504 #, no-c-format msgid "" "Ensure that the primary keys of the related rows in the PERSON and EMPLOYEE " @@ -6939,7 +6976,7 @@ msgstr "" "literal>:" #. Tag: programlisting -#: basic_mapping.xml:3472 +#: basic_mapping.xml:3508 #, no-c-format msgid "" "<class name=\"person\" table=\"PERSON\">\n" @@ -6956,7 +6993,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:3474 +#: basic_mapping.xml:3510 #, no-c-format msgid "" "A newly saved instance of Person is assigned the same " @@ -6969,13 +7006,13 @@ msgstr "" "literal> de esa Person." #. Tag: title -#: basic_mapping.xml:3482 +#: basic_mapping.xml:3518 #, no-c-format msgid "Natural-id" msgstr "Natural-id" #. Tag: para -#: basic_mapping.xml:3484 +#: basic_mapping.xml:3520 #, fuzzy, no-c-format msgid "" "Although we recommend the use of surrogate keys as primary keys, you should " @@ -6995,7 +7032,7 @@ msgstr "" "auto-documentado." #. Tag: programlisting -#: basic_mapping.xml:3493 +#: basic_mapping.xml:3529 #, no-c-format msgid "" "@Entity\n" @@ -7025,13 +7062,13 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:3495 +#: basic_mapping.xml:3531 #, no-c-format msgid "Or in XML," msgstr "" #. Tag: programlisting -#: basic_mapping.xml:3497 +#: basic_mapping.xml:3533 #, no-c-format msgid "" "<natural-id mutable=\"true|false\"/>\n" @@ -7042,7 +7079,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:3499 +#: basic_mapping.xml:3535 #, no-c-format msgid "" "It is recommended that you implement equals() and " @@ -7054,7 +7091,7 @@ msgstr "" "de la entidad. " #. Tag: para -#: basic_mapping.xml:3503 +#: basic_mapping.xml:3539 #, no-c-format msgid "" "This mapping is not intended for use with entities that have natural primary " @@ -7064,7 +7101,7 @@ msgstr "" "claves principales naturales." #. Tag: para -#: basic_mapping.xml:3508 +#: basic_mapping.xml:3544 #, no-c-format msgid "" "mutable (optional - defaults to falseAny" msgstr "binary" #. Tag: para -#: basic_mapping.xml:3518 +#: basic_mapping.xml:3554 #, fuzzy, no-c-format msgid "" "There is one more type of property mapping. The @Any " @@ -7104,7 +7141,7 @@ msgstr "" "Por ejemplo, para registros de auditoría, datos de sesión de usuario, etc." #. Tag: para -#: basic_mapping.xml:3528 +#: basic_mapping.xml:3564 #, fuzzy, no-c-format msgid "" "The @Any annotation describes the column holding the " @@ -7123,7 +7160,7 @@ msgstr "" "el mapeo de valores del meta-tipo a nombres de clase." #. Tag: programlisting -#: basic_mapping.xml:3538 +#: basic_mapping.xml:3574 #, no-c-format msgid "" "@Any( metaColumn = @Column( name = \"property_type\" ), fetch=FetchType." @@ -7142,7 +7179,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:3540 +#: basic_mapping.xml:3576 #, no-c-format msgid "" "Note that @AnyDef can be mutualized and reused. It is " @@ -7150,7 +7187,7 @@ msgid "" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:3544 +#: basic_mapping.xml:3580 #, no-c-format msgid "" "//on a package\n" @@ -7174,13 +7211,13 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:3546 +#: basic_mapping.xml:3582 #, no-c-format msgid "The hbm.xml equivalent is:" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:3548 +#: basic_mapping.xml:3584 #, no-c-format msgid "" "<any name=\"being\" id-type=\"long\" meta-type=\"string\">\n" @@ -7193,13 +7230,13 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:3551 +#: basic_mapping.xml:3587 #, no-c-format msgid "You cannot mutualize the metadata in hbm.xml as you can in annotations." msgstr "" #. Tag: programlisting -#: basic_mapping.xml:3570 +#: basic_mapping.xml:3606 #, no-c-format msgid "" "<any\n" @@ -7220,19 +7257,19 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:3574 +#: basic_mapping.xml:3610 #, no-c-format msgid "name: the property name." msgstr "name: el nombre de la propiedad." #. Tag: para -#: basic_mapping.xml:3578 +#: basic_mapping.xml:3614 #, no-c-format msgid "id-type: the identifier type." msgstr "id-type: el tipo del identificador." #. Tag: para -#: basic_mapping.xml:3582 +#: basic_mapping.xml:3618 #, no-c-format msgid "" "meta-type (optional - defaults to string): Cualquier tipo que se permita para un mapeo discriminador." #. Tag: para -#: basic_mapping.xml:3588 +#: basic_mapping.xml:3624 #, no-c-format msgid "" "cascade (optional- defaults to none): " @@ -7252,7 +7289,7 @@ msgstr "" "literal>): el estilo de cascada." #. Tag: para -#: basic_mapping.xml:3599 +#: basic_mapping.xml:3635 #, no-c-format msgid "" "optimistic-lock (optional - defaults to true<properties> element allows the definition of a " @@ -7289,7 +7326,7 @@ msgstr "" "Por ejemplo:" #. Tag: programlisting -#: basic_mapping.xml:3632 +#: basic_mapping.xml:3668 #, no-c-format msgid "" "<properties\n" @@ -7307,7 +7344,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:3636 +#: basic_mapping.xml:3672 #, no-c-format msgid "" "name: the logical name of the grouping. It is " @@ -7317,7 +7354,7 @@ msgstr "" "emphasis> es un nombre de propiedad." #. Tag: para -#: basic_mapping.xml:3651 +#: basic_mapping.xml:3687 #, no-c-format msgid "" "optimistic-lock (optional - defaults to true<properties> " @@ -7341,7 +7378,7 @@ msgstr "" "literal>:" #. Tag: programlisting -#: basic_mapping.xml:3669 +#: basic_mapping.xml:3705 #, no-c-format msgid "" "<class name=\"Person\">\n" @@ -7358,7 +7395,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:3671 +#: basic_mapping.xml:3707 #, no-c-format msgid "" "You might have some legacy data association that refers to this unique key " @@ -7369,7 +7406,7 @@ msgstr "" "principal:" #. Tag: programlisting -#: basic_mapping.xml:3675 +#: basic_mapping.xml:3711 #, no-c-format msgid "" "<many-to-one name=\"owner\"\n" @@ -7381,7 +7418,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:3678 +#: basic_mapping.xml:3714 #, no-c-format msgid "" "When using annotations as a mapping strategy, such construct is not " @@ -7390,7 +7427,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:3685 +#: basic_mapping.xml:3721 #, no-c-format msgid "" "The use of this outside the context of mapping legacy data is not " @@ -7400,13 +7437,13 @@ msgstr "" "datos heredados. " #. Tag: title -#: basic_mapping.xml:3690 +#: basic_mapping.xml:3726 #, no-c-format msgid "Some hbm.xml specificities" msgstr "" #. Tag: para -#: basic_mapping.xml:3692 +#: basic_mapping.xml:3728 #, no-c-format msgid "" "The hbm.xml structure has some specificities naturally not present when " @@ -7414,13 +7451,13 @@ msgid "" msgstr "" #. Tag: title -#: basic_mapping.xml:3696 +#: basic_mapping.xml:3732 #, no-c-format msgid "Doctype" msgstr "Doctype" #. Tag: para -#: basic_mapping.xml:3698 +#: basic_mapping.xml:3734 #, no-c-format msgid "" "All XML mappings should declare the doctype shown. The actual DTD can be " @@ -7439,13 +7476,13 @@ msgstr "" "clase." #. Tag: title -#: basic_mapping.xml:3707 +#: basic_mapping.xml:3743 #, no-c-format msgid "EntityResolver" msgstr "EntityResolver" #. Tag: para -#: basic_mapping.xml:3709 +#: basic_mapping.xml:3745 #, no-c-format msgid "" "Hibernate will first attempt to resolve DTDs in its classpath. It does this " @@ -7461,12 +7498,12 @@ msgstr "" "reconoce dos diferentes espacios de nombre del identificador del sistema." #. Tag: para -#: basic_mapping.xml:3718 -#, no-c-format +#: basic_mapping.xml:3754 +#, fuzzy, no-c-format msgid "" "a hibernate namespace is recognized whenever the resolver " -"encounters a systemId starting with http://hibernate.sourceforge." -"net/. The resolver attempts to resolve these entities via the " +"encounters a systemId starting with http://www.hibernate.org/dtd/. The resolver attempts to resolve these entities via the " "classloader which loaded the Hibernate classes." msgstr "" "un hibernate namespace se reconoce cuando el resolvedor " @@ -7476,7 +7513,7 @@ msgstr "" "Hibernate." #. Tag: para -#: basic_mapping.xml:3726 +#: basic_mapping.xml:3762 #, no-c-format msgid "" "a user namespace is recognized whenever the resolver " @@ -7492,14 +7529,14 @@ msgstr "" "y (2) el cargador de clase, el cual cargó las clases de Hibernate." #. Tag: para -#: basic_mapping.xml:3735 +#: basic_mapping.xml:3771 #, no-c-format msgid "The following is an example of utilizing user namespacing:" msgstr "" "Este es un ejemplo de la utilización de los espacios de nombre del usuario: " #. Tag: programlisting -#: basic_mapping.xml:3738 +#: basic_mapping.xml:3774 #, no-c-format msgid "" "types.xml is a resource in the your." @@ -7519,13 +7556,13 @@ msgstr "" "custom\">typedef personalizado." #. Tag: title -#: basic_mapping.xml:3747 +#: basic_mapping.xml:3783 #, no-c-format msgid "Hibernate-mapping" msgstr "Mapeo de Hibernate " #. Tag: para -#: basic_mapping.xml:3749 +#: basic_mapping.xml:3785 #, no-c-format msgid "" "This element has several optional attributes. The schema " @@ -7551,7 +7588,7 @@ msgstr "" "nombres de clase sin calificar en el lenguaje de consulta." #. Tag: programlisting -#: basic_mapping.xml:3778 +#: basic_mapping.xml:3814 #, no-c-format msgid "" "<hibernate-mapping\n" @@ -7566,7 +7603,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:3782 +#: basic_mapping.xml:3818 #, no-c-format msgid "schema (optional): the name of a database schema." msgstr "" @@ -7574,7 +7611,7 @@ msgstr "" "datos. " #. Tag: para -#: basic_mapping.xml:3787 +#: basic_mapping.xml:3823 #, no-c-format msgid "catalog (optional): the name of a database catalog." msgstr "" @@ -7582,7 +7619,7 @@ msgstr "" "de datos. " #. Tag: para -#: basic_mapping.xml:3792 +#: basic_mapping.xml:3828 #, no-c-format msgid "" "default-cascade (optional - defaults to none): Un estilo de cascada por defecto. " #. Tag: para -#: basic_mapping.xml:3797 +#: basic_mapping.xml:3833 #, no-c-format msgid "" "default-access (optional - defaults to propertyPropertyAccessor." #. Tag: para -#: basic_mapping.xml:3804 +#: basic_mapping.xml:3840 #, no-c-format msgid "" "default-lazy (optional - defaults to trueauto-import (optional - defaults to truepackage (optional): specifies a package prefix to use for " @@ -7640,7 +7677,7 @@ msgstr "" "mapeo." #. Tag: para -#: basic_mapping.xml:3825 +#: basic_mapping.xml:3861 #, no-c-format msgid "" "If you have two persistent classes with the same unqualified name, you " @@ -7652,7 +7689,7 @@ msgstr "" "excepción si usted intenta asignar dos clases al mismo nombre \"importado\"." #. Tag: para -#: basic_mapping.xml:3830 +#: basic_mapping.xml:3866 #, no-c-format msgid "" "The hibernate-mapping element allows you to nest several " @@ -7672,13 +7709,13 @@ msgstr "" "xml, o si utiliza herencia, Animal.hbm.xml." #. Tag: title -#: basic_mapping.xml:3841 +#: basic_mapping.xml:3877 #, no-c-format msgid "Key" msgstr "" #. Tag: para -#: basic_mapping.xml:3843 +#: basic_mapping.xml:3879 #, fuzzy, no-c-format msgid "" "The <key> element is featured a few times within " @@ -7692,7 +7729,7 @@ msgstr "" "tabla original. También define la clave foránea en la tabla unida:" #. Tag: programlisting -#: basic_mapping.xml:3864 +#: basic_mapping.xml:3900 #, no-c-format msgid "" "<key\n" @@ -7706,7 +7743,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:3874 +#: basic_mapping.xml:3910 #, no-c-format msgid "" "on-delete (optional - defaults to noactionproperty-ref (optional): specifies that the foreign key " @@ -7730,7 +7767,7 @@ msgstr "" "proporciona para los datos heredados." #. Tag: para -#: basic_mapping.xml:3886 +#: basic_mapping.xml:3922 #, no-c-format msgid "" "not-null (optional): specifies that the foreign key " @@ -7742,7 +7779,7 @@ msgstr "" "también es parte de la clave principal." #. Tag: para -#: basic_mapping.xml:3892 +#: basic_mapping.xml:3928 #, no-c-format msgid "" "update (optional): specifies that the foreign key should " @@ -7754,7 +7791,7 @@ msgstr "" "de la clave principal." #. Tag: para -#: basic_mapping.xml:3898 +#: basic_mapping.xml:3934 #, no-c-format msgid "" "unique (optional): specifies that the foreign key should " @@ -7766,7 +7803,7 @@ msgstr "" "es la clave principal." #. Tag: para -#: basic_mapping.xml:3905 +#: basic_mapping.xml:3941 #, no-c-format msgid "" "For systems where delete performance is important, we recommend that all " @@ -7784,7 +7821,7 @@ msgstr "" "bloqueo optimista normal de Hibernate para datos versionados." #. Tag: para -#: basic_mapping.xml:3913 +#: basic_mapping.xml:3949 #, no-c-format msgid "" "The not-null and update attributes are " @@ -7800,13 +7837,13 @@ msgstr "" "\"true\">. " #. Tag: title -#: basic_mapping.xml:3922 +#: basic_mapping.xml:3958 #, no-c-format msgid "Import" msgstr "Import" #. Tag: para -#: basic_mapping.xml:3924 +#: basic_mapping.xml:3960 #, no-c-format msgid "" "If your application has two persistent classes with the same name, and you " @@ -7822,13 +7859,13 @@ msgstr "" "importar clases e interfaces que no estén mapeadas explícitamente:" #. Tag: programlisting -#: basic_mapping.xml:3930 +#: basic_mapping.xml:3966 #, no-c-format msgid "<import class=\"java.lang.Object\" rename=\"Universe\"/>" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:3939 +#: basic_mapping.xml:3975 #, no-c-format msgid "" "<import\n" @@ -7838,7 +7875,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:3943 +#: basic_mapping.xml:3979 #, no-c-format msgid "" "class: the fully qualified class name of any Java class." @@ -7847,7 +7884,7 @@ msgstr "" "cualquier clase Java. " #. Tag: para -#: basic_mapping.xml:3948 +#: basic_mapping.xml:3984 #, no-c-format msgid "" "rename (optional - defaults to the unqualified class " @@ -7857,19 +7894,19 @@ msgstr "" "calificar): Un nombre que se puede utilizar en el lenguaje de consulta." #. Tag: para -#: basic_mapping.xml:3956 +#: basic_mapping.xml:3992 #, no-c-format msgid "This feature is unique to hbm.xml and is not supported in annotations." msgstr "" #. Tag: title -#: basic_mapping.xml:3962 +#: basic_mapping.xml:3998 #, no-c-format msgid "Column and formula elements" msgstr "Los elementos columna y fórmula" #. Tag: para -#: basic_mapping.xml:3964 +#: basic_mapping.xml:4000 #, no-c-format msgid "" "Mapping elements which accept a column attribute will " @@ -7883,7 +7920,7 @@ msgstr "" "atributo formula. Por ejemplo:" #. Tag: programlisting -#: basic_mapping.xml:3970 +#: basic_mapping.xml:4006 #, no-c-format msgid "" "<column\n" @@ -7903,13 +7940,13 @@ msgid "" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:3972 +#: basic_mapping.xml:4008 #, no-c-format msgid "<formula>SQL expression</formula>" msgstr "" #. Tag: para -#: basic_mapping.xml:3974 +#: basic_mapping.xml:4010 #, no-c-format msgid "" "Most of the attributes on column provide a means of " @@ -7928,7 +7965,7 @@ msgstr "" "de lectura y escritura de columnas." #. Tag: para -#: basic_mapping.xml:3982 +#: basic_mapping.xml:4018 #, no-c-format msgid "" "The column and formula elements can " @@ -7940,7 +7977,7 @@ msgstr "" "expresar, por ejemplo, condiciones de unión exóticas." #. Tag: programlisting -#: basic_mapping.xml:3986 +#: basic_mapping.xml:4022 #, no-c-format msgid "" "<many-to-one name=\"homeAddress\" class=\"Address\"\n" @@ -7951,19 +7988,19 @@ msgid "" msgstr "" #. Tag: title -#: basic_mapping.xml:3992 +#: basic_mapping.xml:4028 #, no-c-format msgid "Hibernate types" msgstr "Tipos de Hibernate " #. Tag: title -#: basic_mapping.xml:3995 +#: basic_mapping.xml:4031 #, no-c-format msgid "Entities and values" msgstr "Entidades y Valores" #. Tag: para -#: basic_mapping.xml:3997 +#: basic_mapping.xml:4033 #, no-c-format msgid "" "In relation to the persistence service, Java language-level objects are " @@ -7973,7 +8010,7 @@ msgstr "" "Java se clasifican en dos grupos:" #. Tag: para -#: basic_mapping.xml:4000 +#: basic_mapping.xml:4036 #, no-c-format msgid "" "An entity exists independently of any other objects " @@ -7998,7 +8035,7 @@ msgstr "" "versionadas." #. Tag: para -#: basic_mapping.xml:4010 +#: basic_mapping.xml:4046 #, no-c-format msgid "" "An entity's persistent state consists of references to other entities and " @@ -8022,7 +8059,7 @@ msgstr "" "por lo que dos entidades o colleciones no los pueden compartir." #. Tag: para -#: basic_mapping.xml:4020 +#: basic_mapping.xml:4056 #, no-c-format msgid "" "Until now, we have been using the term \"persistent class\" to refer to " @@ -8052,14 +8089,14 @@ msgstr "" "un tipo de valor." #. Tag: para -#: basic_mapping.xml:4033 +#: basic_mapping.xml:4069 #, no-c-format msgid "We will revisit both concepts throughout this reference guide." msgstr "" "Volveremos a revisar ambos conceptos a lo largo de este manual de referencia." #. Tag: para -#: basic_mapping.xml:4036 +#: basic_mapping.xml:4072 #, no-c-format msgid "" "The challenge is to map the Java type system, and the developers' definition " @@ -8086,7 +8123,7 @@ msgstr "" "estrategias de conversión personalizadas." #. Tag: para -#: basic_mapping.xml:4049 +#: basic_mapping.xml:4085 #, no-c-format msgid "" "With the exception of collections, all built-in Hibernate types support null " @@ -8096,13 +8133,13 @@ msgstr "" "excepción de las colecciones." #. Tag: title -#: basic_mapping.xml:4054 +#: basic_mapping.xml:4090 #, no-c-format msgid "Basic value types" msgstr "Tipos de valores básicos" #. Tag: para -#: basic_mapping.xml:4056 +#: basic_mapping.xml:4092 #, no-c-format msgid "" "The built-in basic mapping types can be roughly " @@ -8112,7 +8149,7 @@ msgstr "" "categorizar así:" #. Tag: literal -#: basic_mapping.xml:4059 +#: basic_mapping.xml:4095 #, fuzzy, no-c-format msgid "" "integer, long, short, float, double, character, byte, boolean, yes_no, " @@ -8122,7 +8159,7 @@ msgstr "" "yes_no, true_false" #. Tag: para -#: basic_mapping.xml:4063 +#: basic_mapping.xml:4099 #, no-c-format msgid "" "Type mappings from Java primitives or wrapper classes to appropriate (vendor-" @@ -8136,13 +8173,13 @@ msgstr "" "boolean de Java o java.lang.Boolean." #. Tag: literal -#: basic_mapping.xml:4073 +#: basic_mapping.xml:4109 #, no-c-format msgid "string" msgstr "" #. Tag: para -#: basic_mapping.xml:4076 +#: basic_mapping.xml:4112 #, no-c-format msgid "" "A type mapping from java.lang.String to VARCHAR (u Oracle VAARCHAR2)." #. Tag: literal -#: basic_mapping.xml:4083 +#: basic_mapping.xml:4119 #, fuzzy, no-c-format msgid "date, time, timestamp" msgstr "date, time, timestamp" #. Tag: para -#: basic_mapping.xml:4086 +#: basic_mapping.xml:4122 #, no-c-format msgid "" "Type mappings from java.util.Date and its subclasses to " @@ -8170,13 +8207,13 @@ msgstr "" "TIMESTAMP (o equivalente)." #. Tag: literal -#: basic_mapping.xml:4094 +#: basic_mapping.xml:4130 #, fuzzy, no-c-format msgid "calendar, calendar_date" msgstr "calendar, calendar_date" #. Tag: para -#: basic_mapping.xml:4097 +#: basic_mapping.xml:4133 #, no-c-format msgid "" "Type mappings from java.util.Calendar to SQL types " @@ -8186,13 +8223,13 @@ msgstr "" "TIMESTAMP y DATE (o equivalente)." #. Tag: literal -#: basic_mapping.xml:4104 +#: basic_mapping.xml:4140 #, fuzzy, no-c-format msgid "big_decimal, big_integer" msgstr "big_decimal, big_integer" #. Tag: para -#: basic_mapping.xml:4107 +#: basic_mapping.xml:4143 #, no-c-format msgid "" "Type mappings from java.math.BigDecimal and java." @@ -8204,13 +8241,13 @@ msgstr "" "literal> de Oracle)." #. Tag: literal -#: basic_mapping.xml:4115 +#: basic_mapping.xml:4151 #, fuzzy, no-c-format msgid "locale, timezone, currency" msgstr "locale, timezone, currency" #. Tag: para -#: basic_mapping.xml:4118 +#: basic_mapping.xml:4154 #, no-c-format msgid "" "Type mappings from java.util.Locale, java.util." @@ -8228,13 +8265,13 @@ msgstr "" "son mapeadas a sus ID." #. Tag: literal -#: basic_mapping.xml:4131 +#: basic_mapping.xml:4167 #, fuzzy, no-c-format msgid "class" msgstr "Clase" #. Tag: para -#: basic_mapping.xml:4134 +#: basic_mapping.xml:4170 #, no-c-format msgid "" "A type mapping from java.lang.Class to VARCHAR es mapeada a su nombre completamente calificado." #. Tag: literal -#: basic_mapping.xml:4142 +#: basic_mapping.xml:4178 #, no-c-format msgid "binary" msgstr "" #. Tag: para -#: basic_mapping.xml:4145 +#: basic_mapping.xml:4181 #, no-c-format msgid "Maps byte arrays to an appropriate SQL binary type." msgstr "Mapea arreglos de bytes a un tipo binario SQL apropiado." #. Tag: literal -#: basic_mapping.xml:4150 +#: basic_mapping.xml:4186 #, no-c-format msgid "text" msgstr "" #. Tag: para -#: basic_mapping.xml:4153 -#, no-c-format +#: basic_mapping.xml:4189 +#, fuzzy, no-c-format msgid "" -"Maps long Java strings to a SQL CLOB or TEXT type." +"Maps long Java strings to a SQL LONGVARCHAR or " +"TEXT type." msgstr "" "Mapea cadenas largas de Java al tipo SQL CLOB o " "TEXT." #. Tag: literal -#: basic_mapping.xml:4159 +#: basic_mapping.xml:4195 +#, no-c-format +msgid "image" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:4198 +#, fuzzy, no-c-format +msgid "Maps long byte arrays to a SQL LONGVARBINARY." +msgstr "" +"Mapea cadenas largas de Java al tipo SQL CLOB o " +"TEXT." + +#. Tag: literal +#: basic_mapping.xml:4203 #, no-c-format msgid "serializable" msgstr "" #. Tag: para -#: basic_mapping.xml:4162 +#: basic_mapping.xml:4206 #, no-c-format msgid "" "Maps serializable Java types to an appropriate SQL binary type. You can also " @@ -8293,13 +8344,13 @@ msgstr "" "tipo básico. " #. Tag: literal -#: basic_mapping.xml:4171 +#: basic_mapping.xml:4215 #, no-c-format msgid "clob, blob" msgstr "" #. Tag: para -#: basic_mapping.xml:4174 +#: basic_mapping.xml:4218 #, no-c-format msgid "" "Type mappings for the JDBC classes java.sql.Clob and " @@ -8314,7 +8365,41 @@ msgstr "" "e inconsistente." #. Tag: literal -#: basic_mapping.xml:4184 +#: basic_mapping.xml:4228 +#, no-c-format +msgid "materialized_clob" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:4231 +#, no-c-format +msgid "" +"Maps long Java strings to a SQL CLOB type. When read, the " +"CLOB value is immediately materialized into a Java " +"string. Some drivers require the CLOB value to be read " +"within a transaction. Once materialized, the Java string is available " +"outside of the transaction." +msgstr "" + +#. Tag: literal +#: basic_mapping.xml:4241 +#, no-c-format +msgid "materialized_blob" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:4244 +#, no-c-format +msgid "" +"Maps long Java byte arrays to a SQL BLOB type. When read, " +"the BLOB value is immediately materialized into a byte " +"array. Some drivers require the BLOB value to be read " +"within a transaction. Once materialized, the byte array is available outside " +"of the transaction." +msgstr "" + +#. Tag: literal +#: basic_mapping.xml:4254 #, fuzzy, no-c-format msgid "" "imm_date, imm_time, imm_timestamp, imm_calendar, imm_calendar_date, " @@ -8324,7 +8409,7 @@ msgstr "" "imm_serializable, imm_binary" #. Tag: para -#: basic_mapping.xml:4188 +#: basic_mapping.xml:4258 #, no-c-format msgid "" "Type mappings for what are considered mutable Java types. This is where " @@ -8344,7 +8429,7 @@ msgstr "" "tiene que asignar un objeto nuevo, no idéntico, a la propiedad." #. Tag: para -#: basic_mapping.xml:4200 +#: basic_mapping.xml:4270 #, no-c-format msgid "" "Unique identifiers of entities and collections can be of any basic type " @@ -8358,7 +8443,7 @@ msgstr "" "están permitidos, a continuación encontrará mayor información." #. Tag: para -#: basic_mapping.xml:4205 +#: basic_mapping.xml:4275 #, no-c-format msgid "" "The basic value types have corresponding Type constants " @@ -8372,13 +8457,13 @@ msgstr "" "string." #. Tag: title -#: basic_mapping.xml:4212 +#: basic_mapping.xml:4282 #, no-c-format msgid "Custom value types" msgstr "Tipos de valor personalizados" #. Tag: para -#: basic_mapping.xml:4214 +#: basic_mapping.xml:4284 #, no-c-format msgid "" "It is relatively easy for developers to create their own value types. For " @@ -8403,7 +8488,7 @@ msgstr "" "literal>." #. Tag: para -#: basic_mapping.xml:4225 +#: basic_mapping.xml:4295 #, no-c-format msgid "" "To implement a custom type, implement either org.hibernate." @@ -8419,7 +8504,7 @@ msgstr "" "literal> para ver qué clases de cosas son posibles. " #. Tag: programlisting -#: basic_mapping.xml:4232 +#: basic_mapping.xml:4302 #, no-c-format msgid "" "<property name=\"twoStrings\" type=\"org.hibernate.test.DoubleStringType" @@ -8430,7 +8515,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:4234 +#: basic_mapping.xml:4304 #, no-c-format msgid "" "Notice the use of <column> tags to map a property " @@ -8440,7 +8525,7 @@ msgstr "" "una propiedad a múltiples columnas." #. Tag: para -#: basic_mapping.xml:4237 +#: basic_mapping.xml:4307 #, no-c-format msgid "" "The CompositeUserType, EnhancedUserTypeUserType in the " @@ -8471,7 +8556,7 @@ msgstr "" "sus archivos de mapeo. " #. Tag: programlisting -#: basic_mapping.xml:4250 +#: basic_mapping.xml:4320 #, no-c-format msgid "" "<property name=\"priority\">\n" @@ -8482,7 +8567,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:4252 +#: basic_mapping.xml:4322 #, no-c-format msgid "" "The UserType can now retrieve the value for the parameter " @@ -8494,7 +8579,7 @@ msgstr "" "literal> que se le pasa." #. Tag: para -#: basic_mapping.xml:4256 +#: basic_mapping.xml:4326 #, no-c-format msgid "" "If you regularly use a certain UserType, it is useful to " @@ -8510,7 +8595,7 @@ msgstr "" "valores predeterminados de parámetros si el tipo se encuentra parametrizado." #. Tag: programlisting -#: basic_mapping.xml:4262 +#: basic_mapping.xml:4332 #, no-c-format msgid "" "<typedef class=\"com.mycompany.usertypes.DefaultValueIntegerType\" name=" @@ -8520,13 +8605,13 @@ msgid "" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:4264 +#: basic_mapping.xml:4334 #, no-c-format msgid "<property name=\"priority\" type=\"default_zero\"/>" msgstr "" #. Tag: para -#: basic_mapping.xml:4266 +#: basic_mapping.xml:4336 #, no-c-format msgid "" "It is also possible to override the parameters supplied in a typedef on a " @@ -8537,7 +8622,7 @@ msgstr "" "propiedad." #. Tag: para -#: basic_mapping.xml:4270 +#: basic_mapping.xml:4340 #, no-c-format msgid "" "Even though Hibernate's rich range of built-in types and support for " @@ -8561,13 +8646,13 @@ msgstr "" "valores monetarios." #. Tag: title -#: basic_mapping.xml:4283 +#: basic_mapping.xml:4353 #, no-c-format msgid "Mapping a class more than once" msgstr "Mapeo de una clase más de una vez" #. Tag: para -#: basic_mapping.xml:4285 +#: basic_mapping.xml:4355 #, no-c-format msgid "" "It is possible to provide more than one mapping for a particular persistent " @@ -8586,7 +8671,7 @@ msgstr "" "entidad mencionada." #. Tag: programlisting -#: basic_mapping.xml:4293 +#: basic_mapping.xml:4363 #, no-c-format msgid "" "<class name=\"Contract\" table=\"Contracts\"\n" @@ -8609,7 +8694,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:4295 +#: basic_mapping.xml:4365 #, no-c-format msgid "" "Associations are now specified using entity-name instead " @@ -8619,19 +8704,19 @@ msgstr "" "literal> en lugar de class." #. Tag: para -#: basic_mapping.xml:4299 basic_mapping.xml:4379 basic_mapping.xml:4414 +#: basic_mapping.xml:4369 basic_mapping.xml:4497 #, no-c-format msgid "This feature is not supported in Annotations" msgstr "" #. Tag: title -#: basic_mapping.xml:4304 +#: basic_mapping.xml:4374 #, no-c-format msgid "SQL quoted identifiers" msgstr "Identificadores SQL en comillas" #. Tag: para -#: basic_mapping.xml:4306 +#: basic_mapping.xml:4376 #, no-c-format msgid "" "You can force Hibernate to quote an identifier in the generated SQL by " @@ -8647,7 +8732,7 @@ msgstr "" "a excepción de corchetes para SQL Server y comillas sencillas para MySQL." #. Tag: programlisting -#: basic_mapping.xml:4312 +#: basic_mapping.xml:4382 #, no-c-format msgid "" "@Entity @Table(name=\"`Line Item`\")\n" @@ -8665,13 +8750,13 @@ msgid "" msgstr "" #. Tag: title -#: basic_mapping.xml:4316 +#: basic_mapping.xml:4386 #, no-c-format msgid "Generated properties" msgstr "Propiedades generadas" #. Tag: para -#: basic_mapping.xml:4318 +#: basic_mapping.xml:4388 #, no-c-format msgid "" "Generated properties are properties that have their values generated by the " @@ -8692,7 +8777,7 @@ msgstr "" "emite un select para recuperar los valores generados." #. Tag: para -#: basic_mapping.xml:4327 +#: basic_mapping.xml:4397 #, no-c-format msgid "" "Properties marked as generated must additionally be non-insertable and non-" @@ -8708,7 +8793,7 @@ msgstr "" "\">propiedades simples se pueden marcar como generadas." #. Tag: para -#: basic_mapping.xml:4334 +#: basic_mapping.xml:4404 #, no-c-format msgid "" "never (the default): the given property value is not " @@ -8718,7 +8803,7 @@ msgstr "" "generado dentro de la base de datos." #. Tag: para -#: basic_mapping.xml:4337 +#: basic_mapping.xml:4407 #, no-c-format msgid "" "insert: the given property value is generated on insert, " @@ -8737,7 +8822,7 @@ msgstr "" "disponible." #. Tag: para -#: basic_mapping.xml:4344 +#: basic_mapping.xml:4414 #, no-c-format msgid "" "always: the property value is generated both on insert " @@ -8747,19 +8832,19 @@ msgstr "" "insert como en update." #. Tag: para -#: basic_mapping.xml:4347 +#: basic_mapping.xml:4417 #, no-c-format msgid "To mark a property as generated, use @Generated." msgstr "" #. Tag: title -#: basic_mapping.xml:4352 -#, no-c-format -msgid "Column read and write expressions" +#: basic_mapping.xml:4422 +#, fuzzy, no-c-format +msgid "Column transformers: read and write expressions" msgstr "Expresiones de lectura y escritura de columnas" #. Tag: para -#: basic_mapping.xml:4354 +#: basic_mapping.xml:4424 #, fuzzy, no-c-format msgid "" "Hibernate allows you to customize the SQL it uses to read and write the " @@ -8778,7 +8863,30 @@ msgstr "" "> </property>" #. Tag: programlisting -#: basic_mapping.xml:4359 +#: basic_mapping.xml:4430 +#, no-c-format +msgid "" +"@Entity\n" +"class CreditCard {\n" +" @Column(name=\"credit_card_num\")\n" +" @ColumnTransformer(\n" +" read=\"decrypt(credit_card_num)\", \n" +" write=\"encrypt(?)\")\n" +" public String getCreditCardNumber() { return creditCardNumber; }\n" +" public void setCreditCardNumber(String number) { this.creditCardNumber = " +"number; }\n" +" private String creditCardNumber;\n" +"}" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:4432 +#, no-c-format +msgid "or in XML" +msgstr "" + +#. Tag: programlisting +#: basic_mapping.xml:4434 #, no-c-format msgid "" "<property name=\"creditCardNumber\">\n" @@ -8790,7 +8898,44 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:4361 +#: basic_mapping.xml:4437 +#, no-c-format +msgid "" +"You can use the plural form @ColumnTransformers if " +"more than one columns need to define either of these rules." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:4442 +#, no-c-format +msgid "" +"If a property uses more that one column, you must use the " +"forColumn attribute to specify which column, the " +"expressions are targeting." +msgstr "" + +#. Tag: programlisting +#: basic_mapping.xml:4446 +#, no-c-format +msgid "" +"@Entity\n" +"class User {\n" +" @Type(type=\"com.acme.type.CreditCardType\")\n" +" @Columns( {\n" +" @Column(name=\"credit_card_num\"),\n" +" @Column(name=\"exp_date\") } )\n" +" @ColumnTransformer(\n" +" forColumn=\"credit_card_num\", \n" +" read=\"decrypt(credit_card_num)\", \n" +" write=\"encrypt(?)\")\n" +" public CreditCard getCreditCard() { return creditCard; }\n" +" public void setCreditCard(CreditCard card) { this.creditCard = card; }\n" +" private CreditCard creditCard;\n" +"}" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:4448 #, no-c-format msgid "" "Hibernate applies the custom expressions automatically whenever the property " @@ -8802,7 +8947,7 @@ msgstr "" "una propiedad derivada formula con dos diferencias:" #. Tag: para -#: basic_mapping.xml:4366 +#: basic_mapping.xml:4453 #, no-c-format msgid "" "The property is backed by one or more columns that are exported as part of " @@ -8812,13 +8957,13 @@ msgstr "" "parte de la generación automática del esquema. " #. Tag: para -#: basic_mapping.xml:4371 +#: basic_mapping.xml:4458 #, no-c-format msgid "The property is read-write, not read-only." msgstr "La propiedad es de lectura y escritura no de sólo lectura. " #. Tag: para -#: basic_mapping.xml:4375 +#: basic_mapping.xml:4462 #, no-c-format msgid "" "The write expression, if specified, must contain exactly " @@ -8828,13 +8973,13 @@ msgstr "" "exactamente un parémetro de sustitución '?' para el valor." #. Tag: title -#: basic_mapping.xml:4384 +#: basic_mapping.xml:4467 #, no-c-format msgid "Auxiliary database objects" msgstr "Objetos de bases de datos auxiliares" #. Tag: para -#: basic_mapping.xml:4386 +#: basic_mapping.xml:4469 #, no-c-format msgid "" "Auxiliary database objects allow for the CREATE and DROP of arbitrary " @@ -8858,7 +9003,7 @@ msgstr "" "bases de datos auxiliares:" #. Tag: para -#: basic_mapping.xml:4396 +#: basic_mapping.xml:4479 #, no-c-format msgid "" "The first mode is to explicitly list the CREATE and DROP commands in the " @@ -8868,7 +9013,7 @@ msgstr "" "el archivo de mapeo: " #. Tag: programlisting -#: basic_mapping.xml:4399 +#: basic_mapping.xml:4482 #, no-c-format msgid "" "<hibernate-mapping>\n" @@ -8881,7 +9026,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:4401 +#: basic_mapping.xml:4484 #, no-c-format msgid "" "The second mode is to supply a custom class that constructs the CREATE and " @@ -8893,7 +9038,7 @@ msgstr "" "la interfaz org.hibernate.mapping.AuxiliaryDatabaseObject." #. Tag: programlisting -#: basic_mapping.xml:4406 +#: basic_mapping.xml:4489 #, no-c-format msgid "" "<hibernate-mapping>\n" @@ -8905,7 +9050,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:4408 +#: basic_mapping.xml:4491 #, no-c-format msgid "" "Additionally, these database objects can be optionally scoped so that they " @@ -8916,7 +9061,7 @@ msgstr "" "dialectos. " #. Tag: programlisting -#: basic_mapping.xml:4411 +#: basic_mapping.xml:4494 #, no-c-format msgid "" "<hibernate-mapping>\n" @@ -8931,6 +9076,15 @@ msgid "" "</hibernate-mapping>" msgstr "" +#~ msgid "" +#~ "The force attribute is only useful if the table " +#~ "contains rows with \"extra\" discriminator values that are not mapped to " +#~ "a persistent class. This will not usually be the case." +#~ msgstr "" +#~ "El atributo force es sólamente útil si la tabla " +#~ "contiene filas con valores discriminadores \"extra\" que no estén " +#~ "mapeados a una clase persistente. Generalmente este no es el caso." + #~ msgid "" #~ "Use of select-before-update will usually decrease " #~ "performance. It is useful to prevent a database update trigger being " diff --git a/documentation/manual/src/main/docbook/es-ES/content/type.po b/documentation/manual/src/main/docbook/es-ES/content/type.po index d4b9ca9510..5d62cba138 100644 --- a/documentation/manual/src/main/docbook/es-ES/content/type.po +++ b/documentation/manual/src/main/docbook/es-ES/content/type.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: http://bugs.kde.org\n" -"POT-Creation-Date: 2010-07-21 04:35+0000\n" +"POT-Creation-Date: 2011-01-21 21:18+0000\n" "PO-Revision-Date: 2010-07-21 04:32+0000\n" "Last-Translator: Automatically generated\n" "Language-Team: none\n" @@ -714,25 +714,53 @@ msgstr "" #. Tag: classname #: type.xml:456 #, no-c-format -msgid "java.lang.Class" +msgid "java.net.URL" msgstr "" #. Tag: classname #: type.xml:459 #, no-c-format -msgid "org.hibernate.type.ClassType" +msgid "org.hibernate.type.UrlType" msgstr "" #. Tag: para #: type.xml:461 #, no-c-format msgid "" +"Maps a java.net.URL to a JDBC VARCHAR (using the " +"external form)" +msgstr "" + +#. Tag: para +#: type.xml:464 +#, no-c-format +msgid "" +"Registered under url and java.net.URL " +"in the type registry (see )." +msgstr "" + +#. Tag: classname +#: type.xml:473 +#, no-c-format +msgid "java.lang.Class" +msgstr "" + +#. Tag: classname +#: type.xml:476 +#, no-c-format +msgid "org.hibernate.type.ClassType" +msgstr "" + +#. Tag: para +#: type.xml:478 +#, no-c-format +msgid "" "Maps a java.lang.Class to a JDBC VARCHAR (using the " "Class name)" msgstr "" #. Tag: para -#: type.xml:464 +#: type.xml:481 #, no-c-format msgid "" "Registered under class and java.lang.Classjava.sql.Blob to a JDBC BLOB" msgstr "" #. Tag: para -#: type.xml:481 +#: type.xml:498 #, no-c-format msgid "" "Registered under blob and java.sql.Blobjava.sql.Clob to a JDBC CLOB" msgstr "" #. Tag: para -#: type.xml:498 +#: type.xml:515 #, no-c-format msgid "" "Registered under clob and java.sql.Clobbinary and byte[] in " @@ -818,33 +846,59 @@ msgid "" msgstr "" #. Tag: classname -#: type.xml:522 +#: type.xml:539 #, no-c-format msgid "org.hibernate.type.MaterializedBlobType" msgstr "" #. Tag: para -#: type.xml:524 +#: type.xml:541 #, no-c-format msgid "Maps a primitive byte[] to a JDBC BLOB" msgstr "" #. Tag: para -#: type.xml:527 +#: type.xml:544 #, no-c-format msgid "" "Registered under materialized_blob in the type registry " "(see )." msgstr "" +#. Tag: classname +#: type.xml:551 +#, no-c-format +msgid "org.hibernate.type.ImageType" +msgstr "" + #. Tag: para -#: type.xml:541 +#: type.xml:553 +#, no-c-format +msgid "Maps a primitive byte[] to a JDBC LONGVARBINARY" +msgstr "" + +#. Tag: para +#: type.xml:556 +#, no-c-format +msgid "" +"Registered under image in the type registry (see )." +msgstr "" + +#. Tag: title +#: type.xml:565 +#, no-c-format +msgid "Byte[]" +msgstr "" + +#. Tag: para +#: type.xml:570 #, no-c-format msgid "Maps a java.lang.Byte[] to a JDBC VARBINARY" msgstr "" #. Tag: para -#: type.xml:544 +#: type.xml:573 #, no-c-format msgid "" "Registered under wrapper-binary, Byte[]characters and char[] " "in the type registry (see )." msgstr "" +#. Tag: title +#: type.xml:599 +#, no-c-format +msgid "Character[]" +msgstr "" + #. Tag: classname -#: type.xml:573 +#: type.xml:602 #, no-c-format msgid "org.hibernate.type.CharacterArrayType" msgstr "" #. Tag: para -#: type.xml:575 +#: type.xml:604 #, no-c-format msgid "Maps a java.lang.Character[] to a JDBC VARCHAR" msgstr "" #. Tag: para -#: type.xml:578 +#: type.xml:607 #, no-c-format msgid "" "Registered under wrapper-characters, Character[]" @@ -900,25 +960,25 @@ msgid "" msgstr "" #. Tag: classname -#: type.xml:587 +#: type.xml:616 #, no-c-format msgid "java.util.UUID" msgstr "" #. Tag: classname -#: type.xml:590 +#: type.xml:619 #, no-c-format msgid "org.hibernate.type.UUIDBinaryType" msgstr "" #. Tag: para -#: type.xml:592 +#: type.xml:621 #, no-c-format msgid "Maps a java.util.UUID to a JDBC BINARY" msgstr "" #. Tag: para -#: type.xml:595 +#: type.xml:624 #, no-c-format msgid "" "Registered under uuid-binary and java.util.UUIDuuid-char in the type registry (see " @@ -948,13 +1008,13 @@ msgid "" msgstr "" #. Tag: classname -#: type.xml:614 +#: type.xml:643 #, no-c-format msgid "org.hibernate.type.PostgresUUIDType" msgstr "" #. Tag: para -#: type.xml:616 +#: type.xml:645 #, no-c-format msgid "" "Maps a java.util.UUID to the PostgreSQL UUID data type (through " @@ -963,7 +1023,7 @@ msgid "" msgstr "" #. Tag: para -#: type.xml:620 +#: type.xml:649 #, no-c-format msgid "" "Registered under pg-uuid in the type registry (see ." msgstr "" #. Tag: title -#: type.xml:686 +#: type.xml:715 #, no-c-format msgid "Entity types" msgstr "" #. Tag: para -#: type.xml:687 +#: type.xml:716 #, no-c-format msgid "" "The definition of entities is covered in detail in to that Product sku. " @@ -1118,19 +1178,19 @@ msgid "" msgstr "" #. Tag: para -#: type.xml:722 +#: type.xml:751 #, no-c-format msgid "TBC..." msgstr "" #. Tag: title -#: type.xml:728 +#: type.xml:757 #, no-c-format msgid "Custom types" msgstr "" #. Tag: para -#: type.xml:729 +#: type.xml:758 #, no-c-format msgid "" "Hibernate makes it relatively easy for developers to create their own " @@ -1144,7 +1204,7 @@ msgid "" msgstr "" #. Tag: para -#: type.xml:737 +#: type.xml:766 #, no-c-format msgid "" "There are 3 approaches to developing a custom Hibernate type. As a means of " @@ -1155,14 +1215,14 @@ msgid "" msgstr "" #. Tag: title -#: type.xml:744 +#: type.xml:773 #, no-c-format msgid "" "Custom types using org.hibernate.type.Type" msgstr "" #. Tag: para -#: type.xml:745 +#: type.xml:774 #, no-c-format msgid "" "The first approach is to directly implement the org.hibernate." @@ -1178,13 +1238,13 @@ msgid "" msgstr "" #. Tag: title -#: type.xml:756 +#: type.xml:785 #, no-c-format msgid "Defining and registering the custom Type" msgstr "" #. Tag: programlisting -#: type.xml:757 +#: type.xml:786 #, no-c-format msgid "" "before " @@ -1257,7 +1317,7 @@ msgid "" msgstr "" #. Tag: title -#: type.xml:767 +#: type.xml:796 #, no-c-format msgid "" "Custom types using org.hibernate.usertype.UserTypeorg.hibernate.usertype.UserType and " @@ -1275,7 +1335,7 @@ msgid "" msgstr "" #. Tag: para -#: type.xml:776 +#: type.xml:805 #, no-c-format msgid "" "The second approach is the use the org.hibernate.usertype." @@ -1287,13 +1347,13 @@ msgid "" msgstr "" #. Tag: title -#: type.xml:783 +#: type.xml:812 #, no-c-format msgid "Defining the custom UserType" msgstr "" #. Tag: programlisting -#: type.xml:784 +#: type.xml:813 #, no-c-format msgid "" "org.hibernate.type." @@ -1351,7 +1411,7 @@ msgid "" msgstr "" #. Tag: title -#: type.xml:796 +#: type.xml:825 #, no-c-format msgid "" "Custom types using org.hibernate.usertype.CompositeUserTypeorg.hibernate." @@ -1374,13 +1434,13 @@ msgid "" msgstr "" #. Tag: title -#: type.xml:808 +#: type.xml:837 #, no-c-format msgid "Defining the custom CompositeUserType" msgstr "" #. Tag: programlisting -#: type.xml:809 +#: type.xml:838 #, no-c-format msgid "" "StringType" msgstr "" #. Tag: programlisting -#: type.xml:831 +#: type.xml:860 #, no-c-format msgid "" "registerTypeOverride is a " @@ -1525,13 +1585,13 @@ msgid "" msgstr "" #. Tag: title -#: type.xml:839 +#: type.xml:868 #, no-c-format msgid "Snippet from BasicType.java" msgstr "" #. Tag: programlisting -#: type.xml:840 +#: type.xml:869 #, no-c-format msgid "" "/**\n" @@ -1544,7 +1604,7 @@ msgid "" msgstr "" #. Tag: para -#: type.xml:842 +#: type.xml:871 #, no-c-format msgid "" "One approach is to use inheritance (SuperDuperStringType\n" "Language-Team: French \n" @@ -186,8 +186,7 @@ msgid "" "<?xml version=\"1.0\"?>\n" "<!DOCTYPE hibernate-mapping PUBLIC\n" " \"-//Hibernate/Hibernate Mapping DTD 3.0//EN\"\n" -" \"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd" -"\">\n" +" \"http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd\">\n" "\n" "<hibernate-mapping package=\"eg\">\n" "\n" @@ -738,7 +737,7 @@ msgstr "" "défaut) : spécifie que des instances de la classe sont (ou non) immuables. " #. Tag: para -#: basic_mapping.xml:349 basic_mapping.xml:2912 +#: basic_mapping.xml:349 basic_mapping.xml:2948 #, no-c-format msgid "" "schema (optional): overrides the schema name specified by " @@ -748,7 +747,7 @@ msgstr "" "par l'élément racine <hibernate-mappage>. " #. Tag: para -#: basic_mapping.xml:355 basic_mapping.xml:2918 +#: basic_mapping.xml:355 basic_mapping.xml:2954 #, no-c-format msgid "" "catalog (optional): overrides the catalog name specified " @@ -1075,7 +1074,7 @@ msgstr "" "name (optionnel) : nom de la propriété de l'identifiant." #. Tag: para -#: basic_mapping.xml:518 basic_mapping.xml:2141 +#: basic_mapping.xml:518 basic_mapping.xml:2152 #, no-c-format msgid "" "type (optional): a name that indicates the Hibernate type." @@ -3440,8 +3439,8 @@ msgstr "Timestamp (optionnel) " #, fuzzy, no-c-format msgid "" "Alternatively, you can use a timestamp. Timestamps are a less safe " -"implementation of optimistic locking. However, sometimes the application " -"might use the timestamps in other ways." +"implementation of optimistic locking. However, sometimes an application " +"might use the timestamps in other ways as well." msgstr "" "L'élément optionnel <timestamp> indique que la " "table contient des données horodatées (timestamped). Cela sert d'alternative " @@ -3473,13 +3472,27 @@ msgstr "" #: basic_mapping.xml:1598 #, no-c-format msgid "" -"Like version numbers, the timestamp can be generated by the database instead " -"of Hibernate. To do that, use @org.hibernate.annotations.Generated" -"(GenerationTime.ALWAYS)." +"When using timestamp versioning you can tell Hibernate where to retrieve the " +"timestamp value from - database or JVM - by optionally adding the " +"@org.hibernate.annotations.Source annotation to the " +"property. Possible values for the value attribute of the annotation are " +"org.hibernate.annotations.SourceType.VM and " +"org.hibernate.annotations.SourceType.DB. The default " +"is SourceType.DB which is also used in case there is " +"no @Source annotation at all." msgstr "" #. Tag: para -#: basic_mapping.xml:1602 +#: basic_mapping.xml:1609 +#, no-c-format +msgid "" +"Like in the case of version numbers, the timestamp can also be generated by " +"the database instead of Hibernate. To do that, use @org.hibernate." +"annotations.Generated(GenerationTime.ALWAYS)." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1613 #, fuzzy, no-c-format msgid "In hbm.xml, use the <timestamp> element:" msgstr "" @@ -3487,7 +3500,7 @@ msgstr "" "literal> suivant : " #. Tag: programlisting -#: basic_mapping.xml:1620 +#: basic_mapping.xml:1631 #, no-c-format msgid "" "<timestamp\n" @@ -3502,7 +3515,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:1624 +#: basic_mapping.xml:1635 #, no-c-format msgid "" "column (optional - defaults to the property name): the " @@ -3512,7 +3525,7 @@ msgstr "" "propriété) : le nom d'une colonne contenant le timestamp. " #. Tag: para -#: basic_mapping.xml:1630 +#: basic_mapping.xml:1641 #, no-c-format msgid "" "name: the name of a JavaBeans style property of Java type " @@ -3524,8 +3537,8 @@ msgstr "" "persistante. " #. Tag: para -#: basic_mapping.xml:1636 basic_mapping.xml:2163 basic_mapping.xml:2380 -#: basic_mapping.xml:3226 basic_mapping.xml:3420 basic_mapping.xml:3593 +#: basic_mapping.xml:1647 basic_mapping.xml:2174 basic_mapping.xml:2391 +#: basic_mapping.xml:3262 basic_mapping.xml:3456 basic_mapping.xml:3629 #, no-c-format msgid "" "access (optional - defaults to propertyunsaved-value (optional - defaults to nullsource (optional - defaults to vm): " @@ -3576,7 +3589,7 @@ msgstr "" "exemple)." #. Tag: para -#: basic_mapping.xml:1665 +#: basic_mapping.xml:1676 #, fuzzy, no-c-format msgid "" "generated (optional - defaults to never pour obtenir des informations supplémentaires. " #. Tag: title -#: basic_mapping.xml:1675 +#: basic_mapping.xml:1686 #, no-c-format msgid "Note" msgstr "Note" #. Tag: para -#: basic_mapping.xml:1677 +#: basic_mapping.xml:1688 #, no-c-format msgid "" "<Timestamp> is equivalent to <version " @@ -3610,13 +3623,13 @@ msgstr "" "" #. Tag: title -#: basic_mapping.xml:1686 +#: basic_mapping.xml:1697 #, no-c-format msgid "Property" msgstr "Property" #. Tag: para -#: basic_mapping.xml:1688 +#: basic_mapping.xml:1699 #, no-c-format msgid "" "You need to decide which property needs to be made persistent in a given " @@ -3625,13 +3638,13 @@ msgid "" msgstr "" #. Tag: title -#: basic_mapping.xml:1693 +#: basic_mapping.xml:1704 #, no-c-format msgid "Property mapping with annotations" msgstr "" #. Tag: para -#: basic_mapping.xml:1695 +#: basic_mapping.xml:1706 #, no-c-format msgid "" "In the annotations world, every non static non transient property (field or " @@ -3642,7 +3655,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:1702 +#: basic_mapping.xml:1713 #, no-c-format msgid "" "The @Basic annotation allows you to declare the fetching " @@ -3658,13 +3671,13 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:1715 +#: basic_mapping.xml:1726 #, no-c-format msgid "Let's look at a few examples:" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:1717 +#: basic_mapping.xml:1728 #, no-c-format msgid "" "public transient int counter; //transient property\n" @@ -3690,7 +3703,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:1719 +#: basic_mapping.xml:1730 #, no-c-format msgid "" "counter, a transient field, and lengthInMeter@Lob indicates that the property should be persisted in a " @@ -3745,7 +3758,7 @@ msgid "" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:1759 +#: basic_mapping.xml:1770 #, no-c-format msgid "" "@Lob\n" @@ -3760,7 +3773,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:1761 +#: basic_mapping.xml:1772 #, no-c-format msgid "" "If the property type implements java.io.Serializable " @@ -3770,13 +3783,13 @@ msgid "" msgstr "" #. Tag: title -#: basic_mapping.xml:1768 +#: basic_mapping.xml:1779 #, no-c-format msgid "Type" msgstr "" #. Tag: para -#: basic_mapping.xml:1770 +#: basic_mapping.xml:1781 #, no-c-format msgid "" "You can also manually specify a type using the @org.hibernate." @@ -3785,7 +3798,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:1777 basic_mapping.xml:2209 +#: basic_mapping.xml:1788 basic_mapping.xml:2220 #, no-c-format msgid "" "The name of a Hibernate basic type: integer, string, character, " @@ -3796,7 +3809,7 @@ msgstr "" "literal> etc.). " #. Tag: para -#: basic_mapping.xml:1783 basic_mapping.xml:2215 +#: basic_mapping.xml:1794 basic_mapping.xml:2226 #, no-c-format msgid "" "The name of a Java class with a default basic type: int, float, " @@ -3808,13 +3821,13 @@ msgstr "" "Integer, java.sql.Clob etc.). " #. Tag: para -#: basic_mapping.xml:1789 basic_mapping.xml:2221 +#: basic_mapping.xml:1800 basic_mapping.xml:2232 #, no-c-format msgid "The name of a serializable Java class." msgstr "Le nom d'une classe Java sérialisable." #. Tag: para -#: basic_mapping.xml:1793 basic_mapping.xml:2225 +#: basic_mapping.xml:1804 basic_mapping.xml:2236 #, no-c-format msgid "" "The class name of a custom type: com.illflow.type.MyCustomType)." #. Tag: para -#: basic_mapping.xml:1798 +#: basic_mapping.xml:1809 #, fuzzy, no-c-format msgid "" "If you do not specify a type, Hibernate will use reflection upon the named " @@ -3842,7 +3855,7 @@ msgstr "" "personnalisé)." #. Tag: para -#: basic_mapping.xml:1803 +#: basic_mapping.xml:1814 #, no-c-format msgid "" "@org.hibernate.annotations.TypeDef and @org." @@ -3861,7 +3874,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:1819 +#: basic_mapping.xml:1830 #, no-c-format msgid "" "Package level annotations are placed in a file named package-info." @@ -3870,7 +3883,7 @@ msgid "" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:1824 +#: basic_mapping.xml:1835 #, no-c-format msgid "" "@TypeDef(\n" @@ -3890,7 +3903,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:1826 +#: basic_mapping.xml:1837 #, no-c-format msgid "" "The following example shows the usage of the parameters " @@ -3898,7 +3911,7 @@ msgid "" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:1830 +#: basic_mapping.xml:1841 #, no-c-format msgid "" "//in org/hibernate/test/annotations/entity/package-info.java\n" @@ -3924,7 +3937,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:1832 +#: basic_mapping.xml:1843 #, no-c-format msgid "" "When using composite user type, you will have to express column definitions. " @@ -3932,7 +3945,7 @@ msgid "" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:1836 +#: basic_mapping.xml:1847 #, no-c-format msgid "" "@Type(type=\"org.hibernate.test.annotations.entity.MonetaryAmountUserType" @@ -3954,13 +3967,13 @@ msgid "" msgstr "" #. Tag: title -#: basic_mapping.xml:1840 +#: basic_mapping.xml:1851 #, no-c-format msgid "Access type" msgstr "" #. Tag: para -#: basic_mapping.xml:1842 +#: basic_mapping.xml:1853 #, no-c-format msgid "" "By default the access type of a class hierarchy is defined by the position " @@ -3973,7 +3986,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:1850 +#: basic_mapping.xml:1861 #, no-c-format msgid "" "The placement of annotations within a class hierarchy has to be consistent " @@ -3983,31 +3996,31 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:1857 +#: basic_mapping.xml:1868 #, no-c-format msgid "However in some situations, you need to:" msgstr "" #. Tag: para -#: basic_mapping.xml:1861 +#: basic_mapping.xml:1872 #, no-c-format msgid "force the access type of the entity hierarchy" msgstr "" #. Tag: para -#: basic_mapping.xml:1865 +#: basic_mapping.xml:1876 #, no-c-format msgid "override the access type of a specific entity in the class hierarchy" msgstr "" #. Tag: para -#: basic_mapping.xml:1870 +#: basic_mapping.xml:1881 #, no-c-format msgid "override the access type of an embeddable type" msgstr "" #. Tag: para -#: basic_mapping.xml:1874 +#: basic_mapping.xml:1885 #, no-c-format msgid "" "The best use case is an embeddable class used by several entities that might " @@ -4016,7 +4029,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:1879 +#: basic_mapping.xml:1890 #, no-c-format msgid "" "To force the access type on a given class, use the @AccessFIELD " @@ -4097,13 +4110,13 @@ msgid "" msgstr "" #. Tag: title -#: basic_mapping.xml:1896 +#: basic_mapping.xml:1907 #, no-c-format msgid "@org.hibernate.annotations.AccessType" msgstr "" #. Tag: para -#: basic_mapping.xml:1898 +#: basic_mapping.xml:1909 #, no-c-format msgid "" "The annotation @org.hibernate.annotations.AccessType " @@ -4112,13 +4125,13 @@ msgid "" msgstr "" #. Tag: title -#: basic_mapping.xml:1907 +#: basic_mapping.xml:1918 #, no-c-format msgid "Optimistic lock" msgstr "" #. Tag: para -#: basic_mapping.xml:1909 +#: basic_mapping.xml:1920 #, no-c-format msgid "" "It is sometimes useful to avoid increasing the version number even if a " @@ -4128,7 +4141,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:1914 +#: basic_mapping.xml:1925 #, no-c-format msgid "" "More formally, specifies that updates to this property do not require " @@ -4136,13 +4149,13 @@ msgid "" msgstr "" #. Tag: title -#: basic_mapping.xml:1919 +#: basic_mapping.xml:1930 #, no-c-format msgid "Declaring column attributes" msgstr "" #. Tag: para -#: basic_mapping.xml:1921 +#: basic_mapping.xml:1932 #, no-c-format msgid "" "The column(s) used for a property mapping can be defined using the " @@ -4152,37 +4165,37 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:1929 +#: basic_mapping.xml:1940 #, no-c-format msgid "not annotated at all" msgstr "" #. Tag: para -#: basic_mapping.xml:1933 +#: basic_mapping.xml:1944 #, fuzzy, no-c-format msgid "annotated with @Basic" msgstr "assigned" #. Tag: para -#: basic_mapping.xml:1937 +#: basic_mapping.xml:1948 #, fuzzy, no-c-format msgid "annotated with @Version" msgstr "string" #. Tag: para -#: basic_mapping.xml:1941 +#: basic_mapping.xml:1952 #, fuzzy, no-c-format msgid "annotated with @Lob" msgstr "hilo" #. Tag: para -#: basic_mapping.xml:1945 +#: basic_mapping.xml:1956 #, fuzzy, no-c-format msgid "annotated with @Temporal" msgstr "serializable" #. Tag: programlisting -#: basic_mapping.xml:1949 +#: basic_mapping.xml:1960 #, no-c-format msgid "" "@Entity\n" @@ -4194,7 +4207,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:1951 +#: basic_mapping.xml:1962 #, no-c-format msgid "" "The name property is mapped to the flight_namename (optional): the column name (default to the property " @@ -4237,7 +4250,7 @@ msgstr "" "name (optionnel) : nom de la propriété de l'identifiant." #. Tag: para -#: basic_mapping.xml:1992 +#: basic_mapping.xml:2003 #, fuzzy, no-c-format msgid "" "unique (optional): set a unique constraint on this column " @@ -4248,7 +4261,7 @@ msgstr "" "property-ref." #. Tag: para -#: basic_mapping.xml:1997 +#: basic_mapping.xml:2008 #, fuzzy, no-c-format msgid "" "nullable (optional): set the column as nullable (default " @@ -4257,7 +4270,7 @@ msgstr "" "name (optionnel) : nom de la propriété de l'identifiant." #. Tag: para -#: basic_mapping.xml:2002 +#: basic_mapping.xml:2013 #, fuzzy, no-c-format msgid "" "insertable (optional): whether or not the column will be " @@ -4266,7 +4279,7 @@ msgstr "" "name (optionnel) : nom de la propriété de l'identifiant." #. Tag: para -#: basic_mapping.xml:2008 +#: basic_mapping.xml:2019 #, fuzzy, no-c-format msgid "" "updatable (optional): whether or not the column will be " @@ -4276,7 +4289,7 @@ msgstr "" "données. " #. Tag: para -#: basic_mapping.xml:2014 +#: basic_mapping.xml:2025 #, no-c-format msgid "" "columnDefinition (optional): override the sql DDL " @@ -4284,7 +4297,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2020 +#: basic_mapping.xml:2031 #, fuzzy, no-c-format msgid "" "table (optional): define the targeted table (default " @@ -4294,7 +4307,7 @@ msgstr "" "données. " #. Tag: para -#: basic_mapping.xml:2025 +#: basic_mapping.xml:2036 #, no-c-format msgid "" "length (optional): column length " @@ -4302,7 +4315,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2030 +#: basic_mapping.xml:2041 #, no-c-format msgid "" "precision (optional): column decimal " @@ -4310,7 +4323,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2035 +#: basic_mapping.xml:2046 #, no-c-format msgid "" "scale (optional): column decimal scale " @@ -4318,13 +4331,13 @@ msgid "" msgstr "" #. Tag: title -#: basic_mapping.xml:2043 +#: basic_mapping.xml:2054 #, no-c-format msgid "Formula" msgstr "" #. Tag: para -#: basic_mapping.xml:2045 +#: basic_mapping.xml:2056 #, no-c-format msgid "" "Sometimes, you want the Database to do some computation for you rather than " @@ -4335,7 +4348,7 @@ msgid "" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:2051 +#: basic_mapping.xml:2062 #, no-c-format msgid "" "@Formula(\"obj_length * obj_height * obj_width\")\n" @@ -4343,32 +4356,32 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2053 +#: basic_mapping.xml:2064 #, no-c-format msgid "" "The SQL fragment can be as complex as you want and even include subselects." msgstr "" #. Tag: title -#: basic_mapping.xml:2058 +#: basic_mapping.xml:2069 #, no-c-format msgid "Non-annotated property defaults" msgstr "" #. Tag: para -#: basic_mapping.xml:2060 +#: basic_mapping.xml:2071 #, no-c-format msgid "If a property is not annotated, the following rules apply:" msgstr "" #. Tag: para -#: basic_mapping.xml:2063 +#: basic_mapping.xml:2074 #, no-c-format msgid "If the property is of a single type, it is mapped as @Basic" msgstr "" #. Tag: para -#: basic_mapping.xml:2068 +#: basic_mapping.xml:2079 #, no-c-format msgid "" "Otherwise, if the type of the property is annotated as @Embeddable, it is " @@ -4376,7 +4389,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2073 +#: basic_mapping.xml:2084 #, no-c-format msgid "" "Otherwise, if the type of the property is Serializablejava.sql.Clob<property> element declares a persistent " @@ -4411,7 +4424,7 @@ msgstr "" "persistante de la classe au sens JavaBean." #. Tag: programlisting -#: basic_mapping.xml:2125 +#: basic_mapping.xml:2136 #, no-c-format msgid "" "<property\n" @@ -4437,7 +4450,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2129 +#: basic_mapping.xml:2140 #, no-c-format msgid "" "name: the name of the property, with an initial lowercase " @@ -4447,7 +4460,7 @@ msgstr "" "minuscule. " #. Tag: para -#: basic_mapping.xml:2134 +#: basic_mapping.xml:2145 #, no-c-format msgid "" "column (optional - defaults to the property name): the " @@ -4459,7 +4472,7 @@ msgstr "" "élément(s) <column> imbriqués. " #. Tag: para -#: basic_mapping.xml:2146 +#: basic_mapping.xml:2157 #, no-c-format msgid "" "update, insert (optional - defaults to trueformula (optional): an SQL expression that defines the " @@ -4490,7 +4503,7 @@ msgstr "" "calculées ne possèdent pas leur propre mappage." #. Tag: para -#: basic_mapping.xml:2169 +#: basic_mapping.xml:2180 #, no-c-format msgid "" "lazy (optional - defaults to false): " @@ -4504,7 +4517,7 @@ msgstr "" "construction). " #. Tag: para -#: basic_mapping.xml:2176 +#: basic_mapping.xml:2187 #, no-c-format msgid "" "unique (optional): enables the DDL generation of a unique " @@ -4516,7 +4529,7 @@ msgstr "" "property-ref." #. Tag: para -#: basic_mapping.xml:2183 +#: basic_mapping.xml:2194 #, no-c-format msgid "" "not-null (optional): enables the DDL generation of a " @@ -4526,7 +4539,7 @@ msgstr "" "nullité pour les colonnes." #. Tag: para -#: basic_mapping.xml:2188 basic_mapping.xml:3246 +#: basic_mapping.xml:2199 basic_mapping.xml:3282 #, no-c-format msgid "" "optimistic-lock (optional - defaults to truegenerated (optional - defaults to never pour plus d'informations. " #. Tag: para -#: basic_mapping.xml:2205 +#: basic_mapping.xml:2216 #, no-c-format msgid "typename could be:" msgstr "typename peut être :" #. Tag: para -#: basic_mapping.xml:2230 +#: basic_mapping.xml:2241 #, no-c-format msgid "" "If you do not specify a type, Hibernate will use reflection upon the named " @@ -4582,7 +4595,7 @@ msgstr "" "personnalisé)." #. Tag: para -#: basic_mapping.xml:2239 +#: basic_mapping.xml:2250 #, no-c-format msgid "" "The access attribute allows you to control how Hibernate " @@ -4603,7 +4616,7 @@ msgstr "" "build-timey.PropertyAccessor. " #. Tag: para -#: basic_mapping.xml:2248 +#: basic_mapping.xml:2259 #, no-c-format msgid "" "A powerful feature is derived properties. These properties are by definition " @@ -4618,7 +4631,7 @@ msgstr "" "literal> dans la requête SQL qui charge une instance : " #. Tag: programlisting -#: basic_mapping.xml:2254 +#: basic_mapping.xml:2265 #, no-c-format msgid "" "<property name=\"totalPrice\"\n" @@ -4630,7 +4643,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2256 +#: basic_mapping.xml:2267 #, no-c-format msgid "" "You can reference the entity table by not declaring an alias on a particular " @@ -4645,13 +4658,13 @@ msgstr "" "l'attribut si vous le souhaitez. " #. Tag: title -#: basic_mapping.xml:2265 +#: basic_mapping.xml:2276 #, no-c-format msgid "Embedded objects (aka components)" msgstr "" #. Tag: para -#: basic_mapping.xml:2267 +#: basic_mapping.xml:2278 #, fuzzy, no-c-format msgid "" "Embeddable objects (or components) are objects whose properties are mapped " @@ -4664,7 +4677,7 @@ msgstr "" "\"Components\" plus bas :" #. Tag: para -#: basic_mapping.xml:2272 +#: basic_mapping.xml:2283 #, no-c-format msgid "" "It is possible to declare an embedded component inside an entity and even " @@ -4676,7 +4689,7 @@ msgid "" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:2280 +#: basic_mapping.xml:2291 #, no-c-format msgid "" "@Entity\n" @@ -4698,7 +4711,7 @@ msgid "" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:2282 +#: basic_mapping.xml:2293 #, no-c-format msgid "" "@Embeddable\n" @@ -4709,7 +4722,7 @@ msgid "" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:2284 +#: basic_mapping.xml:2295 #, no-c-format msgid "" "@Embeddable\n" @@ -4728,7 +4741,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2286 +#: basic_mapping.xml:2297 #, no-c-format msgid "" "An embeddable object inherits the access type of its owning entity (note " @@ -4736,7 +4749,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2290 +#: basic_mapping.xml:2301 #, no-c-format msgid "" "The Person entity has two component properties, " @@ -4754,7 +4767,7 @@ msgid "" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:2305 +#: basic_mapping.xml:2316 #, no-c-format msgid "" "@Embedded\n" @@ -4771,7 +4784,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2307 +#: basic_mapping.xml:2318 #, no-c-format msgid "" "Hibernate Annotations supports something that is not explicitly supported by " @@ -4782,7 +4795,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2313 +#: basic_mapping.xml:2324 #, no-c-format msgid "" "You can also use association annotations in an embeddable object (ie " @@ -4793,7 +4806,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2319 +#: basic_mapping.xml:2330 #, no-c-format msgid "" "If you want to have the same embeddable object type twice in the same " @@ -4807,7 +4820,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2329 +#: basic_mapping.xml:2340 #, no-c-format msgid "" "If a property of the embedded object points back to the owning entity, " @@ -4816,13 +4829,13 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2334 +#: basic_mapping.xml:2345 #, no-c-format msgid "In XML, use the <component> element." msgstr "" #. Tag: programlisting -#: basic_mapping.xml:2356 +#: basic_mapping.xml:2367 #, no-c-format msgid "" "<component\n" @@ -4844,13 +4857,13 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2360 basic_mapping.xml:3181 basic_mapping.xml:3381 +#: basic_mapping.xml:2371 basic_mapping.xml:3217 basic_mapping.xml:3417 #, no-c-format msgid "name: the name of the property." msgstr "name : le nom de la propriété. " #. Tag: para -#: basic_mapping.xml:2364 +#: basic_mapping.xml:2375 #, no-c-format msgid "" "class (optional - defaults to the property type " @@ -4860,7 +4873,7 @@ msgstr "" "déterminé par réflexion) : le nom de la classe (enfant) du composant. " #. Tag: para -#: basic_mapping.xml:2370 basic_mapping.xml:3641 +#: basic_mapping.xml:2381 basic_mapping.xml:3677 #, no-c-format msgid "" "insert: do the mapped columns appear in SQL " @@ -4870,7 +4883,7 @@ msgstr "" "SQL INSERT s ? " #. Tag: para -#: basic_mapping.xml:2375 basic_mapping.xml:3646 +#: basic_mapping.xml:2386 basic_mapping.xml:3682 #, no-c-format msgid "" "update: do the mapped columns appear in SQL " @@ -4880,7 +4893,7 @@ msgstr "" "SQL UPDATE s ? " #. Tag: para -#: basic_mapping.xml:2386 +#: basic_mapping.xml:2397 #, no-c-format msgid "" "lazy (optional - defaults to false): " @@ -4893,7 +4906,7 @@ msgstr "" "lors de la phase de construction). " #. Tag: para -#: basic_mapping.xml:2393 +#: basic_mapping.xml:2404 #, no-c-format msgid "" "optimistic-lock (optional - defaults to trueunique (optional - defaults to false): " @@ -4920,7 +4933,7 @@ msgstr "" "colonnes mappées de ce composant. " #. Tag: para -#: basic_mapping.xml:2408 +#: basic_mapping.xml:2419 #, no-c-format msgid "" "The child <property> tags map properties of the " @@ -4930,7 +4943,7 @@ msgstr "" "propriétés de la classe enfant sur les colonnes de la table. " #. Tag: para -#: basic_mapping.xml:2411 +#: basic_mapping.xml:2422 #, no-c-format msgid "" "The <component> element allows a <" @@ -4942,7 +4955,7 @@ msgstr "" "classe composant comme une référence arrière vers l'entité contenante. " #. Tag: para -#: basic_mapping.xml:2415 +#: basic_mapping.xml:2426 #, fuzzy, no-c-format msgid "" "The <dynamic-component> element allows a " @@ -4956,13 +4969,13 @@ msgstr "" "\"components-dynamic\" />. " #. Tag: title -#: basic_mapping.xml:2423 +#: basic_mapping.xml:2434 #, no-c-format msgid "Inheritance strategy" msgstr "" #. Tag: para -#: basic_mapping.xml:2425 +#: basic_mapping.xml:2436 #, no-c-format msgid "" "Java is a language supporting polymorphism: a class can inherit from " @@ -4970,7 +4983,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2431 +#: basic_mapping.xml:2442 #, no-c-format msgid "" "Single table per class hierarchy strategy: a single table hosts all the " @@ -4978,7 +4991,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2436 +#: basic_mapping.xml:2447 #, no-c-format msgid "" "Joined subclass strategy: one table per class and subclass is present and " @@ -4988,7 +5001,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2443 +#: basic_mapping.xml:2454 #, no-c-format msgid "" "Table per class strategy: one table per concrete class and subclass is " @@ -4998,13 +5011,13 @@ msgid "" msgstr "" #. Tag: title -#: basic_mapping.xml:2451 +#: basic_mapping.xml:2462 #, no-c-format msgid "Single table per class hierarchy strategy" msgstr "" #. Tag: para -#: basic_mapping.xml:2453 +#: basic_mapping.xml:2464 #, no-c-format msgid "" "With this approach the properties of all the subclasses in a given mapped " @@ -5012,7 +5025,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2456 +#: basic_mapping.xml:2467 #, fuzzy, no-c-format msgid "" "Each subclass declares its own persistent properties and subclasses. Version " @@ -5028,7 +5041,7 @@ msgstr "" "la classe Java est utilisé. " #. Tag: programlisting -#: basic_mapping.xml:2462 basic_mapping.xml:2540 +#: basic_mapping.xml:2473 basic_mapping.xml:2581 #, no-c-format msgid "" "@Entity\n" @@ -5046,7 +5059,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2464 +#: basic_mapping.xml:2475 #, fuzzy, no-c-format msgid "" "In hbm.xml, for the table-per-class-hierarchy mapping strategy, the " @@ -5058,7 +5071,7 @@ msgstr "" "subclass>. " #. Tag: programlisting -#: basic_mapping.xml:2479 +#: basic_mapping.xml:2490 #, no-c-format msgid "" "<subclass\n" @@ -5078,14 +5091,14 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2483 basic_mapping.xml:2656 basic_mapping.xml:2720 +#: basic_mapping.xml:2494 basic_mapping.xml:2692 basic_mapping.xml:2756 #, no-c-format msgid "" "name: the fully qualified class name of the subclass." msgstr "name : le nom de classe complet de la sous-classe. " #. Tag: para -#: basic_mapping.xml:2488 +#: basic_mapping.xml:2499 #, no-c-format msgid "" "discriminator-value (optional - defaults to the class " @@ -5095,7 +5108,7 @@ msgstr "" "classe) : une valeur qui distingue les différentes sous-classes. " #. Tag: para -#: basic_mapping.xml:2494 +#: basic_mapping.xml:2505 #, no-c-format msgid "" "proxy (optional): specifies a class or interface used for " @@ -5105,7 +5118,7 @@ msgstr "" "utiliser pour l'initialisation différée des proxies. " #. Tag: para -#: basic_mapping.xml:2499 +#: basic_mapping.xml:2510 #, no-c-format msgid "" "lazy (optional - defaults to true): " @@ -5116,7 +5129,7 @@ msgstr "" "l'extraction différée." #. Tag: para -#: basic_mapping.xml:2507 basic_mapping.xml:2685 basic_mapping.xml:2746 +#: basic_mapping.xml:2518 basic_mapping.xml:2721 basic_mapping.xml:2782 #, fuzzy, no-c-format msgid "" "For information about inheritance mappings see . " #. Tag: title -#: basic_mapping.xml:2511 +#: basic_mapping.xml:2522 #, no-c-format msgid "Discriminator" msgstr "Discriminator" #. Tag: para -#: basic_mapping.xml:2513 +#: basic_mapping.xml:2524 #, fuzzy, no-c-format msgid "" "Discriminators are required for polymorphic persistence using the table-per-" "class-hierarchy mapping strategy. It declares a discriminator column of the " "table. The discriminator column contains marker values that tell the " -"persistence layer what subclass to instantiate for a particular row. A " -"restricted set of types can be used: string, " -"character, integer, byte, short, boolean, " -"yes_no, true_false." +"persistence layer what subclass to instantiate for a particular row. " +"Hibernate Core supports the follwoing restricted set of types as " +"discriminator column: string, character, integer, byte, " +"short, boolean, yes_no, true_false." msgstr "" "L'élément <discriminator> est nécessaire pour la " "persistance polymorphique qui utilise la stratégie de mappage de table par " @@ -5156,21 +5170,56 @@ msgstr "" "true_false." #. Tag: para -#: basic_mapping.xml:2523 +#: basic_mapping.xml:2535 #, no-c-format msgid "" "Use the @DiscriminatorColumn to define the " -"discriminator column as well as the discriminator type. Alternatively, you " -"can also use @DiscriminatorFormula to express in SQL " -"what would be in a virtual discriminator column. This is particularly handy " -"when the discriminator value can be extracted from one or more columns of " -"the table. Both @DiscriminatorColumn and " -"@DiscriminatorFormula are to be set on the root " -"entity (once per persisted hierarchy)." +"discriminator column as well as the discriminator type. " +"The enum DiscriminatorType used in " +"javax.persitence.DiscriminatorColumn only contains " +"the values STRING, CHAR and " +"INTEGER which means that not all Hibernate supported " +"types are available via the @DiscriminatorColumn " +"annotation. You can also use @DiscriminatorFormula to express in SQL a virtual discriminator column. This is " +"particularly useful when the discriminator value can be extracted from one " +"or more columns of the table. Both @DiscriminatorColumn and @DiscriminatorFormula are to be set on " +"the root entity (once per persisted hierarchy)." msgstr "" #. Tag: para -#: basic_mapping.xml:2534 +#: basic_mapping.xml:2552 +#, no-c-format +msgid "" +"@org.hibernate.annotations.DiscriminatorOptions " +"allows to optionally specify Hibernate specific discriminator options which " +"are not standardized in JPA. The available options are force and insert. The force " +"attribute is useful if the table contains rows with \"extra\" discriminator " +"values that are not mapped to a persistent class. This could for example " +"occur when working with a legacy database. If force is " +"set to true Hibernate will specify the allowed " +"discriminator values in the SELECT query, even when " +"retrieving all instances of the root class. The second option - " +"insert - tells Hibernate whether or not to include the " +"discriminator column in SQL INSERTs. Usually the column " +"should be part of the INSERT statement, but if your " +"discriminator column is also part of a mapped composite identifier you have " +"to set this option to false." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2569 +#, no-c-format +msgid "" +"There is also a @org.hibernate.annotations.ForceDiscriminator annotation which is deprecated since version 3.6. Use " +"@DiscriminatorOptions instead." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2575 #, no-c-format msgid "" "Finally, use @DiscriminatorValue on each class of the " @@ -5180,7 +5229,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2542 +#: basic_mapping.xml:2583 #, no-c-format msgid "" "In hbm.xml, the <discriminator> element is used to " @@ -5188,7 +5237,7 @@ msgid "" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:2559 +#: basic_mapping.xml:2600 #, no-c-format msgid "" "<discriminator\n" @@ -5201,7 +5250,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2563 +#: basic_mapping.xml:2604 #, no-c-format msgid "" "column (optional - defaults to class): " @@ -5211,7 +5260,7 @@ msgstr "" "literal>), le nom de la colonne discriminante. " #. Tag: para -#: basic_mapping.xml:2569 +#: basic_mapping.xml:2610 #, no-c-format msgid "" "type (optional - defaults to string): " @@ -5221,7 +5270,7 @@ msgstr "" "un nom indiquant le type Hibernate. " #. Tag: para -#: basic_mapping.xml:2575 +#: basic_mapping.xml:2616 #, no-c-format msgid "" "force (optional - defaults to false): " @@ -5233,7 +5282,7 @@ msgstr "" "quand on récupère toutes les instances de la classe de base. " #. Tag: para -#: basic_mapping.xml:2582 +#: basic_mapping.xml:2623 #, no-c-format msgid "" "insert (optional - defaults to true): " @@ -5247,7 +5296,7 @@ msgstr "" "la colonne dans les SQL INSERT s). " #. Tag: para -#: basic_mapping.xml:2590 +#: basic_mapping.xml:2631 #, no-c-format msgid "" "formula (optional): an arbitrary SQL expression that is " @@ -5259,7 +5308,7 @@ msgstr "" "le contenu. " #. Tag: para -#: basic_mapping.xml:2597 +#: basic_mapping.xml:2638 #, no-c-format msgid "" "Actual values of the discriminator column are specified by the " @@ -5271,19 +5320,7 @@ msgstr "" "class> et <subclass>. " #. Tag: para -#: basic_mapping.xml:2602 -#, no-c-format -msgid "" -"The force attribute is only useful if the table contains " -"rows with \"extra\" discriminator values that are not mapped to a persistent " -"class. This will not usually be the case." -msgstr "" -"L'attribut force n'est utile que si la table contient des " -"lignes avec des valeurs \"extra\" discriminantes qui ne sont pas mappées à " -"une classe persistante. Ce ne sera généralement pas le cas. " - -#. Tag: para -#: basic_mapping.xml:2607 +#: basic_mapping.xml:2643 #, no-c-format msgid "" "The formula attribute allows you to declare an arbitrary " @@ -5294,7 +5331,7 @@ msgstr "" "ligne : " #. Tag: programlisting -#: basic_mapping.xml:2611 +#: basic_mapping.xml:2647 #, no-c-format msgid "" "<discriminator\n" @@ -5303,13 +5340,13 @@ msgid "" msgstr "" #. Tag: title -#: basic_mapping.xml:2616 +#: basic_mapping.xml:2652 #, fuzzy, no-c-format msgid "Joined subclass strategy" msgstr "Joined-subclass" #. Tag: para -#: basic_mapping.xml:2618 +#: basic_mapping.xml:2654 #, fuzzy, no-c-format msgid "" "Each subclass can also be mapped to its own table. This is called the table-" @@ -5327,7 +5364,7 @@ msgstr "" "joined-subclass> est utilisé. Par exemple :" #. Tag: programlisting -#: basic_mapping.xml:2628 +#: basic_mapping.xml:2664 #, no-c-format msgid "" "@Entity @Table(name=\"CATS\")\n" @@ -5348,7 +5385,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2631 +#: basic_mapping.xml:2667 #, no-c-format msgid "" "The table name still defaults to the non qualified class name. Also if " @@ -5358,7 +5395,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2638 +#: basic_mapping.xml:2674 #, fuzzy, no-c-format msgid "" "In hbm.xml, use the <joined-subclass> element. For " @@ -5368,7 +5405,7 @@ msgstr "" "Part exemple :" #. Tag: programlisting -#: basic_mapping.xml:2652 +#: basic_mapping.xml:2688 #, no-c-format msgid "" "<joined-subclass\n" @@ -5394,13 +5431,13 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2661 basic_mapping.xml:2725 +#: basic_mapping.xml:2697 basic_mapping.xml:2761 #, no-c-format msgid "table: the name of the subclass table." msgstr "table: le nom de la table de la sous-classe. " #. Tag: para -#: basic_mapping.xml:2666 basic_mapping.xml:2730 +#: basic_mapping.xml:2702 basic_mapping.xml:2766 #, no-c-format msgid "" "proxy (optional): specifies a class or interface to use " @@ -5410,7 +5447,7 @@ msgstr "" "utiliser pour l'initialisation différée des proxies. " #. Tag: para -#: basic_mapping.xml:2671 basic_mapping.xml:2735 +#: basic_mapping.xml:2707 basic_mapping.xml:2771 #, no-c-format msgid "" "lazy (optional, defaults to true): " @@ -5421,7 +5458,7 @@ msgstr "" "l'extraction différée. " #. Tag: para -#: basic_mapping.xml:2679 +#: basic_mapping.xml:2715 #, no-c-format msgid "" "Use the <key> element to declare the primary key / " @@ -5430,13 +5467,13 @@ msgid "" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:2683 +#: basic_mapping.xml:2719 #, no-c-format msgid "" "<?xml version=\"1.0\"?>\n" "<!DOCTYPE hibernate-mapping PUBLIC\n" " \"-//Hibernate/Hibernate Mapping DTD//EN\"\n" -" \"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd\">\n" +" \"http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd\">\n" "\n" "<hibernate-mapping package=\"eg\">\n" "\n" @@ -5468,13 +5505,13 @@ msgid "" msgstr "" #. Tag: title -#: basic_mapping.xml:2690 +#: basic_mapping.xml:2726 #, no-c-format msgid "Table per class strategy" msgstr "" #. Tag: para -#: basic_mapping.xml:2692 +#: basic_mapping.xml:2728 #, fuzzy, no-c-format msgid "" "A third option is to map only the concrete classes of an inheritance " @@ -5498,7 +5535,7 @@ msgstr "" "literal>. Par exemple :" #. Tag: programlisting -#: basic_mapping.xml:2701 +#: basic_mapping.xml:2737 #, no-c-format msgid "" "@Entity\n" @@ -5507,13 +5544,13 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2703 +#: basic_mapping.xml:2739 #, no-c-format msgid "Or in hbm.xml:" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:2716 +#: basic_mapping.xml:2752 #, no-c-format msgid "" "<union-subclass\n" @@ -5538,7 +5575,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2743 +#: basic_mapping.xml:2779 #, no-c-format msgid "" "No discriminator column or key column is required for this mapping strategy." @@ -5547,13 +5584,13 @@ msgstr "" "stratégie de mappage." #. Tag: title -#: basic_mapping.xml:2751 +#: basic_mapping.xml:2787 #, no-c-format msgid "Inherit properties from superclasses" msgstr "" #. Tag: para -#: basic_mapping.xml:2753 +#: basic_mapping.xml:2789 #, no-c-format msgid "" "This is sometimes useful to share common properties through a technical or a " @@ -5563,7 +5600,7 @@ msgid "" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:2758 +#: basic_mapping.xml:2794 #, no-c-format msgid "" "@MappedSuperclass\n" @@ -5582,7 +5619,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2760 +#: basic_mapping.xml:2796 #, no-c-format msgid "" "In database, this hierarchy will be represented as an Order@MappedSuperclass@Embeddable objects to " @@ -5619,7 +5656,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2786 +#: basic_mapping.xml:2822 #, no-c-format msgid "" "It is allowed to mark a class as @MappedSuperclass in the " @@ -5627,7 +5664,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2792 +#: basic_mapping.xml:2828 #, no-c-format msgid "" "Any class in the hierarchy non annotated with @MappedSuperclassaltitude property will be persisted in an " @@ -5688,7 +5725,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2809 +#: basic_mapping.xml:2845 #, no-c-format msgid "" "You can define @AttributeOverride(s) and " @@ -5698,7 +5735,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2815 +#: basic_mapping.xml:2851 #, no-c-format msgid "" "In hbm.xml, simply map the properties of the superclass in the <" @@ -5706,13 +5743,13 @@ msgid "" msgstr "" #. Tag: title -#: basic_mapping.xml:2821 +#: basic_mapping.xml:2857 #, no-c-format msgid "Mapping one entity to several tables" msgstr "" #. Tag: para -#: basic_mapping.xml:2823 +#: basic_mapping.xml:2859 #, no-c-format msgid "" "While not recommended for a fresh schema, some legacy databases force your " @@ -5720,7 +5757,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2826 +#: basic_mapping.xml:2862 #, no-c-format msgid "" "Using the @SecondaryTable or @SecondaryTablesname will be in MainCat@org.hibernate." @@ -5793,7 +5830,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2850 +#: basic_mapping.xml:2886 #, fuzzy, no-c-format msgid "" "fetch: If set to JOIN, the default, Hibernate will use an " @@ -5818,7 +5855,7 @@ msgstr "" "classes. " #. Tag: para -#: basic_mapping.xml:2862 +#: basic_mapping.xml:2898 #, fuzzy, no-c-format msgid "" "inverse: If true, Hibernate will not try to insert or " @@ -5829,7 +5866,7 @@ msgstr "" "mettre à jour les propriétés définies par cette jointure. " #. Tag: para -#: basic_mapping.xml:2868 +#: basic_mapping.xml:2904 #, fuzzy, no-c-format msgid "" "optional: If enabled (the default), Hibernate will insert " @@ -5842,7 +5879,7 @@ msgstr "" "toujours une jointure externe pour extraire les propriétés. " #. Tag: para -#: basic_mapping.xml:2875 +#: basic_mapping.xml:2911 #, no-c-format msgid "" "foreignKey: defines the Foreign Key name of a secondary " @@ -5850,7 +5887,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2880 +#: basic_mapping.xml:2916 #, no-c-format msgid "" "Make sure to use the secondary table name in the appliesto<join> element." msgstr "" @@ -5905,7 +5942,7 @@ msgstr "" "literal> suivant : " #. Tag: programlisting -#: basic_mapping.xml:2903 +#: basic_mapping.xml:2939 #, no-c-format msgid "" "<join\n" @@ -5924,13 +5961,13 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2907 +#: basic_mapping.xml:2943 #, no-c-format msgid "table: the name of the joined table." msgstr "table : le nom de la table jointe. " #. Tag: para -#: basic_mapping.xml:2924 +#: basic_mapping.xml:2960 #, no-c-format msgid "" "fetch (optional - defaults to join): " @@ -5956,7 +5993,7 @@ msgstr "" "classes. " #. Tag: para -#: basic_mapping.xml:2939 +#: basic_mapping.xml:2975 #, no-c-format msgid "" "inverse (optional - defaults to falseoptional (optional - defaults to false@ManyToOne or " @@ -6050,7 +6087,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2978 +#: basic_mapping.xml:3014 #, no-c-format msgid "" "@ManyToOne and @OneToOne have a " @@ -6062,7 +6099,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2985 +#: basic_mapping.xml:3021 #, no-c-format msgid "" "Setting a value of the cascade attribute to any " @@ -6071,7 +6108,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2992 +#: basic_mapping.xml:3028 #, no-c-format msgid "" "basic operations, which include: persist, merge, delete, save-" @@ -6079,7 +6116,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2998 +#: basic_mapping.xml:3034 #, fuzzy, no-c-format msgid "" "special values: delete-orphan or all ;" @@ -6088,7 +6125,7 @@ msgstr "" "entity-name au lieu de class. " #. Tag: para -#: basic_mapping.xml:3003 +#: basic_mapping.xml:3039 #, no-c-format msgid "" "comma-separated combinations of operation names: cascade=\"persist," @@ -6098,7 +6135,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:3012 +#: basic_mapping.xml:3048 #, no-c-format msgid "" "By default, single point associations are eagerly fetched in JPA 2. You can " @@ -6113,7 +6150,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:3022 +#: basic_mapping.xml:3058 #, no-c-format msgid "" "With the default JPA options, single-ended associations are loaded with a " @@ -6129,13 +6166,13 @@ msgid "" msgstr "" #. Tag: title -#: basic_mapping.xml:3034 +#: basic_mapping.xml:3070 #, fuzzy, no-c-format msgid "Using a foreign key or an association table" msgstr "association par clé étrangère unique" #. Tag: para -#: basic_mapping.xml:3036 +#: basic_mapping.xml:3072 #, fuzzy, no-c-format msgid "An ordinary association to another persistent class is declared using a" msgstr "" @@ -6143,7 +6180,7 @@ msgstr "" "l'élément one-to-one." #. Tag: para -#: basic_mapping.xml:3041 +#: basic_mapping.xml:3077 #, no-c-format msgid "" "@ManyToOne if several entities can point to the the " @@ -6151,7 +6188,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:3046 +#: basic_mapping.xml:3082 #, no-c-format msgid "" "@OneToOne if only a single entity can point to the " @@ -6159,7 +6196,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:3051 +#: basic_mapping.xml:3087 #, no-c-format msgid "" "and a foreign key in one table is referencing the primary key column(s) of " @@ -6167,7 +6204,7 @@ msgid "" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:3054 +#: basic_mapping.xml:3090 #, no-c-format msgid "" "@Entity\n" @@ -6182,7 +6219,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:3056 +#: basic_mapping.xml:3092 #, no-c-format msgid "" "The @JoinColumn attribute is optional, the default value" @@ -6194,7 +6231,7 @@ msgid "" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:3064 +#: basic_mapping.xml:3100 #, no-c-format msgid "" "@Entity\n" @@ -6214,7 +6251,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:3066 +#: basic_mapping.xml:3102 #, no-c-format msgid "" "You can also map a to one association through an association table. This " @@ -6226,7 +6263,7 @@ msgid "" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:3074 +#: basic_mapping.xml:3110 #, no-c-format msgid "" "@Entity\n" @@ -6244,7 +6281,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:3077 +#: basic_mapping.xml:3113 #, no-c-format msgid "" "You can use a SQL fragment to simulate a physical join column using the " @@ -6255,7 +6292,7 @@ msgid "" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:3083 +#: basic_mapping.xml:3119 #, no-c-format msgid "" "@Entity\n" @@ -6270,7 +6307,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:3086 +#: basic_mapping.xml:3122 #, no-c-format msgid "" "You can mark an association as mandatory by using the " @@ -6281,7 +6318,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:3092 +#: basic_mapping.xml:3128 #, no-c-format msgid "" "When Hibernate cannot resolve the association because the expected " @@ -6292,13 +6329,13 @@ msgid "" msgstr "" #. Tag: title -#: basic_mapping.xml:3100 +#: basic_mapping.xml:3136 #, no-c-format msgid "@NotFound annotation" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:3102 +#: basic_mapping.xml:3138 #, no-c-format msgid "" "@Entity\n" @@ -6312,7 +6349,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:3105 +#: basic_mapping.xml:3141 #, no-c-format msgid "" "Sometimes you want to delegate to your database the deletion of cascade when " @@ -6321,13 +6358,13 @@ msgid "" msgstr "" #. Tag: title -#: basic_mapping.xml:3110 +#: basic_mapping.xml:3146 #, no-c-format msgid "@OnDelete annotation" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:3112 +#: basic_mapping.xml:3148 #, no-c-format msgid "" "@Entity\n" @@ -6341,7 +6378,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:3115 +#: basic_mapping.xml:3151 #, no-c-format msgid "" "Foreign key constraints, while generated by Hibernate, have a fairly " @@ -6350,13 +6387,13 @@ msgid "" msgstr "" #. Tag: title -#: basic_mapping.xml:3120 +#: basic_mapping.xml:3156 #, fuzzy, no-c-format msgid "@ForeignKey annotation" msgstr "association par clé étrangère unique" #. Tag: programlisting -#: basic_mapping.xml:3122 +#: basic_mapping.xml:3158 #, no-c-format msgid "" "@Entity\n" @@ -6373,7 +6410,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:3125 +#: basic_mapping.xml:3161 #, no-c-format msgid "" "Sometimes, you want to link one entity to an other not by the target entity " @@ -6383,7 +6420,7 @@ msgid "" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:3130 basic_mapping.xml:3682 +#: basic_mapping.xml:3166 basic_mapping.xml:3718 #, no-c-format msgid "" "@Entity\n" @@ -6408,14 +6445,14 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:3132 +#: basic_mapping.xml:3168 #, no-c-format msgid "" "This is not encouraged however and should be reserved to legacy mappings." msgstr "" #. Tag: para -#: basic_mapping.xml:3135 +#: basic_mapping.xml:3171 #, no-c-format msgid "" "In hbm.xml, mapping an association is similar. The main difference is that a " @@ -6424,7 +6461,7 @@ msgid "" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:3177 +#: basic_mapping.xml:3213 #, no-c-format msgid "" "<many-to-one\n" @@ -6453,7 +6490,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:3185 basic_mapping.xml:3868 +#: basic_mapping.xml:3221 basic_mapping.xml:3904 #, no-c-format msgid "" "column (optional): the name of the foreign key column. " @@ -6465,7 +6502,7 @@ msgstr "" "<column>. " #. Tag: para -#: basic_mapping.xml:3191 basic_mapping.xml:3385 +#: basic_mapping.xml:3227 basic_mapping.xml:3421 #, no-c-format msgid "" "class (optional - defaults to the property type " @@ -6475,7 +6512,7 @@ msgstr "" "déterminé par réflexion) : le nom de la classe associée. " #. Tag: para -#: basic_mapping.xml:3197 basic_mapping.xml:3391 +#: basic_mapping.xml:3233 basic_mapping.xml:3427 #, no-c-format msgid "" "cascade (optional): specifies which operations should be " @@ -6485,7 +6522,7 @@ msgstr "" "être cascadées de l'objet parent vers l'objet associé. " #. Tag: para -#: basic_mapping.xml:3203 basic_mapping.xml:3407 +#: basic_mapping.xml:3239 basic_mapping.xml:3443 #, no-c-format msgid "" "fetch (optional - defaults to select): " @@ -6496,7 +6533,7 @@ msgstr "" "join) ou le chargement par select successifs." #. Tag: para -#: basic_mapping.xml:3209 +#: basic_mapping.xml:3245 #, no-c-format msgid "" "update, insert (optional - defaults to trueproperty-ref (optional): the name of a property of the " @@ -6527,7 +6564,7 @@ msgstr "" "clé primaire de la classe associée est utilisée. " #. Tag: para -#: basic_mapping.xml:3232 +#: basic_mapping.xml:3268 #, no-c-format msgid "" "unique (optional): enables the DDL generation of a unique " @@ -6541,7 +6578,7 @@ msgstr "" "association un-à-un. " #. Tag: para -#: basic_mapping.xml:3240 +#: basic_mapping.xml:3276 #, no-c-format msgid "" "not-null (optional): enables the DDL generation of a " @@ -6551,7 +6588,7 @@ msgstr "" "nullité pour les colonnes de clés étrangères." #. Tag: para -#: basic_mapping.xml:3254 +#: basic_mapping.xml:3290 #, no-c-format msgid "" "lazy (optional - defaults to proxy): " @@ -6570,7 +6607,7 @@ msgstr "" "sera toujours chargée." #. Tag: para -#: basic_mapping.xml:3264 +#: basic_mapping.xml:3300 #, no-c-format msgid "" "not-found (optional - defaults to exceptionentity-name (optional): the entity name of the associated " @@ -6594,7 +6631,7 @@ msgstr "" "associée. " #. Tag: para -#: basic_mapping.xml:3277 +#: basic_mapping.xml:3313 #, no-c-format msgid "" "formula (optional): an SQL expression that defines the " @@ -6604,7 +6641,7 @@ msgstr "" "valeur pour une clé étrangère calculée. " #. Tag: para -#: basic_mapping.xml:3284 +#: basic_mapping.xml:3320 #, fuzzy, no-c-format msgid "" "Setting a value of the cascade attribute to any " @@ -6633,7 +6670,7 @@ msgstr "" "(associations plusieurs-à-un et un-à-un) ne supportent pas orphan delete. " #. Tag: para -#: basic_mapping.xml:3298 +#: basic_mapping.xml:3334 #, no-c-format msgid "" "Here is an example of a typical many-to-one declaration:" @@ -6642,14 +6679,14 @@ msgstr "" "que : " #. Tag: programlisting -#: basic_mapping.xml:3301 +#: basic_mapping.xml:3337 #, no-c-format msgid "" "<many-to-one name=\"product\" class=\"Product\" column=\"PRODUCT_ID\"/>" msgstr "" #. Tag: para -#: basic_mapping.xml:3303 +#: basic_mapping.xml:3339 #, no-c-format msgid "" "The property-ref attribute should only be used for " @@ -6669,7 +6706,7 @@ msgstr "" "contrôle la génération DDL par Hibernate avec l'outil SchemaExport." #. Tag: programlisting -#: basic_mapping.xml:3311 +#: basic_mapping.xml:3347 #, no-c-format msgid "" "<property name=\"serialNumber\" unique=\"true\" type=\"string\" column=" @@ -6677,13 +6714,13 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:3313 +#: basic_mapping.xml:3349 #, no-c-format msgid "Then the mapping for OrderItem might use:" msgstr "Ainsi le mappage pour OrderItem peut utiliser :" #. Tag: programlisting -#: basic_mapping.xml:3316 +#: basic_mapping.xml:3352 #, no-c-format msgid "" "<many-to-one name=\"product\" property-ref=\"serialNumber\" column=" @@ -6691,13 +6728,13 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:3318 +#: basic_mapping.xml:3354 #, no-c-format msgid "This is not encouraged, however." msgstr "Bien que ce ne soit certainement pas encouragé." #. Tag: para -#: basic_mapping.xml:3320 +#: basic_mapping.xml:3356 #, no-c-format msgid "" "If the referenced unique key comprises multiple properties of the associated " @@ -6709,7 +6746,7 @@ msgstr "" "<properties>. " #. Tag: para -#: basic_mapping.xml:3324 +#: basic_mapping.xml:3360 #, no-c-format msgid "" "If the referenced unique key is the property of a component, you can specify " @@ -6719,7 +6756,7 @@ msgstr "" "spécifier le chemin de propriété :" #. Tag: programlisting -#: basic_mapping.xml:3327 +#: basic_mapping.xml:3363 #, no-c-format msgid "" "<many-to-one name=\"owner\" property-ref=\"identity.ssn\" column=" @@ -6727,13 +6764,13 @@ msgid "" msgstr "" #. Tag: title -#: basic_mapping.xml:3331 +#: basic_mapping.xml:3367 #, no-c-format msgid "Sharing the primary key with the associated entity" msgstr "" #. Tag: para -#: basic_mapping.xml:3333 +#: basic_mapping.xml:3369 #, no-c-format msgid "" "The second approach is to ensure an entity and its associated entity share " @@ -6742,13 +6779,13 @@ msgid "" msgstr "" #. Tag: title -#: basic_mapping.xml:3339 +#: basic_mapping.xml:3375 #, fuzzy, no-c-format msgid "One to One association" msgstr "association par clé étrangère unique" #. Tag: programlisting -#: basic_mapping.xml:3341 +#: basic_mapping.xml:3377 #, no-c-format msgid "" "@Entity\n" @@ -6772,7 +6809,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:3345 +#: basic_mapping.xml:3381 #, no-c-format msgid "" "Many people got confused by these primary key based one to one associations. " @@ -6782,13 +6819,13 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:3352 +#: basic_mapping.xml:3388 #, no-c-format msgid "In hbm.xml, use the following mapping." msgstr "" #. Tag: programlisting -#: basic_mapping.xml:3377 +#: basic_mapping.xml:3413 #, no-c-format msgid "" "<one-to-one\n" @@ -6809,7 +6846,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:3397 +#: basic_mapping.xml:3433 #, no-c-format msgid "" "constrained (optional): specifies that a foreign key " @@ -6827,7 +6864,7 @@ msgstr "" "l'outil SchemaExport). " #. Tag: para -#: basic_mapping.xml:3413 +#: basic_mapping.xml:3449 #, no-c-format msgid "" "property-ref (optional): the name of a property of the " @@ -6839,7 +6876,7 @@ msgstr "" "n'est pas spécifié, la clé primaire de la classe associée est utilisée. " #. Tag: para -#: basic_mapping.xml:3426 +#: basic_mapping.xml:3462 #, no-c-format msgid "" "formula (optional): almost all one-to-one associations " @@ -6855,7 +6892,7 @@ msgstr "" "onetooneformula pour un exemple." #. Tag: para -#: basic_mapping.xml:3435 +#: basic_mapping.xml:3471 #, no-c-format msgid "" "lazy (optional - defaults to proxy): " @@ -6877,7 +6914,7 @@ msgstr "" "impossible et Hibernate chargera automatiquement l'association ." #. Tag: para -#: basic_mapping.xml:3454 +#: basic_mapping.xml:3490 #, no-c-format msgid "" "Primary key associations do not need an extra table column. If two rows are " @@ -6893,7 +6930,7 @@ msgstr "" "d'identifiant. " #. Tag: para -#: basic_mapping.xml:3460 +#: basic_mapping.xml:3496 #, no-c-format msgid "" "For a primary key association, add the following mappings to " @@ -6903,20 +6940,20 @@ msgstr "" "Employee et Person, respectivement :" #. Tag: programlisting -#: basic_mapping.xml:3464 +#: basic_mapping.xml:3500 #, no-c-format msgid "<one-to-one name=\"person\" class=\"Person\"/>" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:3466 +#: basic_mapping.xml:3502 #, no-c-format msgid "" "<one-to-one name=\"employee\" class=\"Employee\" constrained=\"true\"/>" msgstr "" #. Tag: para -#: basic_mapping.xml:3468 +#: basic_mapping.xml:3504 #, no-c-format msgid "" "Ensure that the primary keys of the related rows in the PERSON and EMPLOYEE " @@ -6929,7 +6966,7 @@ msgstr "" "foreign : " #. Tag: programlisting -#: basic_mapping.xml:3472 +#: basic_mapping.xml:3508 #, no-c-format msgid "" "<class name=\"person\" table=\"PERSON\">\n" @@ -6946,7 +6983,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:3474 +#: basic_mapping.xml:3510 #, no-c-format msgid "" "A newly saved instance of Person is assigned the same " @@ -6959,13 +6996,13 @@ msgstr "" "literal> de cette Person. " #. Tag: title -#: basic_mapping.xml:3482 +#: basic_mapping.xml:3518 #, no-c-format msgid "Natural-id" msgstr "Natural-id" #. Tag: para -#: basic_mapping.xml:3484 +#: basic_mapping.xml:3520 #, fuzzy, no-c-format msgid "" "Although we recommend the use of surrogate keys as primary keys, you should " @@ -6985,7 +7022,7 @@ msgstr "" "contraintes de non-nullité, et votre mappage s'auto-documentera. " #. Tag: programlisting -#: basic_mapping.xml:3493 +#: basic_mapping.xml:3529 #, no-c-format msgid "" "@Entity\n" @@ -7015,13 +7052,13 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:3495 +#: basic_mapping.xml:3531 #, no-c-format msgid "Or in XML," msgstr "" #. Tag: programlisting -#: basic_mapping.xml:3497 +#: basic_mapping.xml:3533 #, no-c-format msgid "" "<natural-id mutable=\"true|false\"/>\n" @@ -7032,7 +7069,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:3499 +#: basic_mapping.xml:3535 #, no-c-format msgid "" "It is recommended that you implement equals() and " @@ -7044,7 +7081,7 @@ msgstr "" "naturelles de l'entité." #. Tag: para -#: basic_mapping.xml:3503 +#: basic_mapping.xml:3539 #, no-c-format msgid "" "This mapping is not intended for use with entities that have natural primary " @@ -7054,7 +7091,7 @@ msgstr "" "clés naturelles. " #. Tag: para -#: basic_mapping.xml:3508 +#: basic_mapping.xml:3544 #, no-c-format msgid "" "mutable (optional - defaults to falseAny" msgstr "binary" #. Tag: para -#: basic_mapping.xml:3518 +#: basic_mapping.xml:3554 #, fuzzy, no-c-format msgid "" "There is one more type of property mapping. The @Any " @@ -7096,7 +7133,7 @@ msgstr "" "utilisateur, etc...). " #. Tag: para -#: basic_mapping.xml:3528 +#: basic_mapping.xml:3564 #, fuzzy, no-c-format msgid "" "The @Any annotation describes the column holding the " @@ -7115,7 +7152,7 @@ msgstr "" "partir de valeurs du méta-type sur les noms des classes. " #. Tag: programlisting -#: basic_mapping.xml:3538 +#: basic_mapping.xml:3574 #, no-c-format msgid "" "@Any( metaColumn = @Column( name = \"property_type\" ), fetch=FetchType." @@ -7134,7 +7171,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:3540 +#: basic_mapping.xml:3576 #, no-c-format msgid "" "Note that @AnyDef can be mutualized and reused. It is " @@ -7142,7 +7179,7 @@ msgid "" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:3544 +#: basic_mapping.xml:3580 #, no-c-format msgid "" "//on a package\n" @@ -7166,13 +7203,13 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:3546 +#: basic_mapping.xml:3582 #, no-c-format msgid "The hbm.xml equivalent is:" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:3548 +#: basic_mapping.xml:3584 #, no-c-format msgid "" "<any name=\"being\" id-type=\"long\" meta-type=\"string\">\n" @@ -7185,13 +7222,13 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:3551 +#: basic_mapping.xml:3587 #, no-c-format msgid "You cannot mutualize the metadata in hbm.xml as you can in annotations." msgstr "" #. Tag: programlisting -#: basic_mapping.xml:3570 +#: basic_mapping.xml:3606 #, no-c-format msgid "" "<any\n" @@ -7212,19 +7249,19 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:3574 +#: basic_mapping.xml:3610 #, no-c-format msgid "name: the property name." msgstr "name : le nom de la propriété. " #. Tag: para -#: basic_mapping.xml:3578 +#: basic_mapping.xml:3614 #, no-c-format msgid "id-type: the identifier type." msgstr "id-type : le type identifiant." #. Tag: para -#: basic_mapping.xml:3582 +#: basic_mapping.xml:3618 #, no-c-format msgid "" "meta-type (optional - defaults to string) : tout type permis pour un mappage par discriminateur." #. Tag: para -#: basic_mapping.xml:3588 +#: basic_mapping.xml:3624 #, no-c-format msgid "" "cascade (optional- defaults to none): " @@ -7244,7 +7281,7 @@ msgstr "" "literal>) : le style de cascade. " #. Tag: para -#: basic_mapping.xml:3599 +#: basic_mapping.xml:3635 #, no-c-format msgid "" "optimistic-lock (optional - defaults to true<properties> element allows the definition of a " @@ -7282,7 +7319,7 @@ msgstr "" "exemple :" #. Tag: programlisting -#: basic_mapping.xml:3632 +#: basic_mapping.xml:3668 #, no-c-format msgid "" "<properties\n" @@ -7300,7 +7337,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:3636 +#: basic_mapping.xml:3672 #, no-c-format msgid "" "name: the logical name of the grouping. It is " @@ -7310,7 +7347,7 @@ msgstr "" "emphasis> le véritable nom d'une propriété. " #. Tag: para -#: basic_mapping.xml:3651 +#: basic_mapping.xml:3687 #, no-c-format msgid "" "optimistic-lock (optional - defaults to true<properties> " @@ -7335,7 +7372,7 @@ msgstr "" "literal> suivant : " #. Tag: programlisting -#: basic_mapping.xml:3669 +#: basic_mapping.xml:3705 #, no-c-format msgid "" "<class name=\"Person\">\n" @@ -7352,7 +7389,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:3671 +#: basic_mapping.xml:3707 #, no-c-format msgid "" "You might have some legacy data association that refers to this unique key " @@ -7363,7 +7400,7 @@ msgstr "" "literal> au lieu de la clé primaire : " #. Tag: programlisting -#: basic_mapping.xml:3675 +#: basic_mapping.xml:3711 #, no-c-format msgid "" "<many-to-one name=\"owner\"\n" @@ -7375,7 +7412,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:3678 +#: basic_mapping.xml:3714 #, no-c-format msgid "" "When using annotations as a mapping strategy, such construct is not " @@ -7384,7 +7421,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:3685 +#: basic_mapping.xml:3721 #, no-c-format msgid "" "The use of this outside the context of mapping legacy data is not " @@ -7394,13 +7431,13 @@ msgstr "" "mappage de données héritées d'anciens systèmes. " #. Tag: title -#: basic_mapping.xml:3690 +#: basic_mapping.xml:3726 #, no-c-format msgid "Some hbm.xml specificities" msgstr "" #. Tag: para -#: basic_mapping.xml:3692 +#: basic_mapping.xml:3728 #, no-c-format msgid "" "The hbm.xml structure has some specificities naturally not present when " @@ -7408,13 +7445,13 @@ msgid "" msgstr "" #. Tag: title -#: basic_mapping.xml:3696 +#: basic_mapping.xml:3732 #, no-c-format msgid "Doctype" msgstr "Doctype" #. Tag: para -#: basic_mapping.xml:3698 +#: basic_mapping.xml:3734 #, no-c-format msgid "" "All XML mappings should declare the doctype shown. The actual DTD can be " @@ -7433,13 +7470,13 @@ msgstr "" "de votre classpath. " #. Tag: title -#: basic_mapping.xml:3707 +#: basic_mapping.xml:3743 #, no-c-format msgid "EntityResolver" msgstr "EntityResolver" #. Tag: para -#: basic_mapping.xml:3709 +#: basic_mapping.xml:3745 #, no-c-format msgid "" "Hibernate will first attempt to resolve DTDs in its classpath. It does this " @@ -7456,12 +7493,12 @@ msgstr "" "nommage systemId différents :" #. Tag: para -#: basic_mapping.xml:3718 -#, no-c-format +#: basic_mapping.xml:3754 +#, fuzzy, no-c-format msgid "" "a hibernate namespace is recognized whenever the resolver " -"encounters a systemId starting with http://hibernate.sourceforge." -"net/. The resolver attempts to resolve these entities via the " +"encounters a systemId starting with http://www.hibernate.org/dtd/. The resolver attempts to resolve these entities via the " "classloader which loaded the Hibernate classes." msgstr "" "un espace de nommage hibernate est reconnu dès que le " @@ -7470,7 +7507,7 @@ msgstr "" "via le chargeur de classe qui a chargé les classes Hibernate." #. Tag: para -#: basic_mapping.xml:3726 +#: basic_mapping.xml:3762 #, no-c-format msgid "" "a user namespace is recognized whenever the resolver " @@ -7486,13 +7523,13 @@ msgstr "" "le chargeur de classe qui a chargé les classes Hibernate." #. Tag: para -#: basic_mapping.xml:3735 +#: basic_mapping.xml:3771 #, no-c-format msgid "The following is an example of utilizing user namespacing:" msgstr "Un exemple d'utilisation de l'espace de nommage utilisateur: " #. Tag: programlisting -#: basic_mapping.xml:3738 +#: basic_mapping.xml:3774 #, no-c-format msgid "" "types.xml is a resource in the your." @@ -7512,13 +7549,13 @@ msgstr "" "custom\"/> personnalisé. " #. Tag: title -#: basic_mapping.xml:3747 +#: basic_mapping.xml:3783 #, no-c-format msgid "Hibernate-mapping" msgstr "Hibernate-mappage" #. Tag: para -#: basic_mapping.xml:3749 +#: basic_mapping.xml:3785 #, no-c-format msgid "" "This element has several optional attributes. The schema " @@ -7543,7 +7580,7 @@ msgstr "" "classes non qualifiés dans le langage de requête, par défaut. " #. Tag: programlisting -#: basic_mapping.xml:3778 +#: basic_mapping.xml:3814 #, no-c-format msgid "" "<hibernate-mapping\n" @@ -7558,7 +7595,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:3782 +#: basic_mapping.xml:3818 #, no-c-format msgid "schema (optional): the name of a database schema." msgstr "" @@ -7566,7 +7603,7 @@ msgstr "" "données. " #. Tag: para -#: basic_mapping.xml:3787 +#: basic_mapping.xml:3823 #, no-c-format msgid "catalog (optional): the name of a database catalog." msgstr "" @@ -7574,7 +7611,7 @@ msgstr "" "données. " #. Tag: para -#: basic_mapping.xml:3792 +#: basic_mapping.xml:3828 #, no-c-format msgid "" "default-cascade (optional - defaults to nonenone) : un type de cascade par défaut. " #. Tag: para -#: basic_mapping.xml:3797 +#: basic_mapping.xml:3833 #, no-c-format msgid "" "default-access (optional - defaults to property. " #. Tag: para -#: basic_mapping.xml:3804 +#: basic_mapping.xml:3840 #, no-c-format msgid "" "default-lazy (optional - defaults to trueauto-import (optional - defaults to truepackage (optional): specifies a package prefix to use for " @@ -7632,7 +7669,7 @@ msgstr "" "pour les noms de classe non qualifiés du document de mappage. " #. Tag: para -#: basic_mapping.xml:3825 +#: basic_mapping.xml:3861 #, no-c-format msgid "" "If you have two persistent classes with the same unqualified name, you " @@ -7645,7 +7682,7 @@ msgstr "" "deux classes." #. Tag: para -#: basic_mapping.xml:3830 +#: basic_mapping.xml:3866 #, no-c-format msgid "" "The hibernate-mapping element allows you to nest several " @@ -7666,13 +7703,13 @@ msgstr "" "xml, ou en cas d'héritage, Animal.hbm.xml. " #. Tag: title -#: basic_mapping.xml:3841 +#: basic_mapping.xml:3877 #, no-c-format msgid "Key" msgstr "" #. Tag: para -#: basic_mapping.xml:3843 +#: basic_mapping.xml:3879 #, fuzzy, no-c-format msgid "" "The <key> element is featured a few times within " @@ -7686,7 +7723,7 @@ msgstr "" "dans la table jointe, qui référence la clé primaire de la table d'origine :" #. Tag: programlisting -#: basic_mapping.xml:3864 +#: basic_mapping.xml:3900 #, no-c-format msgid "" "<key\n" @@ -7700,7 +7737,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:3874 +#: basic_mapping.xml:3910 #, no-c-format msgid "" "on-delete (optional - defaults to noactionproperty-ref (optional): specifies that the foreign key " @@ -7724,7 +7761,7 @@ msgstr "" "d'origine (Pour les données d'anciens systèmes). " #. Tag: para -#: basic_mapping.xml:3886 +#: basic_mapping.xml:3922 #, no-c-format msgid "" "not-null (optional): specifies that the foreign key " @@ -7736,7 +7773,7 @@ msgstr "" "fait partie de la clé primaire). " #. Tag: para -#: basic_mapping.xml:3892 +#: basic_mapping.xml:3928 #, no-c-format msgid "" "update (optional): specifies that the foreign key should " @@ -7748,7 +7785,7 @@ msgstr "" "primaire). " #. Tag: para -#: basic_mapping.xml:3898 +#: basic_mapping.xml:3934 #, no-c-format msgid "" "unique (optional): specifies that the foreign key should " @@ -7760,7 +7797,7 @@ msgstr "" "la clé primaire). " #. Tag: para -#: basic_mapping.xml:3905 +#: basic_mapping.xml:3941 #, no-c-format msgid "" "For systems where delete performance is important, we recommend that all " @@ -7779,7 +7816,7 @@ msgstr "" "versionnées. " #. Tag: para -#: basic_mapping.xml:3913 +#: basic_mapping.xml:3949 #, no-c-format msgid "" "The not-null and update attributes are " @@ -7795,13 +7832,13 @@ msgstr "" "<key not-null=\"true\">. " #. Tag: title -#: basic_mapping.xml:3922 +#: basic_mapping.xml:3958 #, no-c-format msgid "Import" msgstr "Import" #. Tag: para -#: basic_mapping.xml:3924 +#: basic_mapping.xml:3960 #, no-c-format msgid "" "If your application has two persistent classes with the same name, and you " @@ -7818,13 +7855,13 @@ msgstr "" "mappées explicitement :" #. Tag: programlisting -#: basic_mapping.xml:3930 +#: basic_mapping.xml:3966 #, no-c-format msgid "<import class=\"java.lang.Object\" rename=\"Universe\"/>" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:3939 +#: basic_mapping.xml:3975 #, no-c-format msgid "" "<import\n" @@ -7834,14 +7871,14 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:3943 +#: basic_mapping.xml:3979 #, no-c-format msgid "" "class: the fully qualified class name of any Java class." msgstr "class : nom complet de toute classe Java. " #. Tag: para -#: basic_mapping.xml:3948 +#: basic_mapping.xml:3984 #, no-c-format msgid "" "rename (optional - defaults to the unqualified class " @@ -7851,19 +7888,19 @@ msgstr "" "non qualifié): nom pouvant être utilisé dans le langage de requête. " #. Tag: para -#: basic_mapping.xml:3956 +#: basic_mapping.xml:3992 #, no-c-format msgid "This feature is unique to hbm.xml and is not supported in annotations." msgstr "" #. Tag: title -#: basic_mapping.xml:3962 +#: basic_mapping.xml:3998 #, no-c-format msgid "Column and formula elements" msgstr "Éléments column et formula " #. Tag: para -#: basic_mapping.xml:3964 +#: basic_mapping.xml:4000 #, no-c-format msgid "" "Mapping elements which accept a column attribute will " @@ -7877,7 +7914,7 @@ msgstr "" "l'attribut formula. Par exemple :" #. Tag: programlisting -#: basic_mapping.xml:3970 +#: basic_mapping.xml:4006 #, no-c-format msgid "" "<column\n" @@ -7897,13 +7934,13 @@ msgid "" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:3972 +#: basic_mapping.xml:4008 #, no-c-format msgid "<formula>SQL expression</formula>" msgstr "" #. Tag: para -#: basic_mapping.xml:3974 +#: basic_mapping.xml:4010 #, no-c-format msgid "" "Most of the attributes on column provide a means of " @@ -7915,7 +7952,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:3982 +#: basic_mapping.xml:4018 #, fuzzy, no-c-format msgid "" "The column and formula elements can " @@ -7928,7 +7965,7 @@ msgstr "" "exotiques. " #. Tag: programlisting -#: basic_mapping.xml:3986 +#: basic_mapping.xml:4022 #, no-c-format msgid "" "<many-to-one name=\"homeAddress\" class=\"Address\"\n" @@ -7939,19 +7976,19 @@ msgid "" msgstr "" #. Tag: title -#: basic_mapping.xml:3992 +#: basic_mapping.xml:4028 #, no-c-format msgid "Hibernate types" msgstr "Types Hibernate " #. Tag: title -#: basic_mapping.xml:3995 +#: basic_mapping.xml:4031 #, no-c-format msgid "Entities and values" msgstr "Entités et valeurs" #. Tag: para -#: basic_mapping.xml:3997 +#: basic_mapping.xml:4033 #, no-c-format msgid "" "In relation to the persistence service, Java language-level objects are " @@ -7961,7 +7998,7 @@ msgstr "" "niveau langage Java :" #. Tag: para -#: basic_mapping.xml:4000 +#: basic_mapping.xml:4036 #, no-c-format msgid "" "An entity exists independently of any other objects " @@ -7986,7 +8023,7 @@ msgstr "" "partagées. Elles peuvent aussi être versionnées." #. Tag: para -#: basic_mapping.xml:4010 +#: basic_mapping.xml:4046 #, no-c-format msgid "" "An entity's persistent state consists of references to other entities and " @@ -8011,7 +8048,7 @@ msgstr "" "partagées par deux entités ou collections. " #. Tag: para -#: basic_mapping.xml:4020 +#: basic_mapping.xml:4056 #, no-c-format msgid "" "Until now, we have been using the term \"persistent class\" to refer to " @@ -8042,14 +8079,14 @@ msgstr "" "l'agrégation se traduit en général par une valeur type. " #. Tag: para -#: basic_mapping.xml:4033 +#: basic_mapping.xml:4069 #, no-c-format msgid "We will revisit both concepts throughout this reference guide." msgstr "" "Nous nous pencherons sur ces deux concepts tout au long de la documentation. " #. Tag: para -#: basic_mapping.xml:4036 +#: basic_mapping.xml:4072 #, no-c-format msgid "" "The challenge is to map the Java type system, and the developers' definition " @@ -8077,7 +8114,7 @@ msgstr "" "nous le verrons plus tard. " #. Tag: para -#: basic_mapping.xml:4049 +#: basic_mapping.xml:4085 #, no-c-format msgid "" "With the exception of collections, all built-in Hibernate types support null " @@ -8087,13 +8124,13 @@ msgstr "" "sémantiques null. " #. Tag: title -#: basic_mapping.xml:4054 +#: basic_mapping.xml:4090 #, no-c-format msgid "Basic value types" msgstr "Types valeurs de base " #. Tag: para -#: basic_mapping.xml:4056 +#: basic_mapping.xml:4092 #, no-c-format msgid "" "The built-in basic mapping types can be roughly " @@ -8103,7 +8140,7 @@ msgstr "" "façon suivante :" #. Tag: literal -#: basic_mapping.xml:4059 +#: basic_mapping.xml:4095 #, fuzzy, no-c-format msgid "" "integer, long, short, float, double, character, byte, boolean, yes_no, " @@ -8113,7 +8150,7 @@ msgstr "" "yes_no, true_false" #. Tag: para -#: basic_mapping.xml:4063 +#: basic_mapping.xml:4099 #, no-c-format msgid "" "Type mappings from Java primitives or wrapper classes to appropriate (vendor-" @@ -8128,13 +8165,13 @@ msgstr "" "java.lang.Boolean." #. Tag: literal -#: basic_mapping.xml:4073 +#: basic_mapping.xml:4109 #, no-c-format msgid "string" msgstr "" #. Tag: para -#: basic_mapping.xml:4076 +#: basic_mapping.xml:4112 #, no-c-format msgid "" "A type mapping from java.lang.String to VARCHARVARCHAR (ou le VARCHAR2 Oracle)." #. Tag: literal -#: basic_mapping.xml:4083 +#: basic_mapping.xml:4119 #, fuzzy, no-c-format msgid "date, time, timestamp" msgstr "date, time, timestamp" #. Tag: para -#: basic_mapping.xml:4086 +#: basic_mapping.xml:4122 #, no-c-format msgid "" "Type mappings from java.util.Date and its subclasses to " @@ -8162,13 +8199,13 @@ msgstr "" "TIMESTAMP (ou équivalent)." #. Tag: literal -#: basic_mapping.xml:4094 +#: basic_mapping.xml:4130 #, fuzzy, no-c-format msgid "calendar, calendar_date" msgstr "calendar, calendar_date" #. Tag: para -#: basic_mapping.xml:4097 +#: basic_mapping.xml:4133 #, no-c-format msgid "" "Type mappings from java.util.Calendar to SQL types " @@ -8178,13 +8215,13 @@ msgstr "" "SQL TIMESTAMP et DATE (ou équivalent)." #. Tag: literal -#: basic_mapping.xml:4104 +#: basic_mapping.xml:4140 #, fuzzy, no-c-format msgid "big_decimal, big_integer" msgstr "big_decimal, big_integer" #. Tag: para -#: basic_mapping.xml:4107 +#: basic_mapping.xml:4143 #, no-c-format msgid "" "Type mappings from java.math.BigDecimal and java." @@ -8196,13 +8233,13 @@ msgstr "" "NUMBER Oracle)." #. Tag: literal -#: basic_mapping.xml:4115 +#: basic_mapping.xml:4151 #, fuzzy, no-c-format msgid "locale, timezone, currency" msgstr "locale, timezone, currency" #. Tag: para -#: basic_mapping.xml:4118 +#: basic_mapping.xml:4154 #, no-c-format msgid "" "Type mappings from java.util.Locale, java.util." @@ -8220,13 +8257,13 @@ msgstr "" "sont mappées sur leur ID." #. Tag: literal -#: basic_mapping.xml:4131 +#: basic_mapping.xml:4167 #, fuzzy, no-c-format msgid "class" msgstr "Classe" #. Tag: para -#: basic_mapping.xml:4134 +#: basic_mapping.xml:4170 #, no-c-format msgid "" "A type mapping from java.lang.Class to VARCHARClass est mappé sur son nom Java complet." #. Tag: literal -#: basic_mapping.xml:4142 +#: basic_mapping.xml:4178 #, no-c-format msgid "binary" msgstr "" #. Tag: para -#: basic_mapping.xml:4145 +#: basic_mapping.xml:4181 #, no-c-format msgid "Maps byte arrays to an appropriate SQL binary type." msgstr "Mappe les tableaux de bytes vers le type binaire SQL approprié." #. Tag: literal -#: basic_mapping.xml:4150 +#: basic_mapping.xml:4186 #, no-c-format msgid "text" msgstr "" #. Tag: para -#: basic_mapping.xml:4153 -#, no-c-format +#: basic_mapping.xml:4189 +#, fuzzy, no-c-format msgid "" -"Maps long Java strings to a SQL CLOB or TEXT type." +"Maps long Java strings to a SQL LONGVARCHAR or " +"TEXT type." msgstr "" "Mappe les longues chaînes de caractères Java vers les types SQL " "CLOB ou TEXT." #. Tag: literal -#: basic_mapping.xml:4159 +#: basic_mapping.xml:4195 +#, no-c-format +msgid "image" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:4198 +#, fuzzy, no-c-format +msgid "Maps long byte arrays to a SQL LONGVARBINARY." +msgstr "" +"Mappe les longues chaînes de caractères Java vers les types SQL " +"CLOB ou TEXT." + +#. Tag: literal +#: basic_mapping.xml:4203 #, no-c-format msgid "serializable" msgstr "" #. Tag: para -#: basic_mapping.xml:4162 +#: basic_mapping.xml:4206 #, no-c-format msgid "" "Maps serializable Java types to an appropriate SQL binary type. You can also " @@ -8285,13 +8336,13 @@ msgstr "" "défaut un type de base. " #. Tag: literal -#: basic_mapping.xml:4171 +#: basic_mapping.xml:4215 #, no-c-format msgid "clob, blob" msgstr "" #. Tag: para -#: basic_mapping.xml:4174 +#: basic_mapping.xml:4218 #, no-c-format msgid "" "Type mappings for the JDBC classes java.sql.Clob and " @@ -8306,7 +8357,41 @@ msgstr "" "pilotes comporte des lacunes)." #. Tag: literal -#: basic_mapping.xml:4184 +#: basic_mapping.xml:4228 +#, no-c-format +msgid "materialized_clob" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:4231 +#, no-c-format +msgid "" +"Maps long Java strings to a SQL CLOB type. When read, the " +"CLOB value is immediately materialized into a Java " +"string. Some drivers require the CLOB value to be read " +"within a transaction. Once materialized, the Java string is available " +"outside of the transaction." +msgstr "" + +#. Tag: literal +#: basic_mapping.xml:4241 +#, no-c-format +msgid "materialized_blob" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:4244 +#, no-c-format +msgid "" +"Maps long Java byte arrays to a SQL BLOB type. When read, " +"the BLOB value is immediately materialized into a byte " +"array. Some drivers require the BLOB value to be read " +"within a transaction. Once materialized, the byte array is available outside " +"of the transaction." +msgstr "" + +#. Tag: literal +#: basic_mapping.xml:4254 #, fuzzy, no-c-format msgid "" "imm_date, imm_time, imm_timestamp, imm_calendar, imm_calendar_date, " @@ -8316,7 +8401,7 @@ msgstr "" "imm_serializable, imm_binary" #. Tag: para -#: basic_mapping.xml:4188 +#: basic_mapping.xml:4258 #, no-c-format msgid "" "Type mappings for what are considered mutable Java types. This is where " @@ -8337,7 +8422,7 @@ msgstr "" "assigner un nouvel (non identique) objet à la propriété. " #. Tag: para -#: basic_mapping.xml:4200 +#: basic_mapping.xml:4270 #, no-c-format msgid "" "Unique identifiers of entities and collections can be of any basic type " @@ -8351,7 +8436,7 @@ msgstr "" "composites sont aussi permis, voir plus bas). " #. Tag: para -#: basic_mapping.xml:4205 +#: basic_mapping.xml:4275 #, no-c-format msgid "" "The basic value types have corresponding Type constants " @@ -8365,13 +8450,13 @@ msgstr "" "string. " #. Tag: title -#: basic_mapping.xml:4212 +#: basic_mapping.xml:4282 #, no-c-format msgid "Custom value types" msgstr "Types de valeur personnalisés" #. Tag: para -#: basic_mapping.xml:4214 +#: basic_mapping.xml:4284 #, no-c-format msgid "" "It is relatively easy for developers to create their own value types. For " @@ -8396,7 +8481,7 @@ msgstr "" "literal>, SURNAME. " #. Tag: para -#: basic_mapping.xml:4225 +#: basic_mapping.xml:4295 #, no-c-format msgid "" "To implement a custom type, implement either org.hibernate." @@ -8412,7 +8497,7 @@ msgstr "" "DoubleStringType pour étudier les possibilités. " #. Tag: programlisting -#: basic_mapping.xml:4232 +#: basic_mapping.xml:4302 #, no-c-format msgid "" "<property name=\"twoStrings\" type=\"org.hibernate.test.DoubleStringType" @@ -8423,7 +8508,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:4234 +#: basic_mapping.xml:4304 #, no-c-format msgid "" "Notice the use of <column> tags to map a property " @@ -8433,7 +8518,7 @@ msgstr "" "mapper une propriété sur des colonnes multiples." #. Tag: para -#: basic_mapping.xml:4237 +#: basic_mapping.xml:4307 #, no-c-format msgid "" "The CompositeUserType, EnhancedUserTypeUserType in the " @@ -8464,7 +8549,7 @@ msgstr "" "vos fichiers de mappage. " #. Tag: programlisting -#: basic_mapping.xml:4250 +#: basic_mapping.xml:4320 #, no-c-format msgid "" "<property name=\"priority\">\n" @@ -8475,7 +8560,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:4252 +#: basic_mapping.xml:4322 #, no-c-format msgid "" "The UserType can now retrieve the value for the parameter " @@ -8487,7 +8572,7 @@ msgstr "" "Properties qui lui est passé. " #. Tag: para -#: basic_mapping.xml:4256 +#: basic_mapping.xml:4326 #, no-c-format msgid "" "If you regularly use a certain UserType, it is useful to " @@ -8503,7 +8588,7 @@ msgstr "" "valeurs de paramètres par défaut si ce type est paramétré. " #. Tag: programlisting -#: basic_mapping.xml:4262 +#: basic_mapping.xml:4332 #, no-c-format msgid "" "<typedef class=\"com.mycompany.usertypes.DefaultValueIntegerType\" name=" @@ -8513,13 +8598,13 @@ msgid "" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:4264 +#: basic_mapping.xml:4334 #, no-c-format msgid "<property name=\"priority\" type=\"default_zero\"/>" msgstr "" #. Tag: para -#: basic_mapping.xml:4266 +#: basic_mapping.xml:4336 #, no-c-format msgid "" "It is also possible to override the parameters supplied in a typedef on a " @@ -8530,7 +8615,7 @@ msgstr "" "propriété. " #. Tag: para -#: basic_mapping.xml:4270 +#: basic_mapping.xml:4340 #, no-c-format msgid "" "Even though Hibernate's rich range of built-in types and support for " @@ -8554,13 +8639,13 @@ msgstr "" "changements futurs dans votre façon de représenter des valeurs monétaires. " #. Tag: title -#: basic_mapping.xml:4283 +#: basic_mapping.xml:4353 #, no-c-format msgid "Mapping a class more than once" msgstr "Mapper une classe plus d'une fois" #. Tag: para -#: basic_mapping.xml:4285 +#: basic_mapping.xml:4355 #, no-c-format msgid "" "It is possible to provide more than one mapping for a particular persistent " @@ -8579,7 +8664,7 @@ msgstr "" "nommées. " #. Tag: programlisting -#: basic_mapping.xml:4293 +#: basic_mapping.xml:4363 #, no-c-format msgid "" "<class name=\"Contract\" table=\"Contracts\"\n" @@ -8602,7 +8687,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:4295 +#: basic_mapping.xml:4365 #, no-c-format msgid "" "Associations are now specified using entity-name instead " @@ -8612,19 +8697,19 @@ msgstr "" "entity-name au lieu de class. " #. Tag: para -#: basic_mapping.xml:4299 basic_mapping.xml:4379 basic_mapping.xml:4414 +#: basic_mapping.xml:4369 basic_mapping.xml:4497 #, no-c-format msgid "This feature is not supported in Annotations" msgstr "" #. Tag: title -#: basic_mapping.xml:4304 +#: basic_mapping.xml:4374 #, no-c-format msgid "SQL quoted identifiers" msgstr "SQL quoted identifiers" #. Tag: para -#: basic_mapping.xml:4306 +#: basic_mapping.xml:4376 #, no-c-format msgid "" "You can force Hibernate to quote an identifier in the generated SQL by " @@ -8640,7 +8725,7 @@ msgstr "" "mais des parenthèses pour SQL Server et des backticks pour MySQL). " #. Tag: programlisting -#: basic_mapping.xml:4312 +#: basic_mapping.xml:4382 #, no-c-format msgid "" "@Entity @Table(name=\"`Line Item`\")\n" @@ -8658,13 +8743,13 @@ msgid "" msgstr "" #. Tag: title -#: basic_mapping.xml:4316 +#: basic_mapping.xml:4386 #, no-c-format msgid "Generated properties" msgstr "Propriétés générées " #. Tag: para -#: basic_mapping.xml:4318 +#: basic_mapping.xml:4388 #, no-c-format msgid "" "Generated properties are properties that have their values generated by the " @@ -8686,7 +8771,7 @@ msgstr "" "les valeurs générées. " #. Tag: para -#: basic_mapping.xml:4327 +#: basic_mapping.xml:4397 #, fuzzy, no-c-format msgid "" "Properties marked as generated must additionally be non-insertable and non-" @@ -8702,7 +8787,7 @@ msgstr "" "property\" /> peuvent être marqués comme générés. " #. Tag: para -#: basic_mapping.xml:4334 +#: basic_mapping.xml:4404 #, no-c-format msgid "" "never (the default): the given property value is not " @@ -8712,7 +8797,7 @@ msgstr "" "propriété n'est pas générée dans la base de données. " #. Tag: para -#: basic_mapping.xml:4337 +#: basic_mapping.xml:4407 #, fuzzy, no-c-format msgid "" "insert: the given property value is generated on insert, " @@ -8731,7 +8816,7 @@ msgstr "" "générées, cette option n'est pas disponible." #. Tag: para -#: basic_mapping.xml:4344 +#: basic_mapping.xml:4414 #, no-c-format msgid "" "always: the property value is generated both on insert " @@ -8741,19 +8826,19 @@ msgstr "" "générée à l'insertion comme aux mise à jour. " #. Tag: para -#: basic_mapping.xml:4347 +#: basic_mapping.xml:4417 #, no-c-format msgid "To mark a property as generated, use @Generated." msgstr "" #. Tag: title -#: basic_mapping.xml:4352 +#: basic_mapping.xml:4422 #, no-c-format -msgid "Column read and write expressions" +msgid "Column transformers: read and write expressions" msgstr "" #. Tag: para -#: basic_mapping.xml:4354 +#: basic_mapping.xml:4424 #, no-c-format msgid "" "Hibernate allows you to customize the SQL it uses to read and write the " @@ -8764,7 +8849,30 @@ msgid "" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:4359 +#: basic_mapping.xml:4430 +#, no-c-format +msgid "" +"@Entity\n" +"class CreditCard {\n" +" @Column(name=\"credit_card_num\")\n" +" @ColumnTransformer(\n" +" read=\"decrypt(credit_card_num)\", \n" +" write=\"encrypt(?)\")\n" +" public String getCreditCardNumber() { return creditCardNumber; }\n" +" public void setCreditCardNumber(String number) { this.creditCardNumber = " +"number; }\n" +" private String creditCardNumber;\n" +"}" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:4432 +#, no-c-format +msgid "or in XML" +msgstr "" + +#. Tag: programlisting +#: basic_mapping.xml:4434 #, no-c-format msgid "" "<property name=\"creditCardNumber\">\n" @@ -8776,7 +8884,44 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:4361 +#: basic_mapping.xml:4437 +#, no-c-format +msgid "" +"You can use the plural form @ColumnTransformers if " +"more than one columns need to define either of these rules." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:4442 +#, no-c-format +msgid "" +"If a property uses more that one column, you must use the " +"forColumn attribute to specify which column, the " +"expressions are targeting." +msgstr "" + +#. Tag: programlisting +#: basic_mapping.xml:4446 +#, no-c-format +msgid "" +"@Entity\n" +"class User {\n" +" @Type(type=\"com.acme.type.CreditCardType\")\n" +" @Columns( {\n" +" @Column(name=\"credit_card_num\"),\n" +" @Column(name=\"exp_date\") } )\n" +" @ColumnTransformer(\n" +" forColumn=\"credit_card_num\", \n" +" read=\"decrypt(credit_card_num)\", \n" +" write=\"encrypt(?)\")\n" +" public CreditCard getCreditCard() { return creditCard; }\n" +" public void setCreditCard(CreditCard card) { this.creditCard = card; }\n" +" private CreditCard creditCard;\n" +"}" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:4448 #, no-c-format msgid "" "Hibernate applies the custom expressions automatically whenever the property " @@ -8785,7 +8930,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:4366 +#: basic_mapping.xml:4453 #, no-c-format msgid "" "The property is backed by one or more columns that are exported as part of " @@ -8793,13 +8938,13 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:4371 +#: basic_mapping.xml:4458 #, no-c-format msgid "The property is read-write, not read-only." msgstr "" #. Tag: para -#: basic_mapping.xml:4375 +#: basic_mapping.xml:4462 #, no-c-format msgid "" "The write expression, if specified, must contain exactly " @@ -8807,13 +8952,13 @@ msgid "" msgstr "" #. Tag: title -#: basic_mapping.xml:4384 +#: basic_mapping.xml:4467 #, no-c-format msgid "Auxiliary database objects" msgstr "Objets auxiliaires de la base de données " #. Tag: para -#: basic_mapping.xml:4386 +#: basic_mapping.xml:4469 #, no-c-format msgid "" "Auxiliary database objects allow for the CREATE and DROP of arbitrary " @@ -8836,7 +8981,7 @@ msgstr "" "objets auxiliaires de base de données :" #. Tag: para -#: basic_mapping.xml:4396 +#: basic_mapping.xml:4479 #, no-c-format msgid "" "The first mode is to explicitly list the CREATE and DROP commands in the " @@ -8846,7 +8991,7 @@ msgstr "" "dans le fichier de mappage : " #. Tag: programlisting -#: basic_mapping.xml:4399 +#: basic_mapping.xml:4482 #, no-c-format msgid "" "<hibernate-mapping>\n" @@ -8859,7 +9004,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:4401 +#: basic_mapping.xml:4484 #, no-c-format msgid "" "The second mode is to supply a custom class that constructs the CREATE and " @@ -8872,7 +9017,7 @@ msgstr "" "AuxiliaryDatabaseObject. " #. Tag: programlisting -#: basic_mapping.xml:4406 +#: basic_mapping.xml:4489 #, no-c-format msgid "" "<hibernate-mapping>\n" @@ -8884,7 +9029,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:4408 +#: basic_mapping.xml:4491 #, no-c-format msgid "" "Additionally, these database objects can be optionally scoped so that they " @@ -8894,7 +9039,7 @@ msgstr "" "selon l'utilisation de dialectes particuliers. " #. Tag: programlisting -#: basic_mapping.xml:4411 +#: basic_mapping.xml:4494 #, no-c-format msgid "" "<hibernate-mapping>\n" @@ -8909,6 +9054,15 @@ msgid "" "</hibernate-mapping>" msgstr "" +#~ msgid "" +#~ "The force attribute is only useful if the table " +#~ "contains rows with \"extra\" discriminator values that are not mapped to " +#~ "a persistent class. This will not usually be the case." +#~ msgstr "" +#~ "L'attribut force n'est utile que si la table contient " +#~ "des lignes avec des valeurs \"extra\" discriminantes qui ne sont pas " +#~ "mappées à une classe persistante. Ce ne sera généralement pas le cas. " + #~ msgid "" #~ "Use of select-before-update will usually decrease " #~ "performance. It is useful to prevent a database update trigger being " diff --git a/documentation/manual/src/main/docbook/fr-FR/content/type.po b/documentation/manual/src/main/docbook/fr-FR/content/type.po index fe12cad79b..cad1362087 100644 --- a/documentation/manual/src/main/docbook/fr-FR/content/type.po +++ b/documentation/manual/src/main/docbook/fr-FR/content/type.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: http://bugs.kde.org\n" -"POT-Creation-Date: 2010-07-21 04:35+0000\n" +"POT-Creation-Date: 2011-01-21 21:18+0000\n" "PO-Revision-Date: 2010-07-21 04:32+0000\n" "Last-Translator: Automatically generated\n" "Language-Team: none\n" @@ -714,25 +714,53 @@ msgstr "" #. Tag: classname #: type.xml:456 #, no-c-format -msgid "java.lang.Class" +msgid "java.net.URL" msgstr "" #. Tag: classname #: type.xml:459 #, no-c-format -msgid "org.hibernate.type.ClassType" +msgid "org.hibernate.type.UrlType" msgstr "" #. Tag: para #: type.xml:461 #, no-c-format msgid "" +"Maps a java.net.URL to a JDBC VARCHAR (using the " +"external form)" +msgstr "" + +#. Tag: para +#: type.xml:464 +#, no-c-format +msgid "" +"Registered under url and java.net.URL " +"in the type registry (see )." +msgstr "" + +#. Tag: classname +#: type.xml:473 +#, no-c-format +msgid "java.lang.Class" +msgstr "" + +#. Tag: classname +#: type.xml:476 +#, no-c-format +msgid "org.hibernate.type.ClassType" +msgstr "" + +#. Tag: para +#: type.xml:478 +#, no-c-format +msgid "" "Maps a java.lang.Class to a JDBC VARCHAR (using the " "Class name)" msgstr "" #. Tag: para -#: type.xml:464 +#: type.xml:481 #, no-c-format msgid "" "Registered under class and java.lang.Classjava.sql.Blob to a JDBC BLOB" msgstr "" #. Tag: para -#: type.xml:481 +#: type.xml:498 #, no-c-format msgid "" "Registered under blob and java.sql.Blobjava.sql.Clob to a JDBC CLOB" msgstr "" #. Tag: para -#: type.xml:498 +#: type.xml:515 #, no-c-format msgid "" "Registered under clob and java.sql.Clobbinary and byte[] in " @@ -818,33 +846,59 @@ msgid "" msgstr "" #. Tag: classname -#: type.xml:522 +#: type.xml:539 #, no-c-format msgid "org.hibernate.type.MaterializedBlobType" msgstr "" #. Tag: para -#: type.xml:524 +#: type.xml:541 #, no-c-format msgid "Maps a primitive byte[] to a JDBC BLOB" msgstr "" #. Tag: para -#: type.xml:527 +#: type.xml:544 #, no-c-format msgid "" "Registered under materialized_blob in the type registry " "(see )." msgstr "" +#. Tag: classname +#: type.xml:551 +#, no-c-format +msgid "org.hibernate.type.ImageType" +msgstr "" + #. Tag: para -#: type.xml:541 +#: type.xml:553 +#, no-c-format +msgid "Maps a primitive byte[] to a JDBC LONGVARBINARY" +msgstr "" + +#. Tag: para +#: type.xml:556 +#, no-c-format +msgid "" +"Registered under image in the type registry (see )." +msgstr "" + +#. Tag: title +#: type.xml:565 +#, no-c-format +msgid "Byte[]" +msgstr "" + +#. Tag: para +#: type.xml:570 #, no-c-format msgid "Maps a java.lang.Byte[] to a JDBC VARBINARY" msgstr "" #. Tag: para -#: type.xml:544 +#: type.xml:573 #, no-c-format msgid "" "Registered under wrapper-binary, Byte[]characters and char[] " "in the type registry (see )." msgstr "" +#. Tag: title +#: type.xml:599 +#, no-c-format +msgid "Character[]" +msgstr "" + #. Tag: classname -#: type.xml:573 +#: type.xml:602 #, no-c-format msgid "org.hibernate.type.CharacterArrayType" msgstr "" #. Tag: para -#: type.xml:575 +#: type.xml:604 #, no-c-format msgid "Maps a java.lang.Character[] to a JDBC VARCHAR" msgstr "" #. Tag: para -#: type.xml:578 +#: type.xml:607 #, no-c-format msgid "" "Registered under wrapper-characters, Character[]" @@ -900,25 +960,25 @@ msgid "" msgstr "" #. Tag: classname -#: type.xml:587 +#: type.xml:616 #, no-c-format msgid "java.util.UUID" msgstr "" #. Tag: classname -#: type.xml:590 +#: type.xml:619 #, no-c-format msgid "org.hibernate.type.UUIDBinaryType" msgstr "" #. Tag: para -#: type.xml:592 +#: type.xml:621 #, no-c-format msgid "Maps a java.util.UUID to a JDBC BINARY" msgstr "" #. Tag: para -#: type.xml:595 +#: type.xml:624 #, no-c-format msgid "" "Registered under uuid-binary and java.util.UUIDuuid-char in the type registry (see " @@ -948,13 +1008,13 @@ msgid "" msgstr "" #. Tag: classname -#: type.xml:614 +#: type.xml:643 #, no-c-format msgid "org.hibernate.type.PostgresUUIDType" msgstr "" #. Tag: para -#: type.xml:616 +#: type.xml:645 #, no-c-format msgid "" "Maps a java.util.UUID to the PostgreSQL UUID data type (through " @@ -963,7 +1023,7 @@ msgid "" msgstr "" #. Tag: para -#: type.xml:620 +#: type.xml:649 #, no-c-format msgid "" "Registered under pg-uuid in the type registry (see ." msgstr "" #. Tag: title -#: type.xml:686 +#: type.xml:715 #, no-c-format msgid "Entity types" msgstr "" #. Tag: para -#: type.xml:687 +#: type.xml:716 #, no-c-format msgid "" "The definition of entities is covered in detail in to that Product sku. " @@ -1118,19 +1178,19 @@ msgid "" msgstr "" #. Tag: para -#: type.xml:722 +#: type.xml:751 #, no-c-format msgid "TBC..." msgstr "" #. Tag: title -#: type.xml:728 +#: type.xml:757 #, no-c-format msgid "Custom types" msgstr "" #. Tag: para -#: type.xml:729 +#: type.xml:758 #, no-c-format msgid "" "Hibernate makes it relatively easy for developers to create their own " @@ -1144,7 +1204,7 @@ msgid "" msgstr "" #. Tag: para -#: type.xml:737 +#: type.xml:766 #, no-c-format msgid "" "There are 3 approaches to developing a custom Hibernate type. As a means of " @@ -1155,14 +1215,14 @@ msgid "" msgstr "" #. Tag: title -#: type.xml:744 +#: type.xml:773 #, no-c-format msgid "" "Custom types using org.hibernate.type.Type" msgstr "" #. Tag: para -#: type.xml:745 +#: type.xml:774 #, no-c-format msgid "" "The first approach is to directly implement the org.hibernate." @@ -1178,13 +1238,13 @@ msgid "" msgstr "" #. Tag: title -#: type.xml:756 +#: type.xml:785 #, no-c-format msgid "Defining and registering the custom Type" msgstr "" #. Tag: programlisting -#: type.xml:757 +#: type.xml:786 #, no-c-format msgid "" "before " @@ -1257,7 +1317,7 @@ msgid "" msgstr "" #. Tag: title -#: type.xml:767 +#: type.xml:796 #, no-c-format msgid "" "Custom types using org.hibernate.usertype.UserTypeorg.hibernate.usertype.UserType and " @@ -1275,7 +1335,7 @@ msgid "" msgstr "" #. Tag: para -#: type.xml:776 +#: type.xml:805 #, no-c-format msgid "" "The second approach is the use the org.hibernate.usertype." @@ -1287,13 +1347,13 @@ msgid "" msgstr "" #. Tag: title -#: type.xml:783 +#: type.xml:812 #, no-c-format msgid "Defining the custom UserType" msgstr "" #. Tag: programlisting -#: type.xml:784 +#: type.xml:813 #, no-c-format msgid "" "org.hibernate.type." @@ -1351,7 +1411,7 @@ msgid "" msgstr "" #. Tag: title -#: type.xml:796 +#: type.xml:825 #, no-c-format msgid "" "Custom types using org.hibernate.usertype.CompositeUserTypeorg.hibernate." @@ -1374,13 +1434,13 @@ msgid "" msgstr "" #. Tag: title -#: type.xml:808 +#: type.xml:837 #, no-c-format msgid "Defining the custom CompositeUserType" msgstr "" #. Tag: programlisting -#: type.xml:809 +#: type.xml:838 #, no-c-format msgid "" "StringType" msgstr "" #. Tag: programlisting -#: type.xml:831 +#: type.xml:860 #, no-c-format msgid "" "registerTypeOverride is a " @@ -1525,13 +1585,13 @@ msgid "" msgstr "" #. Tag: title -#: type.xml:839 +#: type.xml:868 #, no-c-format msgid "Snippet from BasicType.java" msgstr "" #. Tag: programlisting -#: type.xml:840 +#: type.xml:869 #, no-c-format msgid "" "/**\n" @@ -1544,7 +1604,7 @@ msgid "" msgstr "" #. Tag: para -#: type.xml:842 +#: type.xml:871 #, no-c-format msgid "" "One approach is to use inheritance (SuperDuperStringType\n" "Language-Team: \n" @@ -182,8 +182,7 @@ msgid "" "<?xml version=\"1.0\"?>\n" "<!DOCTYPE hibernate-mapping PUBLIC\n" " \"-//Hibernate/Hibernate Mapping DTD 3.0//EN\"\n" -" \"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd" -"\">\n" +" \"http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd\">\n" "\n" "<hibernate-mapping package=\"eg\">\n" "\n" @@ -826,7 +825,7 @@ msgstr "" "定します。" #. Tag: para -#: basic_mapping.xml:349 basic_mapping.xml:2912 +#: basic_mapping.xml:349 basic_mapping.xml:2948 #, no-c-format msgid "" "schema (optional): overrides the schema name specified by " @@ -836,7 +835,7 @@ msgstr "" "mapping> 要素で指定したスキーマ名をオーバーライドします。" #. Tag: para -#: basic_mapping.xml:355 basic_mapping.xml:2918 +#: basic_mapping.xml:355 basic_mapping.xml:2954 #, no-c-format msgid "" "catalog (optional): overrides the catalog name specified " @@ -1175,7 +1174,7 @@ msgid "" msgstr "name(オプション):識別子プロパティの名前。" #. Tag: para -#: basic_mapping.xml:518 basic_mapping.xml:2141 +#: basic_mapping.xml:518 basic_mapping.xml:2152 #, no-c-format msgid "" "type (optional): a name that indicates the Hibernate type." @@ -3514,8 +3513,8 @@ msgstr "timestamp(オプション)" #, fuzzy, no-c-format msgid "" "Alternatively, you can use a timestamp. Timestamps are a less safe " -"implementation of optimistic locking. However, sometimes the application " -"might use the timestamps in other ways." +"implementation of optimistic locking. However, sometimes an application " +"might use the timestamps in other ways as well." msgstr "" "オプションの <timestamp> 要素は、テーブルがタイムス" "タンプデータを含むことを示します。これはバージョン付けの代わりの方法として用" @@ -3547,13 +3546,27 @@ msgstr "" #: basic_mapping.xml:1598 #, no-c-format msgid "" -"Like version numbers, the timestamp can be generated by the database instead " -"of Hibernate. To do that, use @org.hibernate.annotations.Generated" -"(GenerationTime.ALWAYS)." +"When using timestamp versioning you can tell Hibernate where to retrieve the " +"timestamp value from - database or JVM - by optionally adding the " +"@org.hibernate.annotations.Source annotation to the " +"property. Possible values for the value attribute of the annotation are " +"org.hibernate.annotations.SourceType.VM and " +"org.hibernate.annotations.SourceType.DB. The default " +"is SourceType.DB which is also used in case there is " +"no @Source annotation at all." msgstr "" #. Tag: para -#: basic_mapping.xml:1602 +#: basic_mapping.xml:1609 +#, no-c-format +msgid "" +"Like in the case of version numbers, the timestamp can also be generated by " +"the database instead of Hibernate. To do that, use @org.hibernate." +"annotations.Generated(GenerationTime.ALWAYS)." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1613 #, fuzzy, no-c-format msgid "In hbm.xml, use the <timestamp> element:" msgstr "" @@ -3561,7 +3574,7 @@ msgstr "" "あった場合:" #. Tag: programlisting -#: basic_mapping.xml:1620 +#: basic_mapping.xml:1631 #, fuzzy, no-c-format msgid "" "<timestamp\n" @@ -3585,7 +3598,7 @@ msgstr "" "/>" #. Tag: para -#: basic_mapping.xml:1624 +#: basic_mapping.xml:1635 #, no-c-format msgid "" "column (optional - defaults to the property name): the " @@ -3595,7 +3608,7 @@ msgstr "" "タンプを保持するカラムの名前。" #. Tag: para -#: basic_mapping.xml:1630 +#: basic_mapping.xml:1641 #, no-c-format msgid "" "name: the name of a JavaBeans style property of Java type " @@ -3607,8 +3620,8 @@ msgstr "" "前。" #. Tag: para -#: basic_mapping.xml:1636 basic_mapping.xml:2163 basic_mapping.xml:2380 -#: basic_mapping.xml:3226 basic_mapping.xml:3420 basic_mapping.xml:3593 +#: basic_mapping.xml:1647 basic_mapping.xml:2174 basic_mapping.xml:2391 +#: basic_mapping.xml:3262 basic_mapping.xml:3456 basic_mapping.xml:3629 #, no-c-format msgid "" "access (optional - defaults to property ): Hibernate がプロパティの値にアクセスするために使用すべき戦略。" #. Tag: para -#: basic_mapping.xml:1642 +#: basic_mapping.xml:1653 #, no-c-format msgid "" "unsaved-value (optional - defaults to null と指定すると、識別子プロパティの値が使われます。)" #. Tag: para -#: basic_mapping.xml:1652 +#: basic_mapping.xml:1663 #, no-c-format msgid "" "source (optional - defaults to vm): " @@ -3657,7 +3670,7 @@ msgstr "" "もあります (例えば Oracle 8 )。" #. Tag: para -#: basic_mapping.xml:1665 +#: basic_mapping.xml:1676 #, fuzzy, no-c-format msgid "" "generated (optional - defaults to never<Timestamp> is equivalent to <version " @@ -3691,13 +3704,13 @@ msgstr "" " と等価であることに注意してください。" #. Tag: title -#: basic_mapping.xml:1686 +#: basic_mapping.xml:1697 #, no-c-format msgid "Property" msgstr "property" #. Tag: para -#: basic_mapping.xml:1688 +#: basic_mapping.xml:1699 #, no-c-format msgid "" "You need to decide which property needs to be made persistent in a given " @@ -3706,13 +3719,13 @@ msgid "" msgstr "" #. Tag: title -#: basic_mapping.xml:1693 +#: basic_mapping.xml:1704 #, no-c-format msgid "Property mapping with annotations" msgstr "" #. Tag: para -#: basic_mapping.xml:1695 +#: basic_mapping.xml:1706 #, no-c-format msgid "" "In the annotations world, every non static non transient property (field or " @@ -3723,7 +3736,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:1702 +#: basic_mapping.xml:1713 #, no-c-format msgid "" "The @Basic annotation allows you to declare the fetching " @@ -3739,13 +3752,13 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:1715 +#: basic_mapping.xml:1726 #, no-c-format msgid "Let's look at a few examples:" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:1717 +#: basic_mapping.xml:1728 #, no-c-format msgid "" "public transient int counter; //transient property\n" @@ -3771,7 +3784,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:1719 +#: basic_mapping.xml:1730 #, no-c-format msgid "" "counter, a transient field, and lengthInMeter@Lob indicates that the property should be persisted in a " @@ -3826,7 +3839,7 @@ msgid "" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:1759 +#: basic_mapping.xml:1770 #, no-c-format msgid "" "@Lob\n" @@ -3841,7 +3854,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:1761 +#: basic_mapping.xml:1772 #, no-c-format msgid "" "If the property type implements java.io.Serializable " @@ -3851,13 +3864,13 @@ msgid "" msgstr "" #. Tag: title -#: basic_mapping.xml:1768 +#: basic_mapping.xml:1779 #, no-c-format msgid "Type" msgstr "" #. Tag: para -#: basic_mapping.xml:1770 +#: basic_mapping.xml:1781 #, no-c-format msgid "" "You can also manually specify a type using the @org.hibernate." @@ -3866,7 +3879,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:1777 basic_mapping.xml:2209 +#: basic_mapping.xml:1788 basic_mapping.xml:2220 #, no-c-format msgid "" "The name of a Hibernate basic type: integer, string, character, " @@ -3876,7 +3889,7 @@ msgstr "" "timestamp, float, binary, serializable, object, blob )。" #. Tag: para -#: basic_mapping.xml:1783 basic_mapping.xml:2215 +#: basic_mapping.xml:1794 basic_mapping.xml:2226 #, no-c-format msgid "" "The name of a Java class with a default basic type: int, float, " @@ -3887,13 +3900,13 @@ msgstr "" "String, java.util.Date, java.lang.Integer, java.sql.Clob )。" #. Tag: para -#: basic_mapping.xml:1789 basic_mapping.xml:2221 +#: basic_mapping.xml:1800 basic_mapping.xml:2232 #, no-c-format msgid "The name of a serializable Java class." msgstr "シリアライズ可能な Java クラスの名前。" #. Tag: para -#: basic_mapping.xml:1793 basic_mapping.xml:2225 +#: basic_mapping.xml:1804 basic_mapping.xml:2236 #, no-c-format msgid "" "The class name of a custom type: com.illflow.type.MyCustomType )。" #. Tag: para -#: basic_mapping.xml:1798 +#: basic_mapping.xml:1809 #, fuzzy, no-c-format msgid "" "If you do not specify a type, Hibernate will use reflection upon the named " @@ -3920,7 +3933,7 @@ msgstr "" "を区別するため、またはカスタム型を指定するためなどです。)" #. Tag: para -#: basic_mapping.xml:1803 +#: basic_mapping.xml:1814 #, no-c-format msgid "" "@org.hibernate.annotations.TypeDef and @org." @@ -3939,7 +3952,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:1819 +#: basic_mapping.xml:1830 #, no-c-format msgid "" "Package level annotations are placed in a file named package-info." @@ -3948,7 +3961,7 @@ msgid "" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:1824 +#: basic_mapping.xml:1835 #, no-c-format msgid "" "@TypeDef(\n" @@ -3968,7 +3981,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:1826 +#: basic_mapping.xml:1837 #, no-c-format msgid "" "The following example shows the usage of the parameters " @@ -3976,7 +3989,7 @@ msgid "" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:1830 +#: basic_mapping.xml:1841 #, no-c-format msgid "" "//in org/hibernate/test/annotations/entity/package-info.java\n" @@ -4002,7 +4015,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:1832 +#: basic_mapping.xml:1843 #, no-c-format msgid "" "When using composite user type, you will have to express column definitions. " @@ -4010,7 +4023,7 @@ msgid "" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:1836 +#: basic_mapping.xml:1847 #, no-c-format msgid "" "@Type(type=\"org.hibernate.test.annotations.entity.MonetaryAmountUserType" @@ -4032,13 +4045,13 @@ msgid "" msgstr "" #. Tag: title -#: basic_mapping.xml:1840 +#: basic_mapping.xml:1851 #, no-c-format msgid "Access type" msgstr "" #. Tag: para -#: basic_mapping.xml:1842 +#: basic_mapping.xml:1853 #, no-c-format msgid "" "By default the access type of a class hierarchy is defined by the position " @@ -4051,7 +4064,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:1850 +#: basic_mapping.xml:1861 #, no-c-format msgid "" "The placement of annotations within a class hierarchy has to be consistent " @@ -4061,31 +4074,31 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:1857 +#: basic_mapping.xml:1868 #, no-c-format msgid "However in some situations, you need to:" msgstr "" #. Tag: para -#: basic_mapping.xml:1861 +#: basic_mapping.xml:1872 #, no-c-format msgid "force the access type of the entity hierarchy" msgstr "" #. Tag: para -#: basic_mapping.xml:1865 +#: basic_mapping.xml:1876 #, no-c-format msgid "override the access type of a specific entity in the class hierarchy" msgstr "" #. Tag: para -#: basic_mapping.xml:1870 +#: basic_mapping.xml:1881 #, no-c-format msgid "override the access type of an embeddable type" msgstr "" #. Tag: para -#: basic_mapping.xml:1874 +#: basic_mapping.xml:1885 #, no-c-format msgid "" "The best use case is an embeddable class used by several entities that might " @@ -4094,7 +4107,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:1879 +#: basic_mapping.xml:1890 #, no-c-format msgid "" "To force the access type on a given class, use the @AccessFIELD " @@ -4175,13 +4188,13 @@ msgid "" msgstr "" #. Tag: title -#: basic_mapping.xml:1896 +#: basic_mapping.xml:1907 #, no-c-format msgid "@org.hibernate.annotations.AccessType" msgstr "" #. Tag: para -#: basic_mapping.xml:1898 +#: basic_mapping.xml:1909 #, no-c-format msgid "" "The annotation @org.hibernate.annotations.AccessType " @@ -4190,13 +4203,13 @@ msgid "" msgstr "" #. Tag: title -#: basic_mapping.xml:1907 +#: basic_mapping.xml:1918 #, no-c-format msgid "Optimistic lock" msgstr "" #. Tag: para -#: basic_mapping.xml:1909 +#: basic_mapping.xml:1920 #, no-c-format msgid "" "It is sometimes useful to avoid increasing the version number even if a " @@ -4206,7 +4219,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:1914 +#: basic_mapping.xml:1925 #, no-c-format msgid "" "More formally, specifies that updates to this property do not require " @@ -4214,13 +4227,13 @@ msgid "" msgstr "" #. Tag: title -#: basic_mapping.xml:1919 +#: basic_mapping.xml:1930 #, no-c-format msgid "Declaring column attributes" msgstr "" #. Tag: para -#: basic_mapping.xml:1921 +#: basic_mapping.xml:1932 #, no-c-format msgid "" "The column(s) used for a property mapping can be defined using the " @@ -4230,37 +4243,37 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:1929 +#: basic_mapping.xml:1940 #, no-c-format msgid "not annotated at all" msgstr "" #. Tag: para -#: basic_mapping.xml:1933 +#: basic_mapping.xml:1944 #, fuzzy, no-c-format msgid "annotated with @Basic" msgstr "sequence-identity" #. Tag: para -#: basic_mapping.xml:1937 +#: basic_mapping.xml:1948 #, fuzzy, no-c-format msgid "annotated with @Version" msgstr "sequence-identity" #. Tag: para -#: basic_mapping.xml:1941 +#: basic_mapping.xml:1952 #, fuzzy, no-c-format msgid "annotated with @Lob" msgstr "sequence-identity" #. Tag: para -#: basic_mapping.xml:1945 +#: basic_mapping.xml:1956 #, fuzzy, no-c-format msgid "annotated with @Temporal" msgstr "sequence-identity" #. Tag: programlisting -#: basic_mapping.xml:1949 +#: basic_mapping.xml:1960 #, no-c-format msgid "" "@Entity\n" @@ -4272,7 +4285,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:1951 +#: basic_mapping.xml:1962 #, no-c-format msgid "" "The name property is mapped to the flight_namename (optional): the column name (default to the property " @@ -4314,7 +4327,7 @@ msgid "" msgstr "name(オプション):識別子プロパティの名前。" #. Tag: para -#: basic_mapping.xml:1992 +#: basic_mapping.xml:2003 #, fuzzy, no-c-format msgid "" "unique (optional): set a unique constraint on this column " @@ -4325,7 +4338,7 @@ msgstr "" "ともできます。" #. Tag: para -#: basic_mapping.xml:1997 +#: basic_mapping.xml:2008 #, fuzzy, no-c-format msgid "" "nullable (optional): set the column as nullable (default " @@ -4333,7 +4346,7 @@ msgid "" msgstr "name(オプション):識別子プロパティの名前。" #. Tag: para -#: basic_mapping.xml:2002 +#: basic_mapping.xml:2013 #, fuzzy, no-c-format msgid "" "insertable (optional): whether or not the column will be " @@ -4341,7 +4354,7 @@ msgid "" msgstr "name(オプション):識別子プロパティの名前。" #. Tag: para -#: basic_mapping.xml:2008 +#: basic_mapping.xml:2019 #, fuzzy, no-c-format msgid "" "updatable (optional): whether or not the column will be " @@ -4350,7 +4363,7 @@ msgstr "" "catalog (オプション):データベースカタログの名前。" #. Tag: para -#: basic_mapping.xml:2014 +#: basic_mapping.xml:2025 #, no-c-format msgid "" "columnDefinition (optional): override the sql DDL " @@ -4358,7 +4371,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2020 +#: basic_mapping.xml:2031 #, fuzzy, no-c-format msgid "" "table (optional): define the targeted table (default " @@ -4367,7 +4380,7 @@ msgstr "" "catalog (オプション):データベースカタログの名前。" #. Tag: para -#: basic_mapping.xml:2025 +#: basic_mapping.xml:2036 #, no-c-format msgid "" "length (optional): column length " @@ -4375,7 +4388,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2030 +#: basic_mapping.xml:2041 #, no-c-format msgid "" "precision (optional): column decimal " @@ -4383,7 +4396,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2035 +#: basic_mapping.xml:2046 #, no-c-format msgid "" "scale (optional): column decimal scale " @@ -4391,13 +4404,13 @@ msgid "" msgstr "" #. Tag: title -#: basic_mapping.xml:2043 +#: basic_mapping.xml:2054 #, no-c-format msgid "Formula" msgstr "" #. Tag: para -#: basic_mapping.xml:2045 +#: basic_mapping.xml:2056 #, no-c-format msgid "" "Sometimes, you want the Database to do some computation for you rather than " @@ -4408,7 +4421,7 @@ msgid "" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:2051 +#: basic_mapping.xml:2062 #, no-c-format msgid "" "@Formula(\"obj_length * obj_height * obj_width\")\n" @@ -4416,32 +4429,32 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2053 +#: basic_mapping.xml:2064 #, no-c-format msgid "" "The SQL fragment can be as complex as you want and even include subselects." msgstr "" #. Tag: title -#: basic_mapping.xml:2058 +#: basic_mapping.xml:2069 #, no-c-format msgid "Non-annotated property defaults" msgstr "" #. Tag: para -#: basic_mapping.xml:2060 +#: basic_mapping.xml:2071 #, no-c-format msgid "If a property is not annotated, the following rules apply:" msgstr "" #. Tag: para -#: basic_mapping.xml:2063 +#: basic_mapping.xml:2074 #, no-c-format msgid "If the property is of a single type, it is mapped as @Basic" msgstr "" #. Tag: para -#: basic_mapping.xml:2068 +#: basic_mapping.xml:2079 #, no-c-format msgid "" "Otherwise, if the type of the property is annotated as @Embeddable, it is " @@ -4449,7 +4462,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2073 +#: basic_mapping.xml:2084 #, no-c-format msgid "" "Otherwise, if the type of the property is Serializablejava.sql.Clob<property> element declares a persistent " @@ -4484,7 +4497,7 @@ msgstr "" "ルのプロパティを定義します。" #. Tag: programlisting -#: basic_mapping.xml:2125 +#: basic_mapping.xml:2136 #, fuzzy, no-c-format msgid "" "<property\n" @@ -4530,7 +4543,7 @@ msgstr "" "/>" #. Tag: para -#: basic_mapping.xml:2129 +#: basic_mapping.xml:2140 #, no-c-format msgid "" "name: the name of the property, with an initial lowercase " @@ -4538,7 +4551,7 @@ msgid "" msgstr "name: 小文字で始まるプロパティ名。" #. Tag: para -#: basic_mapping.xml:2134 +#: basic_mapping.xml:2145 #, no-c-format msgid "" "column (optional - defaults to the property name): the " @@ -4550,7 +4563,7 @@ msgstr "" "column> 要素でも指定できます。" #. Tag: para -#: basic_mapping.xml:2146 +#: basic_mapping.xml:2157 #, no-c-format msgid "" "update, insert (optional - defaults to trueformula (optional): an SQL expression that defines the " @@ -4580,7 +4593,7 @@ msgstr "" "ングがありません。" #. Tag: para -#: basic_mapping.xml:2169 +#: basic_mapping.xml:2180 #, no-c-format msgid "" "lazy (optional - defaults to false): " @@ -4592,7 +4605,7 @@ msgstr "" "取得するよう指定します。 (バイトコード実装を作成する時間が必要になります)。" #. Tag: para -#: basic_mapping.xml:2176 +#: basic_mapping.xml:2187 #, no-c-format msgid "" "unique (optional): enables the DDL generation of a unique " @@ -4604,7 +4617,7 @@ msgstr "" "ともできます。" #. Tag: para -#: basic_mapping.xml:2183 +#: basic_mapping.xml:2194 #, fuzzy, no-c-format msgid "" "not-null (optional): enables the DDL generation of a " @@ -4614,7 +4627,7 @@ msgstr "" "成を可能にします。" #. Tag: para -#: basic_mapping.xml:2188 basic_mapping.xml:3246 +#: basic_mapping.xml:2199 basic_mapping.xml:3282 #, no-c-format msgid "" "optimistic-lock (optional - defaults to truegenerated (optional - defaults to never 生成プロパティを参照してください。" #. Tag: para -#: basic_mapping.xml:2205 +#: basic_mapping.xml:2216 #, no-c-format msgid "typename could be:" msgstr "typename には以下の値が可能です:" #. Tag: para -#: basic_mapping.xml:2230 +#: basic_mapping.xml:2241 #, no-c-format msgid "" "If you do not specify a type, Hibernate will use reflection upon the named " @@ -4667,7 +4680,7 @@ msgstr "" "を区別するため、またはカスタム型を指定するためなどです。)" #. Tag: para -#: basic_mapping.xml:2239 +#: basic_mapping.xml:2250 #, no-c-format msgid "" "The access attribute allows you to control how Hibernate " @@ -4687,7 +4700,7 @@ msgstr "" "クセスに独自の戦略を指定することができます。" #. Tag: para -#: basic_mapping.xml:2248 +#: basic_mapping.xml:2259 #, no-c-format msgid "" "A powerful feature is derived properties. These properties are by definition " @@ -4701,7 +4714,7 @@ msgstr "" "literal> 句のサブクエリに変換されます:" #. Tag: programlisting -#: basic_mapping.xml:2254 +#: basic_mapping.xml:2265 #, fuzzy, no-c-format msgid "" "<property name=\"totalPrice\"\n" @@ -4719,7 +4732,7 @@ msgstr "" " AND li.orderNumber = orderNumber )\"/>" #. Tag: para -#: basic_mapping.xml:2256 +#: basic_mapping.xml:2267 #, no-c-format msgid "" "You can reference the entity table by not declaring an alias on a particular " @@ -4733,13 +4746,13 @@ msgstr "" "literal> マッピング要素を使えることにも注意してください。" #. Tag: title -#: basic_mapping.xml:2265 +#: basic_mapping.xml:2276 #, no-c-format msgid "Embedded objects (aka components)" msgstr "" #. Tag: para -#: basic_mapping.xml:2267 +#: basic_mapping.xml:2278 #, fuzzy, no-c-format msgid "" "Embeddable objects (or components) are objects whose properties are mapped " @@ -4752,7 +4765,7 @@ msgstr "" "てください。" #. Tag: para -#: basic_mapping.xml:2272 +#: basic_mapping.xml:2283 #, no-c-format msgid "" "It is possible to declare an embedded component inside an entity and even " @@ -4764,7 +4777,7 @@ msgid "" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:2280 +#: basic_mapping.xml:2291 #, no-c-format msgid "" "@Entity\n" @@ -4786,7 +4799,7 @@ msgid "" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:2282 +#: basic_mapping.xml:2293 #, no-c-format msgid "" "@Embeddable\n" @@ -4797,7 +4810,7 @@ msgid "" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:2284 +#: basic_mapping.xml:2295 #, no-c-format msgid "" "@Embeddable\n" @@ -4816,7 +4829,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2286 +#: basic_mapping.xml:2297 #, no-c-format msgid "" "An embeddable object inherits the access type of its owning entity (note " @@ -4824,7 +4837,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2290 +#: basic_mapping.xml:2301 #, no-c-format msgid "" "The Person entity has two component properties, " @@ -4842,7 +4855,7 @@ msgid "" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:2305 +#: basic_mapping.xml:2316 #, no-c-format msgid "" "@Embedded\n" @@ -4859,7 +4872,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2307 +#: basic_mapping.xml:2318 #, no-c-format msgid "" "Hibernate Annotations supports something that is not explicitly supported by " @@ -4870,7 +4883,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2313 +#: basic_mapping.xml:2324 #, no-c-format msgid "" "You can also use association annotations in an embeddable object (ie " @@ -4881,7 +4894,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2319 +#: basic_mapping.xml:2330 #, no-c-format msgid "" "If you want to have the same embeddable object type twice in the same " @@ -4895,7 +4908,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2329 +#: basic_mapping.xml:2340 #, no-c-format msgid "" "If a property of the embedded object points back to the owning entity, " @@ -4904,13 +4917,13 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2334 +#: basic_mapping.xml:2345 #, no-c-format msgid "In XML, use the <component> element." msgstr "" #. Tag: programlisting -#: basic_mapping.xml:2356 +#: basic_mapping.xml:2367 #, fuzzy, no-c-format msgid "" "<component\n" @@ -4948,13 +4961,13 @@ msgstr "" "</component>" #. Tag: para -#: basic_mapping.xml:2360 basic_mapping.xml:3181 basic_mapping.xml:3381 +#: basic_mapping.xml:2371 basic_mapping.xml:3217 basic_mapping.xml:3417 #, no-c-format msgid "name: the name of the property." msgstr "name:プロパティ名。" #. Tag: para -#: basic_mapping.xml:2364 +#: basic_mapping.xml:2375 #, no-c-format msgid "" "class (optional - defaults to the property type " @@ -4964,7 +4977,7 @@ msgstr "" "されるプロパティの型): コンポーネント(子)クラスの名前。" #. Tag: para -#: basic_mapping.xml:2370 basic_mapping.xml:3641 +#: basic_mapping.xml:2381 basic_mapping.xml:3677 #, no-c-format msgid "" "insert: do the mapped columns appear in SQL " @@ -4974,7 +4987,7 @@ msgstr "" "literal> に現れるようにするかどうかを指定します。" #. Tag: para -#: basic_mapping.xml:2375 basic_mapping.xml:3646 +#: basic_mapping.xml:2386 basic_mapping.xml:3682 #, no-c-format msgid "" "update: do the mapped columns appear in SQL " @@ -4984,7 +4997,7 @@ msgstr "" "literal> に現れるようにするかどうかを指定します。" #. Tag: para -#: basic_mapping.xml:2386 +#: basic_mapping.xml:2397 #, no-c-format msgid "" "lazy (optional - defaults to false): " @@ -4997,7 +5010,7 @@ msgstr "" "ます)" #. Tag: para -#: basic_mapping.xml:2393 +#: basic_mapping.xml:2404 #, no-c-format msgid "" "optimistic-lock (optional - defaults to trueunique (optional - defaults to false): " @@ -5023,7 +5036,7 @@ msgstr "" "在するかを指定します。" #. Tag: para -#: basic_mapping.xml:2408 +#: basic_mapping.xml:2419 #, no-c-format msgid "" "The child <property> tags map properties of the " @@ -5033,7 +5046,7 @@ msgstr "" "ブルカラムにマッピングします。" #. Tag: para -#: basic_mapping.xml:2411 +#: basic_mapping.xml:2422 #, no-c-format msgid "" "The <component> element allows a <" @@ -5045,7 +5058,7 @@ msgstr "" "literal> サブ要素を許可します。" #. Tag: para -#: basic_mapping.xml:2415 +#: basic_mapping.xml:2426 #, fuzzy, no-c-format msgid "" "The <dynamic-component> element allows a " @@ -5059,13 +5072,13 @@ msgstr "" "い。" #. Tag: title -#: basic_mapping.xml:2423 +#: basic_mapping.xml:2434 #, no-c-format msgid "Inheritance strategy" msgstr "" #. Tag: para -#: basic_mapping.xml:2425 +#: basic_mapping.xml:2436 #, no-c-format msgid "" "Java is a language supporting polymorphism: a class can inherit from " @@ -5073,7 +5086,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2431 +#: basic_mapping.xml:2442 #, no-c-format msgid "" "Single table per class hierarchy strategy: a single table hosts all the " @@ -5081,7 +5094,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2436 +#: basic_mapping.xml:2447 #, no-c-format msgid "" "Joined subclass strategy: one table per class and subclass is present and " @@ -5091,7 +5104,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2443 +#: basic_mapping.xml:2454 #, no-c-format msgid "" "Table per class strategy: one table per concrete class and subclass is " @@ -5101,13 +5114,13 @@ msgid "" msgstr "" #. Tag: title -#: basic_mapping.xml:2451 +#: basic_mapping.xml:2462 #, no-c-format msgid "Single table per class hierarchy strategy" msgstr "" #. Tag: para -#: basic_mapping.xml:2453 +#: basic_mapping.xml:2464 #, no-c-format msgid "" "With this approach the properties of all the subclasses in a given mapped " @@ -5115,7 +5128,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2456 +#: basic_mapping.xml:2467 #, fuzzy, no-c-format msgid "" "Each subclass declares its own persistent properties and subclasses. Version " @@ -5130,7 +5143,7 @@ msgstr "" "定されると、完全修飾された Java クラス名が使われます。" #. Tag: programlisting -#: basic_mapping.xml:2462 basic_mapping.xml:2540 +#: basic_mapping.xml:2473 basic_mapping.xml:2581 #, no-c-format msgid "" "@Entity\n" @@ -5148,7 +5161,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2464 +#: basic_mapping.xml:2475 #, fuzzy, no-c-format msgid "" "In hbm.xml, for the table-per-class-hierarchy mapping strategy, the " @@ -5159,7 +5172,7 @@ msgstr "" "subclass> 定義が使われます。" #. Tag: programlisting -#: basic_mapping.xml:2479 +#: basic_mapping.xml:2490 #, fuzzy, no-c-format msgid "" "<subclass\n" @@ -5193,14 +5206,14 @@ msgstr "" "</subclass>" #. Tag: para -#: basic_mapping.xml:2483 basic_mapping.xml:2656 basic_mapping.xml:2720 +#: basic_mapping.xml:2494 basic_mapping.xml:2692 basic_mapping.xml:2756 #, no-c-format msgid "" "name: the fully qualified class name of the subclass." msgstr "name:サブクラスの完全修飾されたクラス名。" #. Tag: para -#: basic_mapping.xml:2488 +#: basic_mapping.xml:2499 #, no-c-format msgid "" "discriminator-value (optional - defaults to the class " @@ -5210,7 +5223,7 @@ msgstr "" "名): 個々のサブクラスを区別するための値。" #. Tag: para -#: basic_mapping.xml:2494 +#: basic_mapping.xml:2505 #, no-c-format msgid "" "proxy (optional): specifies a class or interface used for " @@ -5220,7 +5233,7 @@ msgstr "" "ンターフェースを指定します。" #. Tag: para -#: basic_mapping.xml:2499 +#: basic_mapping.xml:2510 #, no-c-format msgid "" "lazy (optional - defaults to true): " @@ -5230,7 +5243,7 @@ msgstr "" "lazy=\"false\" とすると、遅延フェッチが使用できません。" #. Tag: para -#: basic_mapping.xml:2507 basic_mapping.xml:2685 basic_mapping.xml:2746 +#: basic_mapping.xml:2518 basic_mapping.xml:2721 basic_mapping.xml:2782 #, fuzzy, no-c-format msgid "" "For information about inheritance mappings see string, " -"character, integer, byte, short, boolean, " -"yes_no, true_false." +"persistence layer what subclass to instantiate for a particular row. " +"Hibernate Core supports the follwoing restricted set of types as " +"discriminator column: string, character, integer, byte, " +"short, boolean, yes_no, true_false." msgstr "" "<discriminator> 要素は、 table-per-class-hierarchy " "マッピング戦略を使うポリモーフィックな永続化に必要であり、テーブルの識別カラ" @@ -5268,21 +5282,56 @@ msgstr "" "true_false." #. Tag: para -#: basic_mapping.xml:2523 +#: basic_mapping.xml:2535 #, no-c-format msgid "" "Use the @DiscriminatorColumn to define the " -"discriminator column as well as the discriminator type. Alternatively, you " -"can also use @DiscriminatorFormula to express in SQL " -"what would be in a virtual discriminator column. This is particularly handy " -"when the discriminator value can be extracted from one or more columns of " -"the table. Both @DiscriminatorColumn and " -"@DiscriminatorFormula are to be set on the root " -"entity (once per persisted hierarchy)." +"discriminator column as well as the discriminator type. " +"The enum DiscriminatorType used in " +"javax.persitence.DiscriminatorColumn only contains " +"the values STRING, CHAR and " +"INTEGER which means that not all Hibernate supported " +"types are available via the @DiscriminatorColumn " +"annotation. You can also use @DiscriminatorFormula to express in SQL a virtual discriminator column. This is " +"particularly useful when the discriminator value can be extracted from one " +"or more columns of the table. Both @DiscriminatorColumn and @DiscriminatorFormula are to be set on " +"the root entity (once per persisted hierarchy)." msgstr "" #. Tag: para -#: basic_mapping.xml:2534 +#: basic_mapping.xml:2552 +#, no-c-format +msgid "" +"@org.hibernate.annotations.DiscriminatorOptions " +"allows to optionally specify Hibernate specific discriminator options which " +"are not standardized in JPA. The available options are force and insert. The force " +"attribute is useful if the table contains rows with \"extra\" discriminator " +"values that are not mapped to a persistent class. This could for example " +"occur when working with a legacy database. If force is " +"set to true Hibernate will specify the allowed " +"discriminator values in the SELECT query, even when " +"retrieving all instances of the root class. The second option - " +"insert - tells Hibernate whether or not to include the " +"discriminator column in SQL INSERTs. Usually the column " +"should be part of the INSERT statement, but if your " +"discriminator column is also part of a mapped composite identifier you have " +"to set this option to false." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2569 +#, no-c-format +msgid "" +"There is also a @org.hibernate.annotations.ForceDiscriminator annotation which is deprecated since version 3.6. Use " +"@DiscriminatorOptions instead." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2575 #, no-c-format msgid "" "Finally, use @DiscriminatorValue on each class of the " @@ -5292,7 +5341,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2542 +#: basic_mapping.xml:2583 #, no-c-format msgid "" "In hbm.xml, the <discriminator> element is used to " @@ -5300,7 +5349,7 @@ msgid "" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:2559 +#: basic_mapping.xml:2600 #, fuzzy, no-c-format msgid "" "<discriminator\n" @@ -5320,7 +5369,7 @@ msgstr "" "/>" #. Tag: para -#: basic_mapping.xml:2563 +#: basic_mapping.xml:2604 #, no-c-format msgid "" "column (optional - defaults to class): " @@ -5330,7 +5379,7 @@ msgstr "" "literal> ): 識別カラムの名前。" #. Tag: para -#: basic_mapping.xml:2569 +#: basic_mapping.xml:2610 #, no-c-format msgid "" "type (optional - defaults to string): " @@ -5340,7 +5389,7 @@ msgstr "" "literal> ): Hibernate の型を示す名前。" #. Tag: para -#: basic_mapping.xml:2575 +#: basic_mapping.xml:2616 #, no-c-format msgid "" "force (optional - defaults to false): " @@ -5352,7 +5401,7 @@ msgstr "" "Hibernate が使用できる識別カラムの指定を「強制」します。" #. Tag: para -#: basic_mapping.xml:2582 +#: basic_mapping.xml:2623 #, no-c-format msgid "" "insert (optional - defaults to true): " @@ -5366,7 +5415,7 @@ msgstr "" "INSERT 内のカラムを含ませないよう伝えます。)" #. Tag: para -#: basic_mapping.xml:2590 +#: basic_mapping.xml:2631 #, no-c-format msgid "" "formula (optional): an arbitrary SQL expression that is " @@ -5377,7 +5426,7 @@ msgstr "" "SQL 式。コンテンツベースの識別を可能にします。" #. Tag: para -#: basic_mapping.xml:2597 +#: basic_mapping.xml:2638 #, no-c-format msgid "" "Actual values of the discriminator column are specified by the " @@ -5389,19 +5438,7 @@ msgstr "" "定されます。" #. Tag: para -#: basic_mapping.xml:2602 -#, no-c-format -msgid "" -"The force attribute is only useful if the table contains " -"rows with \"extra\" discriminator values that are not mapped to a persistent " -"class. This will not usually be the case." -msgstr "" -"永続クラスへマッピングされない「余分な」識別値を持つ行がテーブルにあれば、(そ" -"のときに限り) force 属性は有効です。ただし、普通はそうい" -"うことはありません。" - -#. Tag: para -#: basic_mapping.xml:2607 +#: basic_mapping.xml:2643 #, no-c-format msgid "" "The formula attribute allows you to declare an arbitrary " @@ -5411,7 +5448,7 @@ msgstr "" "を宣言できます:" #. Tag: programlisting -#: basic_mapping.xml:2611 +#: basic_mapping.xml:2647 #, fuzzy, no-c-format msgid "" "<discriminator\n" @@ -5423,13 +5460,13 @@ msgstr "" " type=\"integer\"/>" #. Tag: title -#: basic_mapping.xml:2616 +#: basic_mapping.xml:2652 #, fuzzy, no-c-format msgid "Joined subclass strategy" msgstr "joined-subclass" #. Tag: para -#: basic_mapping.xml:2618 +#: basic_mapping.xml:2654 #, fuzzy, no-c-format msgid "" "Each subclass can also be mapped to its own table. This is called the table-" @@ -5447,7 +5484,7 @@ msgstr "" "素を使用します。" #. Tag: programlisting -#: basic_mapping.xml:2628 +#: basic_mapping.xml:2664 #, no-c-format msgid "" "@Entity @Table(name=\"CATS\")\n" @@ -5468,7 +5505,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2631 +#: basic_mapping.xml:2667 #, no-c-format msgid "" "The table name still defaults to the non qualified class name. Also if " @@ -5478,7 +5515,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2638 +#: basic_mapping.xml:2674 #, fuzzy, no-c-format msgid "" "In hbm.xml, use the <joined-subclass> element. For " @@ -5486,7 +5523,7 @@ msgid "" msgstr "class 要素を使って、永続クラスを宣言できます:" #. Tag: programlisting -#: basic_mapping.xml:2652 +#: basic_mapping.xml:2688 #, fuzzy, no-c-format msgid "" "<joined-subclass\n" @@ -5532,13 +5569,13 @@ msgstr "" "</joined-subclass>" #. Tag: para -#: basic_mapping.xml:2661 basic_mapping.xml:2725 +#: basic_mapping.xml:2697 basic_mapping.xml:2761 #, no-c-format msgid "table: the name of the subclass table." msgstr "table :サブクラステーブルの名前。" #. Tag: para -#: basic_mapping.xml:2666 basic_mapping.xml:2730 +#: basic_mapping.xml:2702 basic_mapping.xml:2766 #, no-c-format msgid "" "proxy (optional): specifies a class or interface to use " @@ -5548,7 +5585,7 @@ msgstr "" "ンターフェースを指定します。" #. Tag: para -#: basic_mapping.xml:2671 basic_mapping.xml:2735 +#: basic_mapping.xml:2707 basic_mapping.xml:2771 #, no-c-format msgid "" "lazy (optional, defaults to true): " @@ -5558,7 +5595,7 @@ msgstr "" "lazy=\"false\" とすると、遅延フェッチが使用できません。" #. Tag: para -#: basic_mapping.xml:2679 +#: basic_mapping.xml:2715 #, no-c-format msgid "" "Use the <key> element to declare the primary key / " @@ -5567,13 +5604,13 @@ msgid "" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:2683 +#: basic_mapping.xml:2719 #, fuzzy, no-c-format msgid "" "<?xml version=\"1.0\"?>\n" "<!DOCTYPE hibernate-mapping PUBLIC\n" " \"-//Hibernate/Hibernate Mapping DTD//EN\"\n" -" \"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd\">\n" +" \"http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd\">\n" "\n" "<hibernate-mapping package=\"eg\">\n" "\n" @@ -5637,13 +5674,13 @@ msgstr "" "</hibernate-mapping>" #. Tag: title -#: basic_mapping.xml:2690 +#: basic_mapping.xml:2726 #, no-c-format msgid "Table per class strategy" msgstr "" #. Tag: para -#: basic_mapping.xml:2692 +#: basic_mapping.xml:2728 #, fuzzy, no-c-format msgid "" "A third option is to map only the concrete classes of an inheritance " @@ -5664,7 +5701,7 @@ msgstr "" "subclass> マッピングを使う必要があります。" #. Tag: programlisting -#: basic_mapping.xml:2701 +#: basic_mapping.xml:2737 #, no-c-format msgid "" "@Entity\n" @@ -5673,13 +5710,13 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2703 +#: basic_mapping.xml:2739 #, no-c-format msgid "Or in hbm.xml:" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:2716 +#: basic_mapping.xml:2752 #, fuzzy, no-c-format msgid "" "<union-subclass\n" @@ -5723,20 +5760,20 @@ msgstr "" "</union-subclass>" #. Tag: para -#: basic_mapping.xml:2743 +#: basic_mapping.xml:2779 #, no-c-format msgid "" "No discriminator column or key column is required for this mapping strategy." msgstr "このマッピング戦略では識別カラムやキーカラムは必要ありません。" #. Tag: title -#: basic_mapping.xml:2751 +#: basic_mapping.xml:2787 #, no-c-format msgid "Inherit properties from superclasses" msgstr "" #. Tag: para -#: basic_mapping.xml:2753 +#: basic_mapping.xml:2789 #, no-c-format msgid "" "This is sometimes useful to share common properties through a technical or a " @@ -5746,7 +5783,7 @@ msgid "" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:2758 +#: basic_mapping.xml:2794 #, no-c-format msgid "" "@MappedSuperclass\n" @@ -5765,7 +5802,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2760 +#: basic_mapping.xml:2796 #, no-c-format msgid "" "In database, this hierarchy will be represented as an Order@MappedSuperclass@Embeddable objects to " @@ -5802,7 +5839,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2786 +#: basic_mapping.xml:2822 #, no-c-format msgid "" "It is allowed to mark a class as @MappedSuperclass in the " @@ -5810,7 +5847,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2792 +#: basic_mapping.xml:2828 #, no-c-format msgid "" "Any class in the hierarchy non annotated with @MappedSuperclassaltitude property will be persisted in an " @@ -5871,7 +5908,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2809 +#: basic_mapping.xml:2845 #, no-c-format msgid "" "You can define @AttributeOverride(s) and " @@ -5881,7 +5918,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2815 +#: basic_mapping.xml:2851 #, no-c-format msgid "" "In hbm.xml, simply map the properties of the superclass in the <" @@ -5889,13 +5926,13 @@ msgid "" msgstr "" #. Tag: title -#: basic_mapping.xml:2821 +#: basic_mapping.xml:2857 #, no-c-format msgid "Mapping one entity to several tables" msgstr "" #. Tag: para -#: basic_mapping.xml:2823 +#: basic_mapping.xml:2859 #, no-c-format msgid "" "While not recommended for a fresh schema, some legacy databases force your " @@ -5903,7 +5940,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2826 +#: basic_mapping.xml:2862 #, no-c-format msgid "" "Using the @SecondaryTable or @SecondaryTablesname will be in MainCat@org.hibernate." @@ -5976,7 +6013,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2850 +#: basic_mapping.xml:2886 #, fuzzy, no-c-format msgid "" "fetch: If set to JOIN, the default, Hibernate will use an " @@ -6000,7 +6037,7 @@ msgstr "" "す。" #. Tag: para -#: basic_mapping.xml:2862 +#: basic_mapping.xml:2898 #, fuzzy, no-c-format msgid "" "inverse: If true, Hibernate will not try to insert or " @@ -6011,7 +6048,7 @@ msgstr "" "に対し挿入や更新を行いません。" #. Tag: para -#: basic_mapping.xml:2868 +#: basic_mapping.xml:2904 #, fuzzy, no-c-format msgid "" "optional: If enabled (the default), Hibernate will insert " @@ -6024,7 +6061,7 @@ msgstr "" "ます。" #. Tag: para -#: basic_mapping.xml:2875 +#: basic_mapping.xml:2911 #, no-c-format msgid "" "foreignKey: defines the Foreign Key name of a secondary " @@ -6032,7 +6069,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2880 +#: basic_mapping.xml:2916 #, no-c-format msgid "" "Make sure to use the secondary table name in the appliesto<join> element." msgstr "" @@ -6087,7 +6124,7 @@ msgstr "" "あった場合:" #. Tag: programlisting -#: basic_mapping.xml:2903 +#: basic_mapping.xml:2939 #, fuzzy, no-c-format msgid "" "<join\n" @@ -6119,13 +6156,13 @@ msgstr "" "</join>" #. Tag: para -#: basic_mapping.xml:2907 +#: basic_mapping.xml:2943 #, no-c-format msgid "table: the name of the joined table." msgstr "table :結合したテーブルの名前" #. Tag: para -#: basic_mapping.xml:2924 +#: basic_mapping.xml:2960 #, no-c-format msgid "" "fetch (optional - defaults to join): " @@ -6150,7 +6187,7 @@ msgstr "" "す。" #. Tag: para -#: basic_mapping.xml:2939 +#: basic_mapping.xml:2975 #, no-c-format msgid "" "inverse (optional - defaults to falseoptional (optional - defaults to false@ManyToOne or " @@ -6253,7 +6290,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2978 +#: basic_mapping.xml:3014 #, no-c-format msgid "" "@ManyToOne and @OneToOne have a " @@ -6265,7 +6302,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2985 +#: basic_mapping.xml:3021 #, no-c-format msgid "" "Setting a value of the cascade attribute to any " @@ -6274,7 +6311,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2992 +#: basic_mapping.xml:3028 #, no-c-format msgid "" "basic operations, which include: persist, merge, delete, save-" @@ -6282,7 +6319,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2998 +#: basic_mapping.xml:3034 #, fuzzy, no-c-format msgid "" "special values: delete-orphan or all ;" @@ -6291,7 +6328,7 @@ msgstr "" "使って、どのように指定されるのかに注目してください。" #. Tag: para -#: basic_mapping.xml:3003 +#: basic_mapping.xml:3039 #, no-c-format msgid "" "comma-separated combinations of operation names: cascade=\"persist," @@ -6301,7 +6338,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:3012 +#: basic_mapping.xml:3048 #, no-c-format msgid "" "By default, single point associations are eagerly fetched in JPA 2. You can " @@ -6316,7 +6353,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:3022 +#: basic_mapping.xml:3058 #, no-c-format msgid "" "With the default JPA options, single-ended associations are loaded with a " @@ -6332,13 +6369,13 @@ msgid "" msgstr "" #. Tag: title -#: basic_mapping.xml:3034 +#: basic_mapping.xml:3070 #, fuzzy, no-c-format msgid "Using a foreign key or an association table" msgstr "ユニーク外部キー関連" #. Tag: para -#: basic_mapping.xml:3036 +#: basic_mapping.xml:3072 #, fuzzy, no-c-format msgid "An ordinary association to another persistent class is declared using a" msgstr "" @@ -6346,7 +6383,7 @@ msgstr "" "す。" #. Tag: para -#: basic_mapping.xml:3041 +#: basic_mapping.xml:3077 #, no-c-format msgid "" "@ManyToOne if several entities can point to the the " @@ -6354,7 +6391,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:3046 +#: basic_mapping.xml:3082 #, no-c-format msgid "" "@OneToOne if only a single entity can point to the " @@ -6362,7 +6399,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:3051 +#: basic_mapping.xml:3087 #, no-c-format msgid "" "and a foreign key in one table is referencing the primary key column(s) of " @@ -6370,7 +6407,7 @@ msgid "" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:3054 +#: basic_mapping.xml:3090 #, no-c-format msgid "" "@Entity\n" @@ -6385,7 +6422,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:3056 +#: basic_mapping.xml:3092 #, no-c-format msgid "" "The @JoinColumn attribute is optional, the default value" @@ -6397,7 +6434,7 @@ msgid "" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:3064 +#: basic_mapping.xml:3100 #, no-c-format msgid "" "@Entity\n" @@ -6417,7 +6454,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:3066 +#: basic_mapping.xml:3102 #, no-c-format msgid "" "You can also map a to one association through an association table. This " @@ -6429,7 +6466,7 @@ msgid "" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:3074 +#: basic_mapping.xml:3110 #, no-c-format msgid "" "@Entity\n" @@ -6447,7 +6484,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:3077 +#: basic_mapping.xml:3113 #, no-c-format msgid "" "You can use a SQL fragment to simulate a physical join column using the " @@ -6458,7 +6495,7 @@ msgid "" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:3083 +#: basic_mapping.xml:3119 #, no-c-format msgid "" "@Entity\n" @@ -6473,7 +6510,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:3086 +#: basic_mapping.xml:3122 #, no-c-format msgid "" "You can mark an association as mandatory by using the " @@ -6484,7 +6521,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:3092 +#: basic_mapping.xml:3128 #, no-c-format msgid "" "When Hibernate cannot resolve the association because the expected " @@ -6495,13 +6532,13 @@ msgid "" msgstr "" #. Tag: title -#: basic_mapping.xml:3100 +#: basic_mapping.xml:3136 #, no-c-format msgid "@NotFound annotation" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:3102 +#: basic_mapping.xml:3138 #, no-c-format msgid "" "@Entity\n" @@ -6515,7 +6552,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:3105 +#: basic_mapping.xml:3141 #, no-c-format msgid "" "Sometimes you want to delegate to your database the deletion of cascade when " @@ -6524,13 +6561,13 @@ msgid "" msgstr "" #. Tag: title -#: basic_mapping.xml:3110 +#: basic_mapping.xml:3146 #, no-c-format msgid "@OnDelete annotation" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:3112 +#: basic_mapping.xml:3148 #, no-c-format msgid "" "@Entity\n" @@ -6544,7 +6581,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:3115 +#: basic_mapping.xml:3151 #, no-c-format msgid "" "Foreign key constraints, while generated by Hibernate, have a fairly " @@ -6553,13 +6590,13 @@ msgid "" msgstr "" #. Tag: title -#: basic_mapping.xml:3120 +#: basic_mapping.xml:3156 #, fuzzy, no-c-format msgid "@ForeignKey annotation" msgstr "ユニーク外部キー関連" #. Tag: programlisting -#: basic_mapping.xml:3122 +#: basic_mapping.xml:3158 #, no-c-format msgid "" "@Entity\n" @@ -6576,7 +6613,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:3125 +#: basic_mapping.xml:3161 #, no-c-format msgid "" "Sometimes, you want to link one entity to an other not by the target entity " @@ -6586,7 +6623,7 @@ msgid "" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:3130 basic_mapping.xml:3682 +#: basic_mapping.xml:3166 basic_mapping.xml:3718 #, no-c-format msgid "" "@Entity\n" @@ -6611,14 +6648,14 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:3132 +#: basic_mapping.xml:3168 #, no-c-format msgid "" "This is not encouraged however and should be reserved to legacy mappings." msgstr "" #. Tag: para -#: basic_mapping.xml:3135 +#: basic_mapping.xml:3171 #, no-c-format msgid "" "In hbm.xml, mapping an association is similar. The main difference is that a " @@ -6627,7 +6664,7 @@ msgid "" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:3177 +#: basic_mapping.xml:3213 #, fuzzy, no-c-format msgid "" "<many-to-one\n" @@ -6679,7 +6716,7 @@ msgstr "" "/>" #. Tag: para -#: basic_mapping.xml:3185 basic_mapping.xml:3868 +#: basic_mapping.xml:3221 basic_mapping.xml:3904 #, no-c-format msgid "" "column (optional): the name of the foreign key column. " @@ -6690,7 +6727,7 @@ msgstr "" "<column> カラムによっても指定されます。" #. Tag: para -#: basic_mapping.xml:3191 basic_mapping.xml:3385 +#: basic_mapping.xml:3227 basic_mapping.xml:3421 #, no-c-format msgid "" "class (optional - defaults to the property type " @@ -6700,7 +6737,7 @@ msgstr "" "れるプロパティの型): 関連クラスの名前。" #. Tag: para -#: basic_mapping.xml:3197 basic_mapping.xml:3391 +#: basic_mapping.xml:3233 basic_mapping.xml:3427 #, no-c-format msgid "" "cascade (optional): specifies which operations should be " @@ -6710,7 +6747,7 @@ msgstr "" "へ、どの操作をカスケードするかを指定します。" #. Tag: para -#: basic_mapping.xml:3203 basic_mapping.xml:3407 +#: basic_mapping.xml:3239 basic_mapping.xml:3443 #, no-c-format msgid "" "fetch (optional - defaults to select): " @@ -6721,7 +6758,7 @@ msgstr "" "どちらかを選択します。" #. Tag: para -#: basic_mapping.xml:3209 +#: basic_mapping.xml:3245 #, no-c-format msgid "" "update, insert (optional - defaults to trueproperty-ref (optional): the name of a property of the " @@ -6751,7 +6788,7 @@ msgstr "" "す。" #. Tag: para -#: basic_mapping.xml:3232 +#: basic_mapping.xml:3268 #, no-c-format msgid "" "unique (optional): enables the DDL generation of a unique " @@ -6765,7 +6802,7 @@ msgstr "" "す。" #. Tag: para -#: basic_mapping.xml:3240 +#: basic_mapping.xml:3276 #, no-c-format msgid "" "not-null (optional): enables the DDL generation of a " @@ -6775,7 +6812,7 @@ msgstr "" "許可する DDL の生成を可能にします。" #. Tag: para -#: basic_mapping.xml:3254 +#: basic_mapping.xml:3290 #, no-c-format msgid "" "lazy (optional - defaults to proxy): " @@ -6793,7 +6830,7 @@ msgstr "" "フェッチするよう指定します。" #. Tag: para -#: basic_mapping.xml:3264 +#: basic_mapping.xml:3300 #, no-c-format msgid "" "not-found (optional - defaults to exceptionentity-name (optional): the entity name of the associated " @@ -6816,7 +6853,7 @@ msgstr "" "entity-name (オプション):関連したクラスのエンティティ名。" #. Tag: para -#: basic_mapping.xml:3277 +#: basic_mapping.xml:3313 #, no-c-format msgid "" "formula (optional): an SQL expression that defines the " @@ -6826,7 +6863,7 @@ msgstr "" "部キーに対して値を定義する SQL 式" #. Tag: para -#: basic_mapping.xml:3284 +#: basic_mapping.xml:3320 #, fuzzy, no-c-format msgid "" "Setting a value of the cascade attribute to any " @@ -6853,7 +6890,7 @@ msgstr "" "delete) をサポートしていないことに注意してください。" #. Tag: para -#: basic_mapping.xml:3298 +#: basic_mapping.xml:3334 #, no-c-format msgid "" "Here is an example of a typical many-to-one declaration:" @@ -6861,7 +6898,7 @@ msgstr "" "典型的な many-to-one 宣言は次のようにシンプルです。:" #. Tag: programlisting -#: basic_mapping.xml:3301 +#: basic_mapping.xml:3337 #, fuzzy, no-c-format msgid "" "<many-to-one name=\"product\" class=\"Product\" column=\"PRODUCT_ID\"/>" @@ -6869,7 +6906,7 @@ msgstr "" "<many-to-one name=\"product\" class=\"Product\" column=\"PRODUCT_ID\"/>" #. Tag: para -#: basic_mapping.xml:3303 +#: basic_mapping.xml:3339 #, no-c-format msgid "" "The property-ref attribute should only be used for " @@ -6888,7 +6925,7 @@ msgstr "" "た Hibernate の DDL 生成を制御します。)" #. Tag: programlisting -#: basic_mapping.xml:3311 +#: basic_mapping.xml:3347 #, fuzzy, no-c-format msgid "" "<property name=\"serialNumber\" unique=\"true\" type=\"string\" column=" @@ -6898,14 +6935,14 @@ msgstr "" "\"SERIAL_NUMBER\"/>" #. Tag: para -#: basic_mapping.xml:3313 +#: basic_mapping.xml:3349 #, no-c-format msgid "Then the mapping for OrderItem might use:" msgstr "" "以下のように OrderItem に対してマッピングを使えます:" #. Tag: programlisting -#: basic_mapping.xml:3316 +#: basic_mapping.xml:3352 #, fuzzy, no-c-format msgid "" "<many-to-one name=\"product\" property-ref=\"serialNumber\" column=" @@ -6915,13 +6952,13 @@ msgstr "" "\"PRODUCT_SERIAL_NUMBER\"/>" #. Tag: para -#: basic_mapping.xml:3318 +#: basic_mapping.xml:3354 #, no-c-format msgid "This is not encouraged, however." msgstr "しかし、これは決して推奨できません。" #. Tag: para -#: basic_mapping.xml:3320 +#: basic_mapping.xml:3356 #, no-c-format msgid "" "If the referenced unique key comprises multiple properties of the associated " @@ -6933,7 +6970,7 @@ msgstr "" "ティをマッピングするべきです。" #. Tag: para -#: basic_mapping.xml:3324 +#: basic_mapping.xml:3360 #, no-c-format msgid "" "If the referenced unique key is the property of a component, you can specify " @@ -6943,7 +6980,7 @@ msgstr "" "のパスを指定できます:" #. Tag: programlisting -#: basic_mapping.xml:3327 +#: basic_mapping.xml:3363 #, fuzzy, no-c-format msgid "" "<many-to-one name=\"owner\" property-ref=\"identity.ssn\" column=" @@ -6953,13 +6990,13 @@ msgstr "" "\"OWNER_SSN\"/>" #. Tag: title -#: basic_mapping.xml:3331 +#: basic_mapping.xml:3367 #, no-c-format msgid "Sharing the primary key with the associated entity" msgstr "" #. Tag: para -#: basic_mapping.xml:3333 +#: basic_mapping.xml:3369 #, no-c-format msgid "" "The second approach is to ensure an entity and its associated entity share " @@ -6968,13 +7005,13 @@ msgid "" msgstr "" #. Tag: title -#: basic_mapping.xml:3339 +#: basic_mapping.xml:3375 #, fuzzy, no-c-format msgid "One to One association" msgstr "ユニーク外部キー関連" #. Tag: programlisting -#: basic_mapping.xml:3341 +#: basic_mapping.xml:3377 #, no-c-format msgid "" "@Entity\n" @@ -6998,7 +7035,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:3345 +#: basic_mapping.xml:3381 #, no-c-format msgid "" "Many people got confused by these primary key based one to one associations. " @@ -7008,13 +7045,13 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:3352 +#: basic_mapping.xml:3388 #, no-c-format msgid "In hbm.xml, use the following mapping." msgstr "" #. Tag: programlisting -#: basic_mapping.xml:3377 +#: basic_mapping.xml:3413 #, fuzzy, no-c-format msgid "" "<one-to-one\n" @@ -7050,7 +7087,7 @@ msgstr "" "/>" #. Tag: para -#: basic_mapping.xml:3397 +#: basic_mapping.xml:3433 #, no-c-format msgid "" "constrained (optional): specifies that a foreign key " @@ -7067,7 +7104,7 @@ msgstr "" "す (そしてスキーマエクスポートツールにも使われます)。" #. Tag: para -#: basic_mapping.xml:3413 +#: basic_mapping.xml:3449 #, no-c-format msgid "" "property-ref (optional): the name of a property of the " @@ -7079,7 +7116,7 @@ msgstr "" "す。" #. Tag: para -#: basic_mapping.xml:3426 +#: basic_mapping.xml:3462 #, no-c-format msgid "" "formula (optional): almost all one-to-one associations " @@ -7094,7 +7131,7 @@ msgstr "" "org.hibernate.test.onetooneformula を参照してください。)" #. Tag: para -#: basic_mapping.xml:3435 +#: basic_mapping.xml:3471 #, no-c-format msgid "" "lazy (optional - defaults to proxy): " @@ -7116,7 +7153,7 @@ msgstr "" "意してください。" #. Tag: para -#: basic_mapping.xml:3454 +#: basic_mapping.xml:3490 #, no-c-format msgid "" "Primary key associations do not need an extra table column. If two rows are " @@ -7130,7 +7167,7 @@ msgstr "" "入しなければなりません。" #. Tag: para -#: basic_mapping.xml:3460 +#: basic_mapping.xml:3496 #, no-c-format msgid "" "For a primary key association, add the following mappings to " @@ -7140,13 +7177,13 @@ msgstr "" "Person のそれぞれに追加してください。" #. Tag: programlisting -#: basic_mapping.xml:3464 +#: basic_mapping.xml:3500 #, fuzzy, no-c-format msgid "<one-to-one name=\"person\" class=\"Person\"/>" msgstr "<one-to-one name=\"person\" class=\"Person\"/>" #. Tag: programlisting -#: basic_mapping.xml:3466 +#: basic_mapping.xml:3502 #, fuzzy, no-c-format msgid "" "<one-to-one name=\"employee\" class=\"Employee\" constrained=\"true\"/>" @@ -7154,7 +7191,7 @@ msgstr "" "<one-to-one name=\"employee\" class=\"Employee\" constrained=\"true\"/>" #. Tag: para -#: basic_mapping.xml:3468 +#: basic_mapping.xml:3504 #, no-c-format msgid "" "Ensure that the primary keys of the related rows in the PERSON and EMPLOYEE " @@ -7166,7 +7203,7 @@ msgstr "" "Hibernate 識別子生成戦略を使います:" #. Tag: programlisting -#: basic_mapping.xml:3472 +#: basic_mapping.xml:3508 #, fuzzy, no-c-format msgid "" "<class name=\"person\" table=\"PERSON\">\n" @@ -7194,7 +7231,7 @@ msgstr "" "</class>" #. Tag: para -#: basic_mapping.xml:3474 +#: basic_mapping.xml:3510 #, no-c-format msgid "" "A newly saved instance of Person is assigned the same " @@ -7210,13 +7247,13 @@ msgstr "" "す。" #. Tag: title -#: basic_mapping.xml:3482 +#: basic_mapping.xml:3518 #, no-c-format msgid "Natural-id" msgstr "natural-id" #. Tag: para -#: basic_mapping.xml:3484 +#: basic_mapping.xml:3520 #, fuzzy, no-c-format msgid "" "Although we recommend the use of surrogate keys as primary keys, you should " @@ -7235,7 +7272,7 @@ msgstr "" "ピングはより自己記述的になります。" #. Tag: programlisting -#: basic_mapping.xml:3493 +#: basic_mapping.xml:3529 #, no-c-format msgid "" "@Entity\n" @@ -7265,13 +7302,13 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:3495 +#: basic_mapping.xml:3531 #, no-c-format msgid "Or in XML," msgstr "" #. Tag: programlisting -#: basic_mapping.xml:3497 +#: basic_mapping.xml:3533 #, fuzzy, no-c-format msgid "" "<natural-id mutable=\"true|false\"/>\n" @@ -7287,7 +7324,7 @@ msgstr "" "</natural-id>" #. Tag: para -#: basic_mapping.xml:3499 +#: basic_mapping.xml:3535 #, no-c-format msgid "" "It is recommended that you implement equals() and " @@ -7298,7 +7335,7 @@ msgstr "" "hashCode() の実装を強くお勧めします。" #. Tag: para -#: basic_mapping.xml:3503 +#: basic_mapping.xml:3539 #, no-c-format msgid "" "This mapping is not intended for use with entities that have natural primary " @@ -7307,7 +7344,7 @@ msgstr "" "このマッピングは自然主キーを使ったエンティティでの使用を意図していません。" #. Tag: para -#: basic_mapping.xml:3508 +#: basic_mapping.xml:3544 #, no-c-format msgid "" "mutable (optional - defaults to falseAny" msgstr "any" #. Tag: para -#: basic_mapping.xml:3518 +#: basic_mapping.xml:3554 #, fuzzy, no-c-format msgid "" "There is one more type of property mapping. The @Any " @@ -7347,7 +7384,7 @@ msgstr "" "す。" #. Tag: para -#: basic_mapping.xml:3528 +#: basic_mapping.xml:3564 #, fuzzy, no-c-format msgid "" "The @Any annotation describes the column holding the " @@ -7365,7 +7402,7 @@ msgstr "" "の値からクラス名へのマッピングを指定しなければなりません。" #. Tag: programlisting -#: basic_mapping.xml:3538 +#: basic_mapping.xml:3574 #, no-c-format msgid "" "@Any( metaColumn = @Column( name = \"property_type\" ), fetch=FetchType." @@ -7384,7 +7421,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:3540 +#: basic_mapping.xml:3576 #, no-c-format msgid "" "Note that @AnyDef can be mutualized and reused. It is " @@ -7392,7 +7429,7 @@ msgid "" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:3544 +#: basic_mapping.xml:3580 #, no-c-format msgid "" "//on a package\n" @@ -7416,13 +7453,13 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:3546 +#: basic_mapping.xml:3582 #, no-c-format msgid "The hbm.xml equivalent is:" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:3548 +#: basic_mapping.xml:3584 #, fuzzy, no-c-format msgid "" "<any name=\"being\" id-type=\"long\" meta-type=\"string\">\n" @@ -7442,13 +7479,13 @@ msgstr "" "</any>" #. Tag: para -#: basic_mapping.xml:3551 +#: basic_mapping.xml:3587 #, no-c-format msgid "You cannot mutualize the metadata in hbm.xml as you can in annotations." msgstr "" #. Tag: programlisting -#: basic_mapping.xml:3570 +#: basic_mapping.xml:3606 #, fuzzy, no-c-format msgid "" "<any\n" @@ -7484,19 +7521,19 @@ msgstr "" "</any>" #. Tag: para -#: basic_mapping.xml:3574 +#: basic_mapping.xml:3610 #, no-c-format msgid "name: the property name." msgstr "name: プロパティ名。" #. Tag: para -#: basic_mapping.xml:3578 +#: basic_mapping.xml:3614 #, no-c-format msgid "id-type: the identifier type." msgstr "id-type: 識別子の型。" #. Tag: para -#: basic_mapping.xml:3582 +#: basic_mapping.xml:3618 #, no-c-format msgid "" "meta-type (optional - defaults to string ): ディスクリミネータマッピングで許された型。" #. Tag: para -#: basic_mapping.xml:3588 +#: basic_mapping.xml:3624 #, no-c-format msgid "" "cascade (optional- defaults to none): " @@ -7516,7 +7553,7 @@ msgstr "" "literal> ): カスケードのスタイル。" #. Tag: para -#: basic_mapping.xml:3599 +#: basic_mapping.xml:3635 #, no-c-format msgid "" "optimistic-lock (optional - defaults to true<properties> element allows the definition of a " @@ -7552,7 +7589,7 @@ msgstr "" "す。" #. Tag: programlisting -#: basic_mapping.xml:3632 +#: basic_mapping.xml:3668 #, fuzzy, no-c-format msgid "" "<properties\n" @@ -7582,7 +7619,7 @@ msgstr "" "</properties>" #. Tag: para -#: basic_mapping.xml:3636 +#: basic_mapping.xml:3672 #, no-c-format msgid "" "name: the logical name of the grouping. It is " @@ -7592,7 +7629,7 @@ msgstr "" "ありません 。" #. Tag: para -#: basic_mapping.xml:3651 +#: basic_mapping.xml:3687 #, no-c-format msgid "" "optimistic-lock (optional - defaults to true<properties> " @@ -7616,7 +7653,7 @@ msgstr "" "あった場合:" #. Tag: programlisting -#: basic_mapping.xml:3669 +#: basic_mapping.xml:3705 #, fuzzy, no-c-format msgid "" "<class name=\"Person\">\n" @@ -7643,7 +7680,7 @@ msgstr "" "</class>" #. Tag: para -#: basic_mapping.xml:3671 +#: basic_mapping.xml:3707 #, no-c-format msgid "" "You might have some legacy data association that refers to this unique key " @@ -7653,7 +7690,7 @@ msgstr "" "つ、レガシーデータの関連を持つかもしれません。:" #. Tag: programlisting -#: basic_mapping.xml:3675 +#: basic_mapping.xml:3711 #, fuzzy, no-c-format msgid "" "<many-to-one name=\"owner\"\n" @@ -7671,7 +7708,7 @@ msgstr "" "</many-to-one>" #. Tag: para -#: basic_mapping.xml:3678 +#: basic_mapping.xml:3714 #, no-c-format msgid "" "When using annotations as a mapping strategy, such construct is not " @@ -7680,7 +7717,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:3685 +#: basic_mapping.xml:3721 #, no-c-format msgid "" "The use of this outside the context of mapping legacy data is not " @@ -7690,13 +7727,13 @@ msgstr "" "せん。" #. Tag: title -#: basic_mapping.xml:3690 +#: basic_mapping.xml:3726 #, no-c-format msgid "Some hbm.xml specificities" msgstr "" #. Tag: para -#: basic_mapping.xml:3692 +#: basic_mapping.xml:3728 #, no-c-format msgid "" "The hbm.xml structure has some specificities naturally not present when " @@ -7704,13 +7741,13 @@ msgid "" msgstr "" #. Tag: title -#: basic_mapping.xml:3696 +#: basic_mapping.xml:3732 #, no-c-format msgid "Doctype" msgstr "Doctype" #. Tag: para -#: basic_mapping.xml:3698 +#: basic_mapping.xml:3734 #, no-c-format msgid "" "All XML mappings should declare the doctype shown. The actual DTD can be " @@ -7728,13 +7765,13 @@ msgstr "" "認してください。" #. Tag: title -#: basic_mapping.xml:3707 +#: basic_mapping.xml:3743 #, no-c-format msgid "EntityResolver" msgstr "エンティティリゾルバ" #. Tag: para -#: basic_mapping.xml:3709 +#: basic_mapping.xml:3745 #, no-c-format msgid "" "Hibernate will first attempt to resolve DTDs in its classpath. It does this " @@ -7750,12 +7787,12 @@ msgstr "" "認識します。" #. Tag: para -#: basic_mapping.xml:3718 -#, no-c-format +#: basic_mapping.xml:3754 +#, fuzzy, no-c-format msgid "" "a hibernate namespace is recognized whenever the resolver " -"encounters a systemId starting with http://hibernate.sourceforge." -"net/. The resolver attempts to resolve these entities via the " +"encounters a systemId starting with http://www.hibernate.org/dtd/. The resolver attempts to resolve these entities via the " "classloader which loaded the Hibernate classes." msgstr "" "hibernate namespace は、リゾルバが http://" @@ -7764,7 +7801,7 @@ msgstr "" "て、これらのエンティティを解決しようとします。" #. Tag: para -#: basic_mapping.xml:3726 +#: basic_mapping.xml:3762 #, no-c-format msgid "" "a user namespace is recognized whenever the resolver " @@ -7780,13 +7817,13 @@ msgstr "" "ティティを解決しようとします。" #. Tag: para -#: basic_mapping.xml:3735 +#: basic_mapping.xml:3771 #, no-c-format msgid "The following is an example of utilizing user namespacing:" msgstr "下記は、ユーザー名前空間を使った例です:" #. Tag: programlisting -#: basic_mapping.xml:3738 +#: basic_mapping.xml:3774 #, no-c-format msgid "" "types.xml is a resource in the your." @@ -7806,13 +7843,13 @@ msgstr "" "\"/> を含みます。" #. Tag: title -#: basic_mapping.xml:3747 +#: basic_mapping.xml:3783 #, fuzzy, no-c-format msgid "Hibernate-mapping" msgstr "hibernate-mapping" #. Tag: para -#: basic_mapping.xml:3749 +#: basic_mapping.xml:3785 #, no-c-format msgid "" "This element has several optional attributes. The schema " @@ -7837,7 +7874,7 @@ msgstr "" "れていないクラス名を、デフォルトで使えるようにします。" #. Tag: programlisting -#: basic_mapping.xml:3778 +#: basic_mapping.xml:3814 #, fuzzy, no-c-format msgid "" "<hibernate-mapping\n" @@ -7861,20 +7898,20 @@ msgstr "" " />" #. Tag: para -#: basic_mapping.xml:3782 +#: basic_mapping.xml:3818 #, no-c-format msgid "schema (optional): the name of a database schema." msgstr "schema(オプション):データベーススキーマの名前。" #. Tag: para -#: basic_mapping.xml:3787 +#: basic_mapping.xml:3823 #, no-c-format msgid "catalog (optional): the name of a database catalog." msgstr "" "catalog (オプション):データベースカタログの名前。" #. Tag: para -#: basic_mapping.xml:3792 +#: basic_mapping.xml:3828 #, no-c-format msgid "" "default-cascade (optional - defaults to nonenone): デフォルトのカスケードスタイル。" #. Tag: para -#: basic_mapping.xml:3797 +#: basic_mapping.xml:3833 #, no-c-format msgid "" "default-access (optional - defaults to propertydefault-lazy (optional - defaults to trueauto-import (optional - defaults to truepackage (optional): specifies a package prefix to use for " @@ -7931,7 +7968,7 @@ msgstr "" "いないクラス名に対して割り当てる、パッケージの接頭辞 (prefix) を指定します。" #. Tag: para -#: basic_mapping.xml:3825 +#: basic_mapping.xml:3861 #, no-c-format msgid "" "If you have two persistent classes with the same unqualified name, you " @@ -7943,7 +7980,7 @@ msgstr "" "前を割り当てようとすると、 Hibernate は例外を送出します。" #. Tag: para -#: basic_mapping.xml:3830 +#: basic_mapping.xml:3866 #, no-c-format msgid "" "The hibernate-mapping element allows you to nest several " @@ -7963,13 +8000,13 @@ msgstr "" "literal> , または継承を使うなら Animal.hbm.xml 。" #. Tag: title -#: basic_mapping.xml:3841 +#: basic_mapping.xml:3877 #, fuzzy, no-c-format msgid "Key" msgstr "key" #. Tag: para -#: basic_mapping.xml:3843 +#: basic_mapping.xml:3879 #, fuzzy, no-c-format msgid "" "The <key> element is featured a few times within " @@ -7982,7 +8019,7 @@ msgstr "" "素のどこにでも現れ、オリジナルテーブルの主キーを参照します。" #. Tag: programlisting -#: basic_mapping.xml:3864 +#: basic_mapping.xml:3900 #, fuzzy, no-c-format msgid "" "<key\n" @@ -8004,7 +8041,7 @@ msgstr "" "/>" #. Tag: para -#: basic_mapping.xml:3874 +#: basic_mapping.xml:3910 #, no-c-format msgid "" "on-delete (optional - defaults to noactionproperty-ref (optional): specifies that the foreign key " @@ -8028,7 +8065,7 @@ msgstr "" "す)。" #. Tag: para -#: basic_mapping.xml:3886 +#: basic_mapping.xml:3922 #, no-c-format msgid "" "not-null (optional): specifies that the foreign key " @@ -8040,7 +8077,7 @@ msgstr "" "ます)。" #. Tag: para -#: basic_mapping.xml:3892 +#: basic_mapping.xml:3928 #, no-c-format msgid "" "update (optional): specifies that the foreign key should " @@ -8052,7 +8089,7 @@ msgstr "" "す)。" #. Tag: para -#: basic_mapping.xml:3898 +#: basic_mapping.xml:3934 #, no-c-format msgid "" "unique (optional): specifies that the foreign key should " @@ -8064,7 +8101,7 @@ msgstr "" "ます)。" #. Tag: para -#: basic_mapping.xml:3905 +#: basic_mapping.xml:3941 #, no-c-format msgid "" "For systems where delete performance is important, we recommend that all " @@ -8082,7 +8119,7 @@ msgstr "" "るということに注意してください。" #. Tag: para -#: basic_mapping.xml:3913 +#: basic_mapping.xml:3949 #, no-c-format msgid "" "The not-null and update attributes are " @@ -8097,13 +8134,13 @@ msgstr "" "カラムを宣言 しなくてはなりません 。" #. Tag: title -#: basic_mapping.xml:3922 +#: basic_mapping.xml:3958 #, fuzzy, no-c-format msgid "Import" msgstr "import" #. Tag: para -#: basic_mapping.xml:3924 +#: basic_mapping.xml:3960 #, no-c-format msgid "" "If your application has two persistent classes with the same name, and you " @@ -8119,13 +8156,13 @@ msgstr "" "フェースでさえもインポートできます。" #. Tag: programlisting -#: basic_mapping.xml:3930 +#: basic_mapping.xml:3966 #, fuzzy, no-c-format msgid "<import class=\"java.lang.Object\" rename=\"Universe\"/>" msgstr "<import class=\"java.lang.Object\" rename=\"Universe\"/>" #. Tag: programlisting -#: basic_mapping.xml:3939 +#: basic_mapping.xml:3975 #, fuzzy, no-c-format msgid "" "<import\n" @@ -8139,14 +8176,14 @@ msgstr "" "/>" #. Tag: para -#: basic_mapping.xml:3943 +#: basic_mapping.xml:3979 #, no-c-format msgid "" "class: the fully qualified class name of any Java class." msgstr "class: Java クラスの完全修飾されたクラス名。" #. Tag: para -#: basic_mapping.xml:3948 +#: basic_mapping.xml:3984 #, no-c-format msgid "" "rename (optional - defaults to the unqualified class " @@ -8156,19 +8193,19 @@ msgstr "" "名): クエリ言語で使われる名前。" #. Tag: para -#: basic_mapping.xml:3956 +#: basic_mapping.xml:3992 #, no-c-format msgid "This feature is unique to hbm.xml and is not supported in annotations." msgstr "" #. Tag: title -#: basic_mapping.xml:3962 +#: basic_mapping.xml:3998 #, no-c-format msgid "Column and formula elements" msgstr "column と formula 要素" #. Tag: para -#: basic_mapping.xml:3964 +#: basic_mapping.xml:4000 #, no-c-format msgid "" "Mapping elements which accept a column attribute will " @@ -8182,7 +8219,7 @@ msgstr "" "段です。" #. Tag: programlisting -#: basic_mapping.xml:3970 +#: basic_mapping.xml:4006 #, fuzzy, no-c-format msgid "" "<column\n" @@ -8214,13 +8251,13 @@ msgstr "" " default=\"SQL expression\"/>" #. Tag: programlisting -#: basic_mapping.xml:3972 +#: basic_mapping.xml:4008 #, fuzzy, no-c-format msgid "<formula>SQL expression</formula>" msgstr "<formula>SQL expression</formula>" #. Tag: para -#: basic_mapping.xml:3974 +#: basic_mapping.xml:4010 #, no-c-format msgid "" "Most of the attributes on column provide a means of " @@ -8232,7 +8269,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:3982 +#: basic_mapping.xml:4018 #, fuzzy, no-c-format msgid "" "The column and formula elements can " @@ -8244,7 +8281,7 @@ msgstr "" "合条件などです。" #. Tag: programlisting -#: basic_mapping.xml:3986 +#: basic_mapping.xml:4022 #, fuzzy, no-c-format msgid "" "<many-to-one name=\"homeAddress\" class=\"Address\"\n" @@ -8260,19 +8297,19 @@ msgstr "" "</many-to-one>" #. Tag: title -#: basic_mapping.xml:3992 +#: basic_mapping.xml:4028 #, no-c-format msgid "Hibernate types" msgstr "Hibernate の型" #. Tag: title -#: basic_mapping.xml:3995 +#: basic_mapping.xml:4031 #, no-c-format msgid "Entities and values" msgstr "エンティティと値" #. Tag: para -#: basic_mapping.xml:3997 +#: basic_mapping.xml:4033 #, no-c-format msgid "" "In relation to the persistence service, Java language-level objects are " @@ -8280,7 +8317,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:4000 +#: basic_mapping.xml:4036 #, no-c-format msgid "" "An entity exists independently of any other objects " @@ -8304,7 +8341,7 @@ msgstr "" "それらはバージョン付けすることもできます。" #. Tag: para -#: basic_mapping.xml:4010 +#: basic_mapping.xml:4046 #, no-c-format msgid "" "An entity's persistent state consists of references to other entities and " @@ -8327,7 +8364,7 @@ msgstr "" "エンティティやコレクションがこれを共有することはできません。" #. Tag: para -#: basic_mapping.xml:4020 +#: basic_mapping.xml:4056 #, no-c-format msgid "" "Until now, we have been using the term \"persistent class\" to refer to " @@ -8354,13 +8391,13 @@ msgstr "" "に対する良いヒントになります。一方合成集約や集約は、通常値型へ変換されます。" #. Tag: para -#: basic_mapping.xml:4033 +#: basic_mapping.xml:4069 #, no-c-format msgid "We will revisit both concepts throughout this reference guide." msgstr "本ドキュメントを通して、何度もこの概念を取り上げます。" #. Tag: para -#: basic_mapping.xml:4036 +#: basic_mapping.xml:4072 #, no-c-format msgid "" "The challenge is to map the Java type system, and the developers' definition " @@ -8385,7 +8422,7 @@ msgstr "" "身のマッピング型を記述し、同様にカスタムの変換戦略を実装することができます。" #. Tag: para -#: basic_mapping.xml:4049 +#: basic_mapping.xml:4085 #, no-c-format msgid "" "With the exception of collections, all built-in Hibernate types support null " @@ -8395,13 +8432,13 @@ msgstr "" "ポートします。" #. Tag: title -#: basic_mapping.xml:4054 +#: basic_mapping.xml:4090 #, no-c-format msgid "Basic value types" msgstr "基本的な型" #. Tag: para -#: basic_mapping.xml:4056 +#: basic_mapping.xml:4092 #, no-c-format msgid "" "The built-in basic mapping types can be roughly " @@ -8411,7 +8448,7 @@ msgstr "" "けられます。" #. Tag: literal -#: basic_mapping.xml:4059 +#: basic_mapping.xml:4095 #, fuzzy, no-c-format msgid "" "integer, long, short, float, double, character, byte, boolean, yes_no, " @@ -8421,7 +8458,7 @@ msgstr "" "yes_no, true_false" #. Tag: para -#: basic_mapping.xml:4063 +#: basic_mapping.xml:4099 #, no-c-format msgid "" "Type mappings from Java primitives or wrapper classes to appropriate (vendor-" @@ -8435,13 +8472,13 @@ msgstr "" "または java.lang.Boolean の代替エンコードです。" #. Tag: literal -#: basic_mapping.xml:4073 +#: basic_mapping.xml:4109 #, no-c-format msgid "string" msgstr "string" #. Tag: para -#: basic_mapping.xml:4076 +#: basic_mapping.xml:4112 #, no-c-format msgid "" "A type mapping from java.lang.String to VARCHARVARCHAR2 )への型マッピング。" #. Tag: literal -#: basic_mapping.xml:4083 +#: basic_mapping.xml:4119 #, fuzzy, no-c-format msgid "date, time, timestamp" msgstr "date, time, timestamp" #. Tag: para -#: basic_mapping.xml:4086 +#: basic_mapping.xml:4122 #, no-c-format msgid "" "Type mappings from java.util.Date and its subclasses to " @@ -8469,13 +8506,13 @@ msgstr "" "literal> (またはそれらと等価なもの) への型マッピング。" #. Tag: literal -#: basic_mapping.xml:4094 +#: basic_mapping.xml:4130 #, fuzzy, no-c-format msgid "calendar, calendar_date" msgstr "calendar, calendar_date" #. Tag: para -#: basic_mapping.xml:4097 +#: basic_mapping.xml:4133 #, no-c-format msgid "" "Type mappings from java.util.Calendar to SQL types " @@ -8486,13 +8523,13 @@ msgstr "" "グ。" #. Tag: literal -#: basic_mapping.xml:4104 +#: basic_mapping.xml:4140 #, fuzzy, no-c-format msgid "big_decimal, big_integer" msgstr "big_decimal, big_integer" #. Tag: para -#: basic_mapping.xml:4107 +#: basic_mapping.xml:4143 #, no-c-format msgid "" "Type mappings from java.math.BigDecimal and java." @@ -8504,13 +8541,13 @@ msgstr "" "literal> )への型マッピング。" #. Tag: literal -#: basic_mapping.xml:4115 +#: basic_mapping.xml:4151 #, fuzzy, no-c-format msgid "locale, timezone, currency" msgstr "locale, timezone, currency" #. Tag: para -#: basic_mapping.xml:4118 +#: basic_mapping.xml:4154 #, no-c-format msgid "" "Type mappings from java.util.Locale, java.util." @@ -8528,13 +8565,13 @@ msgstr "" "タンスは、それらの ID にマッピングされます。" #. Tag: literal -#: basic_mapping.xml:4131 +#: basic_mapping.xml:4167 #, fuzzy, no-c-format msgid "class" msgstr "subclass" #. Tag: para -#: basic_mapping.xml:4134 +#: basic_mapping.xml:4170 #, no-c-format msgid "" "A type mapping from java.lang.Class to VARCHAR はその完全修飾された名前にマッピングされます。" #. Tag: literal -#: basic_mapping.xml:4142 +#: basic_mapping.xml:4178 #, no-c-format msgid "binary" msgstr "binary" #. Tag: para -#: basic_mapping.xml:4145 +#: basic_mapping.xml:4181 #, no-c-format msgid "Maps byte arrays to an appropriate SQL binary type." msgstr "バイト配列は、適切な SQL のバイナリ型にマッピングされます。" #. Tag: literal -#: basic_mapping.xml:4150 +#: basic_mapping.xml:4186 #, no-c-format msgid "text" msgstr "text" #. Tag: para -#: basic_mapping.xml:4153 -#, no-c-format +#: basic_mapping.xml:4189 +#, fuzzy, no-c-format msgid "" -"Maps long Java strings to a SQL CLOB or TEXT type." +"Maps long Java strings to a SQL LONGVARCHAR or " +"TEXT type." msgstr "" "長い Java 文字列は、 SQL の CLOB または TEXT 型にマッピングされます。" #. Tag: literal -#: basic_mapping.xml:4159 +#: basic_mapping.xml:4195 +#, no-c-format +msgid "image" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:4198 +#, fuzzy, no-c-format +msgid "Maps long byte arrays to a SQL LONGVARBINARY." +msgstr "" +"長い Java 文字列は、 SQL の CLOB または TEXT 型にマッピングされます。" + +#. Tag: literal +#: basic_mapping.xml:4203 #, no-c-format msgid "serializable" msgstr "serializable" #. Tag: para -#: basic_mapping.xml:4162 +#: basic_mapping.xml:4206 #, no-c-format msgid "" "Maps serializable Java types to an appropriate SQL binary type. You can also " @@ -8593,13 +8644,13 @@ msgstr "" "こともできます。" #. Tag: literal -#: basic_mapping.xml:4171 +#: basic_mapping.xml:4215 #, no-c-format msgid "clob, blob" msgstr "clob, blob" #. Tag: para -#: basic_mapping.xml:4174 +#: basic_mapping.xml:4218 #, no-c-format msgid "" "Type mappings for the JDBC classes java.sql.Clob and " @@ -8613,7 +8664,41 @@ msgstr "" "らにはドライバサポートが一貫していません。)" #. Tag: literal -#: basic_mapping.xml:4184 +#: basic_mapping.xml:4228 +#, no-c-format +msgid "materialized_clob" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:4231 +#, no-c-format +msgid "" +"Maps long Java strings to a SQL CLOB type. When read, the " +"CLOB value is immediately materialized into a Java " +"string. Some drivers require the CLOB value to be read " +"within a transaction. Once materialized, the Java string is available " +"outside of the transaction." +msgstr "" + +#. Tag: literal +#: basic_mapping.xml:4241 +#, fuzzy, no-c-format +msgid "materialized_blob" +msgstr "serializable" + +#. Tag: para +#: basic_mapping.xml:4244 +#, no-c-format +msgid "" +"Maps long Java byte arrays to a SQL BLOB type. When read, " +"the BLOB value is immediately materialized into a byte " +"array. Some drivers require the BLOB value to be read " +"within a transaction. Once materialized, the byte array is available outside " +"of the transaction." +msgstr "" + +#. Tag: literal +#: basic_mapping.xml:4254 #, fuzzy, no-c-format msgid "" "imm_date, imm_time, imm_timestamp, imm_calendar, imm_calendar_date, " @@ -8623,7 +8708,7 @@ msgstr "" "imm_serializable, imm_binary" #. Tag: para -#: basic_mapping.xml:4188 +#: basic_mapping.xml:4258 #, no-c-format msgid "" "Type mappings for what are considered mutable Java types. This is where " @@ -8643,7 +8728,7 @@ msgstr "" "ん。" #. Tag: para -#: basic_mapping.xml:4200 +#: basic_mapping.xml:4270 #, no-c-format msgid "" "Unique identifiers of entities and collections can be of any basic type " @@ -8656,7 +8741,7 @@ msgstr "" "基本型でも構いません。(複合識別子でも構いません。以下を見てください。)" #. Tag: para -#: basic_mapping.xml:4205 +#: basic_mapping.xml:4275 #, no-c-format msgid "" "The basic value types have corresponding Type constants " @@ -8669,13 +8754,13 @@ msgstr "" "STRINGstring 型を表現しています。" #. Tag: title -#: basic_mapping.xml:4212 +#: basic_mapping.xml:4282 #, no-c-format msgid "Custom value types" msgstr "カスタム型" #. Tag: para -#: basic_mapping.xml:4214 +#: basic_mapping.xml:4284 #, no-c-format msgid "" "It is relatively easy for developers to create their own value types. For " @@ -8699,7 +8784,7 @@ msgstr "" "す。" #. Tag: para -#: basic_mapping.xml:4225 +#: basic_mapping.xml:4295 #, no-c-format msgid "" "To implement a custom type, implement either org.hibernate." @@ -8715,7 +8800,7 @@ msgstr "" "い。" #. Tag: programlisting -#: basic_mapping.xml:4232 +#: basic_mapping.xml:4302 #, fuzzy, no-c-format msgid "" "<property name=\"twoStrings\" type=\"org.hibernate.test.DoubleStringType" @@ -8731,7 +8816,7 @@ msgstr "" "</property>" #. Tag: para -#: basic_mapping.xml:4234 +#: basic_mapping.xml:4304 #, no-c-format msgid "" "Notice the use of <column> tags to map a property " @@ -8741,7 +8826,7 @@ msgstr "" "グできることに注目してください。" #. Tag: para -#: basic_mapping.xml:4237 +#: basic_mapping.xml:4307 #, no-c-format msgid "" "The CompositeUserType, EnhancedUserTypeUserType in the " @@ -8771,7 +8856,7 @@ msgstr "" "literal> 要素を使用できます。" #. Tag: programlisting -#: basic_mapping.xml:4250 +#: basic_mapping.xml:4320 #, fuzzy, no-c-format msgid "" "<property name=\"priority\">\n" @@ -8787,7 +8872,7 @@ msgstr "" "</property>" #. Tag: para -#: basic_mapping.xml:4252 +#: basic_mapping.xml:4322 #, no-c-format msgid "" "The UserType can now retrieve the value for the parameter " @@ -8799,7 +8884,7 @@ msgstr "" "対する値を検索することができます。" #. Tag: para -#: basic_mapping.xml:4256 +#: basic_mapping.xml:4326 #, no-c-format msgid "" "If you regularly use a certain UserType, it is useful to " @@ -8814,7 +8899,7 @@ msgstr "" "メータを持つならば、パラメータのデフォルト値のリストを含むこともできます。" #. Tag: programlisting -#: basic_mapping.xml:4262 +#: basic_mapping.xml:4332 #, fuzzy, no-c-format msgid "" "<typedef class=\"com.mycompany.usertypes.DefaultValueIntegerType\" name=" @@ -8828,13 +8913,13 @@ msgstr "" "</typedef>" #. Tag: programlisting -#: basic_mapping.xml:4264 +#: basic_mapping.xml:4334 #, fuzzy, no-c-format msgid "<property name=\"priority\" type=\"default_zero\"/>" msgstr "<property name=\"priority\" type=\"default_zero\"/>" #. Tag: para -#: basic_mapping.xml:4266 +#: basic_mapping.xml:4336 #, no-c-format msgid "" "It is also possible to override the parameters supplied in a typedef on a " @@ -8844,7 +8929,7 @@ msgstr "" "メータをその都度オーバーライドすることが可能です。" #. Tag: para -#: basic_mapping.xml:4270 +#: basic_mapping.xml:4340 #, fuzzy, no-c-format msgid "" "Even though Hibernate's rich range of built-in types and support for " @@ -8866,13 +8951,13 @@ msgstr "" "ピングドキュメントは起こりうる変化に対応できます。" #. Tag: title -#: basic_mapping.xml:4283 +#: basic_mapping.xml:4353 #, no-c-format msgid "Mapping a class more than once" msgstr "1つのクラスに1つ以上のマッピング" #. Tag: para -#: basic_mapping.xml:4285 +#: basic_mapping.xml:4355 #, no-c-format msgid "" "It is possible to provide more than one mapping for a particular persistent " @@ -8890,7 +8975,7 @@ msgstr "" "エンティティ名を指定しなければなりません。" #. Tag: programlisting -#: basic_mapping.xml:4293 +#: basic_mapping.xml:4363 #, fuzzy, no-c-format msgid "" "<class name=\"Contract\" table=\"Contracts\"\n" @@ -8930,7 +9015,7 @@ msgstr "" "</class>" #. Tag: para -#: basic_mapping.xml:4295 +#: basic_mapping.xml:4365 #, no-c-format msgid "" "Associations are now specified using entity-name instead " @@ -8940,19 +9025,19 @@ msgstr "" "使って、どのように指定されるのかに注目してください。" #. Tag: para -#: basic_mapping.xml:4299 basic_mapping.xml:4379 basic_mapping.xml:4414 +#: basic_mapping.xml:4369 basic_mapping.xml:4497 #, no-c-format msgid "This feature is not supported in Annotations" msgstr "" #. Tag: title -#: basic_mapping.xml:4304 +#: basic_mapping.xml:4374 #, no-c-format msgid "SQL quoted identifiers" msgstr "バッククォートで囲んだ SQL 識別子" #. Tag: para -#: basic_mapping.xml:4306 +#: basic_mapping.xml:4376 #, no-c-format msgid "" "You can force Hibernate to quote an identifier in the generated SQL by " @@ -8968,7 +9053,7 @@ msgstr "" "クォートです)。" #. Tag: programlisting -#: basic_mapping.xml:4312 +#: basic_mapping.xml:4382 #, fuzzy, no-c-format msgid "" "@Entity @Table(name=\"`Line Item`\")\n" @@ -8992,13 +9077,13 @@ msgstr "" "</class>" #. Tag: title -#: basic_mapping.xml:4316 +#: basic_mapping.xml:4386 #, no-c-format msgid "Generated properties" msgstr "生成プロパティ" #. Tag: para -#: basic_mapping.xml:4318 +#: basic_mapping.xml:4388 #, no-c-format msgid "" "Generated properties are properties that have their values generated by the " @@ -9018,7 +9103,7 @@ msgstr "" "ぐに、生成された値を読み込むための SELECT SQL が発行されます。" #. Tag: para -#: basic_mapping.xml:4327 +#: basic_mapping.xml:4397 #, fuzzy, no-c-format msgid "" "Properties marked as generated must additionally be non-insertable and non-" @@ -9033,7 +9118,7 @@ msgstr "" "declaration-property\"/> 簡単なプロパティだけが生成されたとマークできます。" #. Tag: para -#: basic_mapping.xml:4334 +#: basic_mapping.xml:4404 #, no-c-format msgid "" "never (the default): the given property value is not " @@ -9043,7 +9128,7 @@ msgstr "" "ベースから生成されないことを意味します。" #. Tag: para -#: basic_mapping.xml:4337 +#: basic_mapping.xml:4407 #, fuzzy, no-c-format msgid "" "insert: the given property value is generated on insert, " @@ -9061,7 +9146,7 @@ msgstr "" "意してください。" #. Tag: para -#: basic_mapping.xml:4344 +#: basic_mapping.xml:4414 #, no-c-format msgid "" "always: the property value is generated both on insert " @@ -9071,19 +9156,19 @@ msgstr "" "示します。" #. Tag: para -#: basic_mapping.xml:4347 +#: basic_mapping.xml:4417 #, no-c-format msgid "To mark a property as generated, use @Generated." msgstr "" #. Tag: title -#: basic_mapping.xml:4352 +#: basic_mapping.xml:4422 #, no-c-format -msgid "Column read and write expressions" +msgid "Column transformers: read and write expressions" msgstr "" #. Tag: para -#: basic_mapping.xml:4354 +#: basic_mapping.xml:4424 #, no-c-format msgid "" "Hibernate allows you to customize the SQL it uses to read and write the " @@ -9094,7 +9179,30 @@ msgid "" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:4359 +#: basic_mapping.xml:4430 +#, no-c-format +msgid "" +"@Entity\n" +"class CreditCard {\n" +" @Column(name=\"credit_card_num\")\n" +" @ColumnTransformer(\n" +" read=\"decrypt(credit_card_num)\", \n" +" write=\"encrypt(?)\")\n" +" public String getCreditCardNumber() { return creditCardNumber; }\n" +" public void setCreditCardNumber(String number) { this.creditCardNumber = " +"number; }\n" +" private String creditCardNumber;\n" +"}" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:4432 +#, no-c-format +msgid "or in XML" +msgstr "" + +#. Tag: programlisting +#: basic_mapping.xml:4434 #, no-c-format msgid "" "<property name=\"creditCardNumber\">\n" @@ -9106,7 +9214,44 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:4361 +#: basic_mapping.xml:4437 +#, no-c-format +msgid "" +"You can use the plural form @ColumnTransformers if " +"more than one columns need to define either of these rules." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:4442 +#, no-c-format +msgid "" +"If a property uses more that one column, you must use the " +"forColumn attribute to specify which column, the " +"expressions are targeting." +msgstr "" + +#. Tag: programlisting +#: basic_mapping.xml:4446 +#, no-c-format +msgid "" +"@Entity\n" +"class User {\n" +" @Type(type=\"com.acme.type.CreditCardType\")\n" +" @Columns( {\n" +" @Column(name=\"credit_card_num\"),\n" +" @Column(name=\"exp_date\") } )\n" +" @ColumnTransformer(\n" +" forColumn=\"credit_card_num\", \n" +" read=\"decrypt(credit_card_num)\", \n" +" write=\"encrypt(?)\")\n" +" public CreditCard getCreditCard() { return creditCard; }\n" +" public void setCreditCard(CreditCard card) { this.creditCard = card; }\n" +" private CreditCard creditCard;\n" +"}" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:4448 #, no-c-format msgid "" "Hibernate applies the custom expressions automatically whenever the property " @@ -9115,7 +9260,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:4366 +#: basic_mapping.xml:4453 #, no-c-format msgid "" "The property is backed by one or more columns that are exported as part of " @@ -9123,13 +9268,13 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:4371 +#: basic_mapping.xml:4458 #, no-c-format msgid "The property is read-write, not read-only." msgstr "" #. Tag: para -#: basic_mapping.xml:4375 +#: basic_mapping.xml:4462 #, no-c-format msgid "" "The write expression, if specified, must contain exactly " @@ -9137,13 +9282,13 @@ msgid "" msgstr "" #. Tag: title -#: basic_mapping.xml:4384 +#: basic_mapping.xml:4467 #, no-c-format msgid "Auxiliary database objects" msgstr "補助的なデータベースオブジェクト" #. Tag: para -#: basic_mapping.xml:4386 +#: basic_mapping.xml:4469 #, no-c-format msgid "" "Auxiliary database objects allow for the CREATE and DROP of arbitrary " @@ -9165,7 +9310,7 @@ msgstr "" "の、2つの基本的な方法があります。" #. Tag: para -#: basic_mapping.xml:4396 +#: basic_mapping.xml:4479 #, no-c-format msgid "" "The first mode is to explicitly list the CREATE and DROP commands in the " @@ -9175,7 +9320,7 @@ msgstr "" "載することです:" #. Tag: programlisting -#: basic_mapping.xml:4399 +#: basic_mapping.xml:4482 #, fuzzy, no-c-format msgid "" "<hibernate-mapping>\n" @@ -9195,7 +9340,7 @@ msgstr "" "</hibernate-mapping>" #. Tag: para -#: basic_mapping.xml:4401 +#: basic_mapping.xml:4484 #, no-c-format msgid "" "The second mode is to supply a custom class that constructs the CREATE and " @@ -9207,7 +9352,7 @@ msgstr "" "AuxiliaryDatabaseObject インタフェースを実装しなければなりません。" #. Tag: programlisting -#: basic_mapping.xml:4406 +#: basic_mapping.xml:4489 #, fuzzy, no-c-format msgid "" "<hibernate-mapping>\n" @@ -9225,7 +9370,7 @@ msgstr "" "</hibernate-mapping>" #. Tag: para -#: basic_mapping.xml:4408 +#: basic_mapping.xml:4491 #, no-c-format msgid "" "Additionally, these database objects can be optionally scoped so that they " @@ -9235,7 +9380,7 @@ msgstr "" "タベースオブジェクトが使われるケースを限定できます。" #. Tag: programlisting -#: basic_mapping.xml:4411 +#: basic_mapping.xml:4494 #, fuzzy, no-c-format msgid "" "<hibernate-mapping>\n" @@ -9259,6 +9404,15 @@ msgstr "" " </database-object>\n" "</hibernate-mapping>" +#~ msgid "" +#~ "The force attribute is only useful if the table " +#~ "contains rows with \"extra\" discriminator values that are not mapped to " +#~ "a persistent class. This will not usually be the case." +#~ msgstr "" +#~ "永続クラスへマッピングされない「余分な」識別値を持つ行がテーブルにあれば、" +#~ "(そのときに限り) force 属性は有効です。ただし、普通は" +#~ "そういうことはありません。" + #~ msgid "Class" #~ msgstr "Class" diff --git a/documentation/manual/src/main/docbook/ja-JP/content/type.po b/documentation/manual/src/main/docbook/ja-JP/content/type.po index 70d68f106c..5258dbfcdb 100644 --- a/documentation/manual/src/main/docbook/ja-JP/content/type.po +++ b/documentation/manual/src/main/docbook/ja-JP/content/type.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: http://bugs.kde.org\n" -"POT-Creation-Date: 2010-07-21 04:35+0000\n" +"POT-Creation-Date: 2011-01-21 21:18+0000\n" "PO-Revision-Date: 2010-07-21 04:32+0000\n" "Last-Translator: Automatically generated\n" "Language-Team: none\n" @@ -714,25 +714,53 @@ msgstr "" #. Tag: classname #: type.xml:456 #, no-c-format -msgid "java.lang.Class" +msgid "java.net.URL" msgstr "" #. Tag: classname #: type.xml:459 #, no-c-format -msgid "org.hibernate.type.ClassType" +msgid "org.hibernate.type.UrlType" msgstr "" #. Tag: para #: type.xml:461 #, no-c-format msgid "" +"Maps a java.net.URL to a JDBC VARCHAR (using the " +"external form)" +msgstr "" + +#. Tag: para +#: type.xml:464 +#, no-c-format +msgid "" +"Registered under url and java.net.URL " +"in the type registry (see )." +msgstr "" + +#. Tag: classname +#: type.xml:473 +#, no-c-format +msgid "java.lang.Class" +msgstr "" + +#. Tag: classname +#: type.xml:476 +#, no-c-format +msgid "org.hibernate.type.ClassType" +msgstr "" + +#. Tag: para +#: type.xml:478 +#, no-c-format +msgid "" "Maps a java.lang.Class to a JDBC VARCHAR (using the " "Class name)" msgstr "" #. Tag: para -#: type.xml:464 +#: type.xml:481 #, no-c-format msgid "" "Registered under class and java.lang.Classjava.sql.Blob to a JDBC BLOB" msgstr "" #. Tag: para -#: type.xml:481 +#: type.xml:498 #, no-c-format msgid "" "Registered under blob and java.sql.Blobjava.sql.Clob to a JDBC CLOB" msgstr "" #. Tag: para -#: type.xml:498 +#: type.xml:515 #, no-c-format msgid "" "Registered under clob and java.sql.Clobbinary and byte[] in " @@ -818,33 +846,59 @@ msgid "" msgstr "" #. Tag: classname -#: type.xml:522 +#: type.xml:539 #, no-c-format msgid "org.hibernate.type.MaterializedBlobType" msgstr "" #. Tag: para -#: type.xml:524 +#: type.xml:541 #, no-c-format msgid "Maps a primitive byte[] to a JDBC BLOB" msgstr "" #. Tag: para -#: type.xml:527 +#: type.xml:544 #, no-c-format msgid "" "Registered under materialized_blob in the type registry " "(see )." msgstr "" +#. Tag: classname +#: type.xml:551 +#, no-c-format +msgid "org.hibernate.type.ImageType" +msgstr "" + #. Tag: para -#: type.xml:541 +#: type.xml:553 +#, no-c-format +msgid "Maps a primitive byte[] to a JDBC LONGVARBINARY" +msgstr "" + +#. Tag: para +#: type.xml:556 +#, no-c-format +msgid "" +"Registered under image in the type registry (see )." +msgstr "" + +#. Tag: title +#: type.xml:565 +#, no-c-format +msgid "Byte[]" +msgstr "" + +#. Tag: para +#: type.xml:570 #, no-c-format msgid "Maps a java.lang.Byte[] to a JDBC VARBINARY" msgstr "" #. Tag: para -#: type.xml:544 +#: type.xml:573 #, no-c-format msgid "" "Registered under wrapper-binary, Byte[]characters and char[] " "in the type registry (see )." msgstr "" +#. Tag: title +#: type.xml:599 +#, no-c-format +msgid "Character[]" +msgstr "" + #. Tag: classname -#: type.xml:573 +#: type.xml:602 #, no-c-format msgid "org.hibernate.type.CharacterArrayType" msgstr "" #. Tag: para -#: type.xml:575 +#: type.xml:604 #, no-c-format msgid "Maps a java.lang.Character[] to a JDBC VARCHAR" msgstr "" #. Tag: para -#: type.xml:578 +#: type.xml:607 #, no-c-format msgid "" "Registered under wrapper-characters, Character[]" @@ -900,25 +960,25 @@ msgid "" msgstr "" #. Tag: classname -#: type.xml:587 +#: type.xml:616 #, no-c-format msgid "java.util.UUID" msgstr "" #. Tag: classname -#: type.xml:590 +#: type.xml:619 #, no-c-format msgid "org.hibernate.type.UUIDBinaryType" msgstr "" #. Tag: para -#: type.xml:592 +#: type.xml:621 #, no-c-format msgid "Maps a java.util.UUID to a JDBC BINARY" msgstr "" #. Tag: para -#: type.xml:595 +#: type.xml:624 #, no-c-format msgid "" "Registered under uuid-binary and java.util.UUIDuuid-char in the type registry (see " @@ -948,13 +1008,13 @@ msgid "" msgstr "" #. Tag: classname -#: type.xml:614 +#: type.xml:643 #, no-c-format msgid "org.hibernate.type.PostgresUUIDType" msgstr "" #. Tag: para -#: type.xml:616 +#: type.xml:645 #, no-c-format msgid "" "Maps a java.util.UUID to the PostgreSQL UUID data type (through " @@ -963,7 +1023,7 @@ msgid "" msgstr "" #. Tag: para -#: type.xml:620 +#: type.xml:649 #, no-c-format msgid "" "Registered under pg-uuid in the type registry (see ." msgstr "" #. Tag: title -#: type.xml:686 +#: type.xml:715 #, no-c-format msgid "Entity types" msgstr "" #. Tag: para -#: type.xml:687 +#: type.xml:716 #, no-c-format msgid "" "The definition of entities is covered in detail in to that Product sku. " @@ -1118,19 +1178,19 @@ msgid "" msgstr "" #. Tag: para -#: type.xml:722 +#: type.xml:751 #, no-c-format msgid "TBC..." msgstr "" #. Tag: title -#: type.xml:728 +#: type.xml:757 #, no-c-format msgid "Custom types" msgstr "" #. Tag: para -#: type.xml:729 +#: type.xml:758 #, no-c-format msgid "" "Hibernate makes it relatively easy for developers to create their own " @@ -1144,7 +1204,7 @@ msgid "" msgstr "" #. Tag: para -#: type.xml:737 +#: type.xml:766 #, no-c-format msgid "" "There are 3 approaches to developing a custom Hibernate type. As a means of " @@ -1155,14 +1215,14 @@ msgid "" msgstr "" #. Tag: title -#: type.xml:744 +#: type.xml:773 #, no-c-format msgid "" "Custom types using org.hibernate.type.Type" msgstr "" #. Tag: para -#: type.xml:745 +#: type.xml:774 #, no-c-format msgid "" "The first approach is to directly implement the org.hibernate." @@ -1178,13 +1238,13 @@ msgid "" msgstr "" #. Tag: title -#: type.xml:756 +#: type.xml:785 #, no-c-format msgid "Defining and registering the custom Type" msgstr "" #. Tag: programlisting -#: type.xml:757 +#: type.xml:786 #, no-c-format msgid "" "before " @@ -1257,7 +1317,7 @@ msgid "" msgstr "" #. Tag: title -#: type.xml:767 +#: type.xml:796 #, no-c-format msgid "" "Custom types using org.hibernate.usertype.UserTypeorg.hibernate.usertype.UserType and " @@ -1275,7 +1335,7 @@ msgid "" msgstr "" #. Tag: para -#: type.xml:776 +#: type.xml:805 #, no-c-format msgid "" "The second approach is the use the org.hibernate.usertype." @@ -1287,13 +1347,13 @@ msgid "" msgstr "" #. Tag: title -#: type.xml:783 +#: type.xml:812 #, no-c-format msgid "Defining the custom UserType" msgstr "" #. Tag: programlisting -#: type.xml:784 +#: type.xml:813 #, no-c-format msgid "" "org.hibernate.type." @@ -1351,7 +1411,7 @@ msgid "" msgstr "" #. Tag: title -#: type.xml:796 +#: type.xml:825 #, no-c-format msgid "" "Custom types using org.hibernate.usertype.CompositeUserTypeorg.hibernate." @@ -1374,13 +1434,13 @@ msgid "" msgstr "" #. Tag: title -#: type.xml:808 +#: type.xml:837 #, no-c-format msgid "Defining the custom CompositeUserType" msgstr "" #. Tag: programlisting -#: type.xml:809 +#: type.xml:838 #, no-c-format msgid "" "StringType" msgstr "" #. Tag: programlisting -#: type.xml:831 +#: type.xml:860 #, no-c-format msgid "" "registerTypeOverride is a " @@ -1525,13 +1585,13 @@ msgid "" msgstr "" #. Tag: title -#: type.xml:839 +#: type.xml:868 #, no-c-format msgid "Snippet from BasicType.java" msgstr "" #. Tag: programlisting -#: type.xml:840 +#: type.xml:869 #, no-c-format msgid "" "/**\n" @@ -1544,7 +1604,7 @@ msgid "" msgstr "" #. Tag: para -#: type.xml:842 +#: type.xml:871 #, no-c-format msgid "" "One approach is to use inheritance (SuperDuperStringType\n" "Language-Team: LANGUAGE \n" @@ -495,13 +495,13 @@ msgid "mutable (optional - defaults to trueschema (optional): overrides the schema name specified by the root <hibernate-mapping> element." msgstr "" #. Tag: para -#: basic_mapping.xml:355 basic_mapping.xml:2918 +#: basic_mapping.xml:355 basic_mapping.xml:2954 #, no-c-format msgid "catalog (optional): overrides the catalog name specified by the root <hibernate-mapping> element." msgstr "" @@ -690,7 +690,7 @@ msgid "name (optional): the name of the identifier property." msgstr "" #. Tag: para -#: basic_mapping.xml:518 basic_mapping.xml:2141 +#: basic_mapping.xml:518 basic_mapping.xml:2152 #, no-c-format msgid "type (optional): a name that indicates the Hibernate type." msgstr "" @@ -2326,7 +2326,7 @@ msgstr "" #. Tag: para #: basic_mapping.xml:1588 #, no-c-format -msgid "Alternatively, you can use a timestamp. Timestamps are a less safe implementation of optimistic locking. However, sometimes the application might use the timestamps in other ways." +msgid "Alternatively, you can use a timestamp. Timestamps are a less safe implementation of optimistic locking. However, sometimes an application might use the timestamps in other ways as well." msgstr "" #. Tag: para @@ -2350,17 +2350,23 @@ msgstr "" #. Tag: para #: basic_mapping.xml:1598 #, no-c-format -msgid "Like version numbers, the timestamp can be generated by the database instead of Hibernate. To do that, use @org.hibernate.annotations.Generated(GenerationTime.ALWAYS)." +msgid "When using timestamp versioning you can tell Hibernate where to retrieve the timestamp value from - database or JVM - by optionally adding the @org.hibernate.annotations.Source annotation to the property. Possible values for the value attribute of the annotation are org.hibernate.annotations.SourceType.VM and org.hibernate.annotations.SourceType.DB. The default is SourceType.DB which is also used in case there is no @Source annotation at all." msgstr "" #. Tag: para -#: basic_mapping.xml:1602 +#: basic_mapping.xml:1609 +#, no-c-format +msgid "Like in the case of version numbers, the timestamp can also be generated by the database instead of Hibernate. To do that, use @org.hibernate.annotations.Generated(GenerationTime.ALWAYS)." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1613 #, no-c-format msgid "In hbm.xml, use the <timestamp> element:" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:1620 +#: basic_mapping.xml:1631 #, no-c-format msgid "" "<timestamp\n" @@ -2375,91 +2381,91 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:1624 +#: basic_mapping.xml:1635 #, no-c-format msgid "column (optional - defaults to the property name): the name of a column holding the timestamp." msgstr "" #. Tag: para -#: basic_mapping.xml:1630 +#: basic_mapping.xml:1641 #, no-c-format msgid "name: the name of a JavaBeans style property of Java type Date or Timestamp of the persistent class." msgstr "" #. Tag: para -#: basic_mapping.xml:1636 basic_mapping.xml:2163 basic_mapping.xml:2380 basic_mapping.xml:3226 basic_mapping.xml:3420 basic_mapping.xml:3593 +#: basic_mapping.xml:1647 basic_mapping.xml:2174 basic_mapping.xml:2391 basic_mapping.xml:3262 basic_mapping.xml:3456 basic_mapping.xml:3629 #, no-c-format msgid "access (optional - defaults to property): the strategy Hibernate uses for accessing the property value." msgstr "" #. Tag: para -#: basic_mapping.xml:1642 +#: basic_mapping.xml:1653 #, no-c-format msgid "unsaved-value (optional - defaults to null): a version property value that indicates that an instance is newly instantiated (unsaved), distinguishing it from detached instances that were saved or loaded in a previous session. Undefined specifies that the identifier property value should be used." msgstr "" #. Tag: para -#: basic_mapping.xml:1652 +#: basic_mapping.xml:1663 #, no-c-format msgid "source (optional - defaults to vm): Where should Hibernate retrieve the timestamp value from? From the database, or from the current JVM? Database-based timestamps incur an overhead because Hibernate must hit the database in order to determine the \"next value\". It is safer to use in clustered environments. Not all Dialects are known to support the retrieval of the database's current timestamp. Others may also be unsafe for usage in locking due to lack of precision (Oracle 8, for example)." msgstr "" #. Tag: para -#: basic_mapping.xml:1665 +#: basic_mapping.xml:1676 #, no-c-format msgid "generated (optional - defaults to never): specifies that this timestamp property value is actually generated by the database. See the discussion of generated properties for more information." msgstr "" #. Tag: title -#: basic_mapping.xml:1675 +#: basic_mapping.xml:1686 #, no-c-format msgid "Note" msgstr "" #. Tag: para -#: basic_mapping.xml:1677 +#: basic_mapping.xml:1688 #, no-c-format msgid "<Timestamp> is equivalent to <version type=\"timestamp\">. And <timestamp source=\"db\"> is equivalent to <version type=\"dbtimestamp\">" msgstr "" #. Tag: title -#: basic_mapping.xml:1686 +#: basic_mapping.xml:1697 #, no-c-format msgid "Property" msgstr "" #. Tag: para -#: basic_mapping.xml:1688 +#: basic_mapping.xml:1699 #, no-c-format msgid "You need to decide which property needs to be made persistent in a given entity. This differs slightly between the annotation driven metadata and the hbm.xml files." msgstr "" #. Tag: title -#: basic_mapping.xml:1693 +#: basic_mapping.xml:1704 #, no-c-format msgid "Property mapping with annotations" msgstr "" #. Tag: para -#: basic_mapping.xml:1695 +#: basic_mapping.xml:1706 #, no-c-format msgid "In the annotations world, every non static non transient property (field or method depending on the access type) of an entity is considered persistent, unless you annotate it as @Transient. Not having an annotation for your property is equivalent to the appropriate @Basic annotation." msgstr "" #. Tag: para -#: basic_mapping.xml:1702 +#: basic_mapping.xml:1713 #, no-c-format msgid "The @Basic annotation allows you to declare the fetching strategy for a property. If set to LAZY, specifies that this property should be fetched lazily when the instance variable is first accessed. It requires build-time bytecode instrumentation, if your classes are not instrumented, property level lazy loading is silently ignored. The default is EAGER. You can also mark a property as not optional thanks to the @Basic.optional attribute. This will ensure that the underlying column are not nullable (if possible). Note that a better approach is to use the @NotNull annotation of the Bean Validation specification." msgstr "" #. Tag: para -#: basic_mapping.xml:1715 +#: basic_mapping.xml:1726 #, no-c-format msgid "Let's look at a few examples:" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:1717 +#: basic_mapping.xml:1728 #, no-c-format msgid "" "public transient int counter; //transient property\n" @@ -2485,31 +2491,31 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:1719 +#: basic_mapping.xml:1730 #, no-c-format msgid "counter, a transient field, and lengthInMeter, a method annotated as @Transient, and will be ignored by the Hibernate. name, length, and firstname properties are mapped persistent and eagerly fetched (the default for simple properties). The detailedComment property value will be lazily fetched from the database once a lazy property of the entity is accessed for the first time. Usually you don't need to lazy simple properties (not to be confused with lazy association fetching). The recommended alternative is to use the projection capability of JP-QL (Java Persistence Query Language) or Criteria queries." msgstr "" #. Tag: para -#: basic_mapping.xml:1732 +#: basic_mapping.xml:1743 #, no-c-format msgid "JPA support property mapping of all basic types supported by Hibernate (all basic Java types , their respective wrappers and serializable classes). Hibernate Annotations supports out of the box enum type mapping either into a ordinal column (saving the enum ordinal) or a string based column (saving the enum string representation): the persistence representation, defaulted to ordinal, can be overridden through the @Enumerated annotation as shown in the note property example." msgstr "" #. Tag: para -#: basic_mapping.xml:1742 +#: basic_mapping.xml:1753 #, no-c-format msgid "In plain Java APIs, the temporal precision of time is not defined. When dealing with temporal data you might want to describe the expected precision in database. Temporal data can have DATE, TIME, or TIMESTAMP precision (ie the actual date, only the time, or both). Use the @Temporal annotation to fine tune that." msgstr "" #. Tag: para -#: basic_mapping.xml:1750 +#: basic_mapping.xml:1761 #, no-c-format msgid "@Lob indicates that the property should be persisted in a Blob or a Clob depending on the property type: java.sql.Clob, Character[], char[] and java.lang.String will be persisted in a Clob. java.sql.Blob, Byte[], byte[] and Serializable type will be persisted in a Blob." msgstr "" #. Tag: programlisting -#: basic_mapping.xml:1759 +#: basic_mapping.xml:1770 #, no-c-format msgid "" "@Lob\n" @@ -2524,67 +2530,67 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:1761 +#: basic_mapping.xml:1772 #, no-c-format msgid "If the property type implements java.io.Serializable and is not a basic type, and if the property is not annotated with @Lob, then the Hibernate serializable type is used." msgstr "" #. Tag: title -#: basic_mapping.xml:1768 +#: basic_mapping.xml:1779 #, no-c-format msgid "Type" msgstr "" #. Tag: para -#: basic_mapping.xml:1770 +#: basic_mapping.xml:1781 #, no-c-format msgid "You can also manually specify a type using the @org.hibernate.annotations.Type and some parameters if needed. @Type.type could be:" msgstr "" #. Tag: para -#: basic_mapping.xml:1777 basic_mapping.xml:2209 +#: basic_mapping.xml:1788 basic_mapping.xml:2220 #, no-c-format msgid "The name of a Hibernate basic type: integer, string, character, date, timestamp, float, binary, serializable, object, blob etc." msgstr "" #. Tag: para -#: basic_mapping.xml:1783 basic_mapping.xml:2215 +#: basic_mapping.xml:1794 basic_mapping.xml:2226 #, no-c-format msgid "The name of a Java class with a default basic type: int, float, char, java.lang.String, java.util.Date, java.lang.Integer, java.sql.Clob etc." msgstr "" #. Tag: para -#: basic_mapping.xml:1789 basic_mapping.xml:2221 +#: basic_mapping.xml:1800 basic_mapping.xml:2232 #, no-c-format msgid "The name of a serializable Java class." msgstr "" #. Tag: para -#: basic_mapping.xml:1793 basic_mapping.xml:2225 +#: basic_mapping.xml:1804 basic_mapping.xml:2236 #, no-c-format msgid "The class name of a custom type: com.illflow.type.MyCustomType etc." msgstr "" #. Tag: para -#: basic_mapping.xml:1798 +#: basic_mapping.xml:1809 #, no-c-format msgid "If you do not specify a type, Hibernate will use reflection upon the named property and guess the correct Hibernate type. Hibernate will attempt to interpret the name of the return class of the property getter using, in order, rules 2, 3, and 4." msgstr "" #. Tag: para -#: basic_mapping.xml:1803 +#: basic_mapping.xml:1814 #, no-c-format msgid "@org.hibernate.annotations.TypeDef and @org.hibernate.annotations.TypeDefs allows you to declare type definitions. These annotations can be placed at the class or package level. Note that these definitions are global for the session factory (even when defined at the class level). If the type is used on a single entity, you can place the definition on the entity itself. Otherwise, it is recommended to place the definition at the package level. In the example below, when Hibernate encounters a property of class PhoneNumer, it delegates the persistence strategy to the custom mapping type PhoneNumberType. However, properties belonging to other classes, too, can delegate their persistence strategy to PhoneNumberType, by explicitly using the @Type annotation." msgstr "" #. Tag: para -#: basic_mapping.xml:1819 +#: basic_mapping.xml:1830 #, no-c-format msgid "Package level annotations are placed in a file named package-info.java in the appropriate package. Place your annotations before the package declaration." msgstr "" #. Tag: programlisting -#: basic_mapping.xml:1824 +#: basic_mapping.xml:1835 #, no-c-format msgid "" "@TypeDef(\n" @@ -2604,13 +2610,13 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:1826 +#: basic_mapping.xml:1837 #, no-c-format msgid "The following example shows the usage of the parameters attribute to customize the TypeDef." msgstr "" #. Tag: programlisting -#: basic_mapping.xml:1830 +#: basic_mapping.xml:1841 #, no-c-format msgid "" "//in org/hibernate/test/annotations/entity/package-info.java\n" @@ -2636,13 +2642,13 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:1832 +#: basic_mapping.xml:1843 #, no-c-format msgid "When using composite user type, you will have to express column definitions. The @Columns has been introduced for that purpose." msgstr "" #. Tag: programlisting -#: basic_mapping.xml:1836 +#: basic_mapping.xml:1847 #, no-c-format msgid "" "@Type(type=\"org.hibernate.test.annotations.entity.MonetaryAmountUserType\")\n" @@ -2663,61 +2669,61 @@ msgid "" msgstr "" #. Tag: title -#: basic_mapping.xml:1840 +#: basic_mapping.xml:1851 #, no-c-format msgid "Access type" msgstr "" #. Tag: para -#: basic_mapping.xml:1842 +#: basic_mapping.xml:1853 #, no-c-format msgid "By default the access type of a class hierarchy is defined by the position of the @Id or @EmbeddedId annotations. If these annotations are on a field, then only fields are considered for persistence and the state is accessed via the field. If there annotations are on a getter, then only the getters are considered for persistence and the state is accessed via the getter/setter. That works well in practice and is the recommended approach." msgstr "" #. Tag: para -#: basic_mapping.xml:1850 +#: basic_mapping.xml:1861 #, no-c-format msgid "The placement of annotations within a class hierarchy has to be consistent (either field or on property) to be able to determine the default access type. It is recommended to stick to one single annotation placement strategy throughout your whole application." msgstr "" #. Tag: para -#: basic_mapping.xml:1857 +#: basic_mapping.xml:1868 #, no-c-format msgid "However in some situations, you need to:" msgstr "" #. Tag: para -#: basic_mapping.xml:1861 +#: basic_mapping.xml:1872 #, no-c-format msgid "force the access type of the entity hierarchy" msgstr "" #. Tag: para -#: basic_mapping.xml:1865 +#: basic_mapping.xml:1876 #, no-c-format msgid "override the access type of a specific entity in the class hierarchy" msgstr "" #. Tag: para -#: basic_mapping.xml:1870 +#: basic_mapping.xml:1881 #, no-c-format msgid "override the access type of an embeddable type" msgstr "" #. Tag: para -#: basic_mapping.xml:1874 +#: basic_mapping.xml:1885 #, no-c-format msgid "The best use case is an embeddable class used by several entities that might not use the same access type. In this case it is better to force the access type at the embeddable class level." msgstr "" #. Tag: para -#: basic_mapping.xml:1879 +#: basic_mapping.xml:1890 #, no-c-format msgid "To force the access type on a given class, use the @Access annotation as showed below:" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:1882 +#: basic_mapping.xml:1893 #, no-c-format msgid "" "@Entity\n" @@ -2754,13 +2760,13 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:1884 +#: basic_mapping.xml:1895 #, no-c-format msgid "You can also override the access type of a single property while keeping the other properties standard." msgstr "" #. Tag: programlisting -#: basic_mapping.xml:1887 +#: basic_mapping.xml:1898 #, no-c-format msgid "" "@Entity\n" @@ -2778,85 +2784,85 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:1889 +#: basic_mapping.xml:1900 #, no-c-format msgid "In this example, the default access type is FIELD except for the orderNumber property. Note that the corresponding field, if any must be marked as @Transient or transient." msgstr "" #. Tag: title -#: basic_mapping.xml:1896 +#: basic_mapping.xml:1907 #, no-c-format msgid "@org.hibernate.annotations.AccessType" msgstr "" #. Tag: para -#: basic_mapping.xml:1898 +#: basic_mapping.xml:1909 #, no-c-format msgid "The annotation @org.hibernate.annotations.AccessType should be considered deprecated for FIELD and PROPERTY access. It is still useful however if you need to use a custom access type." msgstr "" #. Tag: title -#: basic_mapping.xml:1907 +#: basic_mapping.xml:1918 #, no-c-format msgid "Optimistic lock" msgstr "" #. Tag: para -#: basic_mapping.xml:1909 +#: basic_mapping.xml:1920 #, no-c-format msgid "It is sometimes useful to avoid increasing the version number even if a given property is dirty (particularly collections). You can do that by annotating the property (or collection) with @OptimisticLock(excluded=true)." msgstr "" #. Tag: para -#: basic_mapping.xml:1914 +#: basic_mapping.xml:1925 #, no-c-format msgid "More formally, specifies that updates to this property do not require acquisition of the optimistic lock." msgstr "" #. Tag: title -#: basic_mapping.xml:1919 +#: basic_mapping.xml:1930 #, no-c-format msgid "Declaring column attributes" msgstr "" #. Tag: para -#: basic_mapping.xml:1921 +#: basic_mapping.xml:1932 #, no-c-format msgid "The column(s) used for a property mapping can be defined using the @Column annotation. Use it to override default values (see the JPA specification for more information on the defaults). You can use this annotation at the property level for properties that are:" msgstr "" #. Tag: para -#: basic_mapping.xml:1929 +#: basic_mapping.xml:1940 #, no-c-format msgid "not annotated at all" msgstr "" #. Tag: para -#: basic_mapping.xml:1933 +#: basic_mapping.xml:1944 #, no-c-format msgid "annotated with @Basic" msgstr "" #. Tag: para -#: basic_mapping.xml:1937 +#: basic_mapping.xml:1948 #, no-c-format msgid "annotated with @Version" msgstr "" #. Tag: para -#: basic_mapping.xml:1941 +#: basic_mapping.xml:1952 #, no-c-format msgid "annotated with @Lob" msgstr "" #. Tag: para -#: basic_mapping.xml:1945 +#: basic_mapping.xml:1956 #, no-c-format msgid "annotated with @Temporal" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:1949 +#: basic_mapping.xml:1960 #, no-c-format msgid "" "@Entity\n" @@ -2867,19 +2873,19 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:1951 +#: basic_mapping.xml:1962 #, no-c-format msgid "The name property is mapped to the flight_name column, which is not nullable, has a length of 50 and is not updatable (making the property immutable)." msgstr "" #. Tag: para -#: basic_mapping.xml:1956 +#: basic_mapping.xml:1967 #, no-c-format msgid "This annotation can be applied to regular properties as well as @Id or @Version properties." msgstr "" #. Tag: programlisting -#: basic_mapping.xml:1983 +#: basic_mapping.xml:1994 #, no-c-format msgid "" "@Column(\n" @@ -2896,79 +2902,79 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:1987 +#: basic_mapping.xml:1998 #, no-c-format msgid "name (optional): the column name (default to the property name)" msgstr "" #. Tag: para -#: basic_mapping.xml:1992 +#: basic_mapping.xml:2003 #, no-c-format msgid "unique (optional): set a unique constraint on this column or not (default false)" msgstr "" #. Tag: para -#: basic_mapping.xml:1997 +#: basic_mapping.xml:2008 #, no-c-format msgid "nullable (optional): set the column as nullable (default true)." msgstr "" #. Tag: para -#: basic_mapping.xml:2002 +#: basic_mapping.xml:2013 #, no-c-format msgid "insertable (optional): whether or not the column will be part of the insert statement (default true)" msgstr "" #. Tag: para -#: basic_mapping.xml:2008 +#: basic_mapping.xml:2019 #, no-c-format msgid "updatable (optional): whether or not the column will be part of the update statement (default true)" msgstr "" #. Tag: para -#: basic_mapping.xml:2014 +#: basic_mapping.xml:2025 #, no-c-format msgid "columnDefinition (optional): override the sql DDL fragment for this particular column (non portable)" msgstr "" #. Tag: para -#: basic_mapping.xml:2020 +#: basic_mapping.xml:2031 #, no-c-format msgid "table (optional): define the targeted table (default primary table)" msgstr "" #. Tag: para -#: basic_mapping.xml:2025 +#: basic_mapping.xml:2036 #, no-c-format msgid "length (optional): column length (default 255)" msgstr "" #. Tag: para -#: basic_mapping.xml:2030 +#: basic_mapping.xml:2041 #, no-c-format msgid "precision (optional): column decimal precision (default 0)" msgstr "" #. Tag: para -#: basic_mapping.xml:2035 +#: basic_mapping.xml:2046 #, no-c-format msgid "scale (optional): column decimal scale if useful (default 0)" msgstr "" #. Tag: title -#: basic_mapping.xml:2043 +#: basic_mapping.xml:2054 #, no-c-format msgid "Formula" msgstr "" #. Tag: para -#: basic_mapping.xml:2045 +#: basic_mapping.xml:2056 #, no-c-format msgid "Sometimes, you want the Database to do some computation for you rather than in the JVM, you might also create some kind of virtual column. You can use a SQL fragment (aka formula) instead of mapping a property into a column. This kind of property is read only (its value is calculated by your formula fragment)." msgstr "" #. Tag: programlisting -#: basic_mapping.xml:2051 +#: basic_mapping.xml:2062 #, no-c-format msgid "" "@Formula(\"obj_length * obj_height * obj_width\")\n" @@ -2976,61 +2982,61 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2053 +#: basic_mapping.xml:2064 #, no-c-format msgid "The SQL fragment can be as complex as you want and even include subselects." msgstr "" #. Tag: title -#: basic_mapping.xml:2058 +#: basic_mapping.xml:2069 #, no-c-format msgid "Non-annotated property defaults" msgstr "" #. Tag: para -#: basic_mapping.xml:2060 +#: basic_mapping.xml:2071 #, no-c-format msgid "If a property is not annotated, the following rules apply:" msgstr "" #. Tag: para -#: basic_mapping.xml:2063 +#: basic_mapping.xml:2074 #, no-c-format msgid "If the property is of a single type, it is mapped as @Basic" msgstr "" #. Tag: para -#: basic_mapping.xml:2068 +#: basic_mapping.xml:2079 #, no-c-format msgid "Otherwise, if the type of the property is annotated as @Embeddable, it is mapped as @Embedded" msgstr "" #. Tag: para -#: basic_mapping.xml:2073 +#: basic_mapping.xml:2084 #, no-c-format msgid "Otherwise, if the type of the property is Serializable, it is mapped as @Basic in a column holding the object in its serialized version" msgstr "" #. Tag: para -#: basic_mapping.xml:2080 +#: basic_mapping.xml:2091 #, no-c-format msgid "Otherwise, if the type of the property is java.sql.Clob or java.sql.Blob, it is mapped as @Lob with the appropriate LobType" msgstr "" #. Tag: title -#: basic_mapping.xml:2091 +#: basic_mapping.xml:2102 #, no-c-format msgid "Property mapping with hbm.xml" msgstr "" #. Tag: para -#: basic_mapping.xml:2093 +#: basic_mapping.xml:2104 #, no-c-format msgid "The <property> element declares a persistent JavaBean style property of the class." msgstr "" #. Tag: programlisting -#: basic_mapping.xml:2125 +#: basic_mapping.xml:2136 #, no-c-format msgid "" "<property\n" @@ -3056,85 +3062,85 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2129 +#: basic_mapping.xml:2140 #, no-c-format msgid "name: the name of the property, with an initial lowercase letter." msgstr "" #. Tag: para -#: basic_mapping.xml:2134 +#: basic_mapping.xml:2145 #, no-c-format msgid "column (optional - defaults to the property name): the name of the mapped database table column. This can also be specified by nested <column> element(s)." msgstr "" #. Tag: para -#: basic_mapping.xml:2146 +#: basic_mapping.xml:2157 #, no-c-format msgid "update, insert (optional - defaults to true): specifies that the mapped columns should be included in SQL UPDATE and/or INSERT statements. Setting both to false allows a pure \"derived\" property whose value is initialized from some other property that maps to the same column(s), or by a trigger or other application." msgstr "" #. Tag: para -#: basic_mapping.xml:2156 +#: basic_mapping.xml:2167 #, no-c-format msgid "formula (optional): an SQL expression that defines the value for a computed property. Computed properties do not have a column mapping of their own." msgstr "" #. Tag: para -#: basic_mapping.xml:2169 +#: basic_mapping.xml:2180 #, no-c-format msgid "lazy (optional - defaults to false): specifies that this property should be fetched lazily when the instance variable is first accessed. It requires build-time bytecode instrumentation." msgstr "" #. Tag: para -#: basic_mapping.xml:2176 +#: basic_mapping.xml:2187 #, no-c-format msgid "unique (optional): enables the DDL generation of a unique constraint for the columns. Also, allow this to be the target of a property-ref." msgstr "" #. Tag: para -#: basic_mapping.xml:2183 +#: basic_mapping.xml:2194 #, no-c-format msgid "not-null (optional): enables the DDL generation of a nullability constraint for the columns." msgstr "" #. Tag: para -#: basic_mapping.xml:2188 basic_mapping.xml:3246 +#: basic_mapping.xml:2199 basic_mapping.xml:3282 #, no-c-format msgid "optimistic-lock (optional - defaults to true): specifies that updates to this property do or do not require acquisition of the optimistic lock. In other words, it determines if a version increment should occur when this property is dirty." msgstr "" #. Tag: para -#: basic_mapping.xml:2196 +#: basic_mapping.xml:2207 #, no-c-format msgid "generated (optional - defaults to never): specifies that this property value is actually generated by the database. See the discussion of generated properties for more information." msgstr "" #. Tag: para -#: basic_mapping.xml:2205 +#: basic_mapping.xml:2216 #, no-c-format msgid "typename could be:" msgstr "" #. Tag: para -#: basic_mapping.xml:2230 +#: basic_mapping.xml:2241 #, no-c-format msgid "If you do not specify a type, Hibernate will use reflection upon the named property and guess the correct Hibernate type. Hibernate will attempt to interpret the name of the return class of the property getter using, in order, rules 2, 3, and 4. In certain cases you will need the type attribute. For example, to distinguish between Hibernate.DATE and Hibernate.TIMESTAMP, or to specify a custom type." msgstr "" #. Tag: para -#: basic_mapping.xml:2239 +#: basic_mapping.xml:2250 #, no-c-format msgid "The access attribute allows you to control how Hibernate accesses the property at runtime. By default, Hibernate will call the property get/set pair. If you specify access=\"field\", Hibernate will bypass the get/set pair and access the field directly using reflection. You can specify your own strategy for property access by naming a class that implements the interface org.hibernate.property.PropertyAccessor." msgstr "" #. Tag: para -#: basic_mapping.xml:2248 +#: basic_mapping.xml:2259 #, no-c-format msgid "A powerful feature is derived properties. These properties are by definition read-only. The property value is computed at load time. You declare the computation as an SQL expression. This then translates to a SELECT clause subquery in the SQL query that loads an instance:" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:2254 +#: basic_mapping.xml:2265 #, no-c-format msgid "" "<property name=\"totalPrice\"\n" @@ -3145,31 +3151,31 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2256 +#: basic_mapping.xml:2267 #, no-c-format msgid "You can reference the entity table by not declaring an alias on a particular column. This would be customerId in the given example. You can also use the nested <formula> mapping element if you do not want to use the attribute." msgstr "" #. Tag: title -#: basic_mapping.xml:2265 +#: basic_mapping.xml:2276 #, no-c-format msgid "Embedded objects (aka components)" msgstr "" #. Tag: para -#: basic_mapping.xml:2267 +#: basic_mapping.xml:2278 #, no-c-format msgid "Embeddable objects (or components) are objects whose properties are mapped to the same table as the owning entity's table. Components can, in turn, declare their own properties, components or collections" msgstr "" #. Tag: para -#: basic_mapping.xml:2272 +#: basic_mapping.xml:2283 #, no-c-format msgid "It is possible to declare an embedded component inside an entity and even override its column mapping. Component classes have to be annotated at the class level with the @Embeddable annotation. It is possible to override the column mapping of an embedded object for a particular entity using the @Embedded and @AttributeOverride annotation in the associated property:" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:2280 +#: basic_mapping.xml:2291 #, no-c-format msgid "" "@Entity\n" @@ -3189,7 +3195,7 @@ msgid "" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:2282 +#: basic_mapping.xml:2293 #, no-c-format msgid "" "@Embeddable\n" @@ -3200,7 +3206,7 @@ msgid "" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:2284 +#: basic_mapping.xml:2295 #, no-c-format msgid "" "@Embeddable\n" @@ -3219,19 +3225,19 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2286 +#: basic_mapping.xml:2297 #, no-c-format msgid "An embeddable object inherits the access type of its owning entity (note that you can override that using the @Access annotation)." msgstr "" #. Tag: para -#: basic_mapping.xml:2290 +#: basic_mapping.xml:2301 #, no-c-format msgid "The Person entity has two component properties, homeAddress and bornIn. homeAddress property has not been annotated, but Hibernate will guess that it is a persistent component by looking for the @Embeddable annotation in the Address class. We also override the mapping of a column name (to bornCountryName) with the @Embedded and @AttributeOverride annotations for each mapped attribute of Country. As you can see, Country is also a nested component of Address, again using auto-detection by Hibernate and JPA defaults. Overriding columns of embedded objects of embedded objects is through dotted expressions." msgstr "" #. Tag: programlisting -#: basic_mapping.xml:2305 +#: basic_mapping.xml:2316 #, no-c-format msgid "" "@Embedded\n" @@ -3245,37 +3251,37 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2307 +#: basic_mapping.xml:2318 #, no-c-format msgid "Hibernate Annotations supports something that is not explicitly supported by the JPA specification. You can annotate a embedded object with the @MappedSuperclass annotation to make the superclass properties persistent (see @MappedSuperclass for more informations)." msgstr "" #. Tag: para -#: basic_mapping.xml:2313 +#: basic_mapping.xml:2324 #, no-c-format msgid "You can also use association annotations in an embeddable object (ie @OneToOne, @ManyToOne, @OneToMany or @ManyToMany). To override the association columns you can use @AssociationOverride." msgstr "" #. Tag: para -#: basic_mapping.xml:2319 +#: basic_mapping.xml:2330 #, no-c-format msgid "If you want to have the same embeddable object type twice in the same entity, the column name defaulting will not work as several embedded objects would share the same set of columns. In plain JPA, you need to override at least one set of columns. Hibernate, however, allows you to enhance the default naming mechanism through the NamingStrategy interface. You can write a strategy that prevent name clashing in such a situation. DefaultComponentSafeNamingStrategy is an example of this." msgstr "" #. Tag: para -#: basic_mapping.xml:2329 +#: basic_mapping.xml:2340 #, no-c-format msgid "If a property of the embedded object points back to the owning entity, annotate it with the @Parent annotation. Hibernate will make sure this property is properly loaded with the entity reference." msgstr "" #. Tag: para -#: basic_mapping.xml:2334 +#: basic_mapping.xml:2345 #, no-c-format msgid "In XML, use the <component> element." msgstr "" #. Tag: programlisting -#: basic_mapping.xml:2356 +#: basic_mapping.xml:2367 #, no-c-format msgid "" "<component\n" @@ -3297,115 +3303,115 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2360 basic_mapping.xml:3181 basic_mapping.xml:3381 +#: basic_mapping.xml:2371 basic_mapping.xml:3217 basic_mapping.xml:3417 #, no-c-format msgid "name: the name of the property." msgstr "" #. Tag: para -#: basic_mapping.xml:2364 +#: basic_mapping.xml:2375 #, no-c-format msgid "class (optional - defaults to the property type determined by reflection): the name of the component (child) class." msgstr "" #. Tag: para -#: basic_mapping.xml:2370 basic_mapping.xml:3641 +#: basic_mapping.xml:2381 basic_mapping.xml:3677 #, no-c-format msgid "insert: do the mapped columns appear in SQL INSERTs?" msgstr "" #. Tag: para -#: basic_mapping.xml:2375 basic_mapping.xml:3646 +#: basic_mapping.xml:2386 basic_mapping.xml:3682 #, no-c-format msgid "update: do the mapped columns appear in SQL UPDATEs?" msgstr "" #. Tag: para -#: basic_mapping.xml:2386 +#: basic_mapping.xml:2397 #, no-c-format msgid "lazy (optional - defaults to false): specifies that this component should be fetched lazily when the instance variable is first accessed. It requires build-time bytecode instrumentation." msgstr "" #. Tag: para -#: basic_mapping.xml:2393 +#: basic_mapping.xml:2404 #, no-c-format msgid "optimistic-lock (optional - defaults to true): specifies that updates to this component either do or do not require acquisition of the optimistic lock. It determines if a version increment should occur when this property is dirty." msgstr "" #. Tag: para -#: basic_mapping.xml:2401 basic_mapping.xml:3659 +#: basic_mapping.xml:2412 basic_mapping.xml:3695 #, no-c-format msgid "unique (optional - defaults to false): specifies that a unique constraint exists upon all mapped columns of the component." msgstr "" #. Tag: para -#: basic_mapping.xml:2408 +#: basic_mapping.xml:2419 #, no-c-format msgid "The child <property> tags map properties of the child class to table columns." msgstr "" #. Tag: para -#: basic_mapping.xml:2411 +#: basic_mapping.xml:2422 #, no-c-format msgid "The <component> element allows a <parent> subelement that maps a property of the component class as a reference back to the containing entity." msgstr "" #. Tag: para -#: basic_mapping.xml:2415 +#: basic_mapping.xml:2426 #, no-c-format msgid "The <dynamic-component> element allows a Map to be mapped as a component, where the property names refer to keys of the map. See for more information. This feature is not supported in annotations." msgstr "" #. Tag: title -#: basic_mapping.xml:2423 +#: basic_mapping.xml:2434 #, no-c-format msgid "Inheritance strategy" msgstr "" #. Tag: para -#: basic_mapping.xml:2425 +#: basic_mapping.xml:2436 #, no-c-format msgid "Java is a language supporting polymorphism: a class can inherit from another. Several strategies are possible to persist a class hierarchy:" msgstr "" #. Tag: para -#: basic_mapping.xml:2431 +#: basic_mapping.xml:2442 #, no-c-format msgid "Single table per class hierarchy strategy: a single table hosts all the instances of a class hierarchy" msgstr "" #. Tag: para -#: basic_mapping.xml:2436 +#: basic_mapping.xml:2447 #, no-c-format msgid "Joined subclass strategy: one table per class and subclass is present and each table persist the properties specific to a given subclass. The state of the entity is then stored in its corresponding class table and all its superclasses" msgstr "" #. Tag: para -#: basic_mapping.xml:2443 +#: basic_mapping.xml:2454 #, no-c-format msgid "Table per class strategy: one table per concrete class and subclass is present and each table persist the properties of the class and its superclasses. The state of the entity is then stored entirely in the dedicated table for its class." msgstr "" #. Tag: title -#: basic_mapping.xml:2451 +#: basic_mapping.xml:2462 #, no-c-format msgid "Single table per class hierarchy strategy" msgstr "" #. Tag: para -#: basic_mapping.xml:2453 +#: basic_mapping.xml:2464 #, no-c-format msgid "With this approach the properties of all the subclasses in a given mapped class hierarchy are stored in a single table." msgstr "" #. Tag: para -#: basic_mapping.xml:2456 +#: basic_mapping.xml:2467 #, no-c-format msgid "Each subclass declares its own persistent properties and subclasses. Version and id properties are assumed to be inherited from the root class. Each subclass in a hierarchy must define a unique discriminator value. If this is not specified, the fully qualified Java class name is used." msgstr "" #. Tag: programlisting -#: basic_mapping.xml:2462 basic_mapping.xml:2540 +#: basic_mapping.xml:2473 basic_mapping.xml:2581 #, no-c-format msgid "" "@Entity\n" @@ -3423,13 +3429,13 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2464 +#: basic_mapping.xml:2475 #, no-c-format msgid "In hbm.xml, for the table-per-class-hierarchy mapping strategy, the <subclass> declaration is used. For example:" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:2479 +#: basic_mapping.xml:2490 #, no-c-format msgid "" "<subclass\n" @@ -3449,67 +3455,79 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2483 basic_mapping.xml:2656 basic_mapping.xml:2720 +#: basic_mapping.xml:2494 basic_mapping.xml:2692 basic_mapping.xml:2756 #, no-c-format msgid "name: the fully qualified class name of the subclass." msgstr "" #. Tag: para -#: basic_mapping.xml:2488 +#: basic_mapping.xml:2499 #, no-c-format msgid "discriminator-value (optional - defaults to the class name): a value that distinguishes individual subclasses." msgstr "" #. Tag: para -#: basic_mapping.xml:2494 +#: basic_mapping.xml:2505 #, no-c-format msgid "proxy (optional): specifies a class or interface used for lazy initializing proxies." msgstr "" #. Tag: para -#: basic_mapping.xml:2499 +#: basic_mapping.xml:2510 #, no-c-format msgid "lazy (optional - defaults to true): setting lazy=\"false\" disables the use of lazy fetching." msgstr "" #. Tag: para -#: basic_mapping.xml:2507 basic_mapping.xml:2685 basic_mapping.xml:2746 +#: basic_mapping.xml:2518 basic_mapping.xml:2721 basic_mapping.xml:2782 #, no-c-format msgid "For information about inheritance mappings see ." msgstr "" #. Tag: title -#: basic_mapping.xml:2511 +#: basic_mapping.xml:2522 #, no-c-format msgid "Discriminator" msgstr "" #. Tag: para -#: basic_mapping.xml:2513 +#: basic_mapping.xml:2524 #, no-c-format -msgid "Discriminators are required for polymorphic persistence using the table-per-class-hierarchy mapping strategy. It declares a discriminator column of the table. The discriminator column contains marker values that tell the persistence layer what subclass to instantiate for a particular row. A restricted set of types can be used: string, character, integer, byte, short, boolean, yes_no, true_false." +msgid "Discriminators are required for polymorphic persistence using the table-per-class-hierarchy mapping strategy. It declares a discriminator column of the table. The discriminator column contains marker values that tell the persistence layer what subclass to instantiate for a particular row. Hibernate Core supports the follwoing restricted set of types as discriminator column: string, character, integer, byte, short, boolean, yes_no, true_false." msgstr "" #. Tag: para -#: basic_mapping.xml:2523 +#: basic_mapping.xml:2535 #, no-c-format -msgid "Use the @DiscriminatorColumn to define the discriminator column as well as the discriminator type. Alternatively, you can also use @DiscriminatorFormula to express in SQL what would be in a virtual discriminator column. This is particularly handy when the discriminator value can be extracted from one or more columns of the table. Both @DiscriminatorColumn and @DiscriminatorFormula are to be set on the root entity (once per persisted hierarchy)." +msgid "Use the @DiscriminatorColumn to define the discriminator column as well as the discriminator type. The enum DiscriminatorType used in javax.persitence.DiscriminatorColumn only contains the values STRING, CHAR and INTEGER which means that not all Hibernate supported types are available via the @DiscriminatorColumn annotation. You can also use @DiscriminatorFormula to express in SQL a virtual discriminator column. This is particularly useful when the discriminator value can be extracted from one or more columns of the table. Both @DiscriminatorColumn and @DiscriminatorFormula are to be set on the root entity (once per persisted hierarchy)." msgstr "" #. Tag: para -#: basic_mapping.xml:2534 +#: basic_mapping.xml:2552 +#, no-c-format +msgid "@org.hibernate.annotations.DiscriminatorOptions allows to optionally specify Hibernate specific discriminator options which are not standardized in JPA. The available options are force and insert. The force attribute is useful if the table contains rows with \"extra\" discriminator values that are not mapped to a persistent class. This could for example occur when working with a legacy database. If force is set to true Hibernate will specify the allowed discriminator values in the SELECT query, even when retrieving all instances of the root class. The second option - insert - tells Hibernate whether or not to include the discriminator column in SQL INSERTs. Usually the column should be part of the INSERT statement, but if your discriminator column is also part of a mapped composite identifier you have to set this option to false." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2569 +#, no-c-format +msgid "There is also a @org.hibernate.annotations.ForceDiscriminator annotation which is deprecated since version 3.6. Use @DiscriminatorOptions instead." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2575 #, no-c-format msgid "Finally, use @DiscriminatorValue on each class of the hierarchy to specify the value stored in the discriminator column for a given entity. If you do not set @DiscriminatorValue on a class, the fully qualified class name is used." msgstr "" #. Tag: para -#: basic_mapping.xml:2542 +#: basic_mapping.xml:2583 #, no-c-format msgid "In hbm.xml, the <discriminator> element is used to define the discriminator column or formula:" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:2559 +#: basic_mapping.xml:2600 #, no-c-format msgid "" "<discriminator\n" @@ -3522,55 +3540,49 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2563 +#: basic_mapping.xml:2604 #, no-c-format msgid "column (optional - defaults to class): the name of the discriminator column." msgstr "" #. Tag: para -#: basic_mapping.xml:2569 +#: basic_mapping.xml:2610 #, no-c-format msgid "type (optional - defaults to string): a name that indicates the Hibernate type" msgstr "" #. Tag: para -#: basic_mapping.xml:2575 +#: basic_mapping.xml:2616 #, no-c-format msgid "force (optional - defaults to false): \"forces\" Hibernate to specify the allowed discriminator values, even when retrieving all instances of the root class." msgstr "" #. Tag: para -#: basic_mapping.xml:2582 +#: basic_mapping.xml:2623 #, no-c-format msgid "insert (optional - defaults to true): set this to false if your discriminator column is also part of a mapped composite identifier. It tells Hibernate not to include the column in SQL INSERTs." msgstr "" #. Tag: para -#: basic_mapping.xml:2590 +#: basic_mapping.xml:2631 #, no-c-format msgid "formula (optional): an arbitrary SQL expression that is executed when a type has to be evaluated. It allows content-based discrimination." msgstr "" #. Tag: para -#: basic_mapping.xml:2597 +#: basic_mapping.xml:2638 #, no-c-format msgid "Actual values of the discriminator column are specified by the discriminator-value attribute of the <class> and <subclass> elements." msgstr "" #. Tag: para -#: basic_mapping.xml:2602 -#, no-c-format -msgid "The force attribute is only useful if the table contains rows with \"extra\" discriminator values that are not mapped to a persistent class. This will not usually be the case." -msgstr "" - -#. Tag: para -#: basic_mapping.xml:2607 +#: basic_mapping.xml:2643 #, no-c-format msgid "The formula attribute allows you to declare an arbitrary SQL expression that will be used to evaluate the type of a row. For example:" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:2611 +#: basic_mapping.xml:2647 #, no-c-format msgid "" "<discriminator\n" @@ -3579,19 +3591,19 @@ msgid "" msgstr "" #. Tag: title -#: basic_mapping.xml:2616 +#: basic_mapping.xml:2652 #, no-c-format msgid "Joined subclass strategy" msgstr "" #. Tag: para -#: basic_mapping.xml:2618 +#: basic_mapping.xml:2654 #, no-c-format msgid "Each subclass can also be mapped to its own table. This is called the table-per-subclass mapping strategy. An inherited state is retrieved by joining with the table of the superclass. A discriminator column is not required for this mapping strategy. Each subclass must, however, declare a table column holding the object identifier. The primary key of this table is also a foreign key to the superclass table and described by the @PrimaryKeyJoinColumns or the <key> element." msgstr "" #. Tag: programlisting -#: basic_mapping.xml:2628 +#: basic_mapping.xml:2664 #, no-c-format msgid "" "@Entity @Table(name=\"CATS\")\n" @@ -3612,19 +3624,19 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2631 +#: basic_mapping.xml:2667 #, no-c-format msgid "The table name still defaults to the non qualified class name. Also if @PrimaryKeyJoinColumn is not set, the primary key / foreign key columns are assumed to have the same names as the primary key columns of the primary table of the superclass." msgstr "" #. Tag: para -#: basic_mapping.xml:2638 +#: basic_mapping.xml:2674 #, no-c-format msgid "In hbm.xml, use the <joined-subclass> element. For example:" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:2652 +#: basic_mapping.xml:2688 #, no-c-format msgid "" "<joined-subclass\n" @@ -3650,31 +3662,31 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2661 basic_mapping.xml:2725 +#: basic_mapping.xml:2697 basic_mapping.xml:2761 #, no-c-format msgid "table: the name of the subclass table." msgstr "" #. Tag: para -#: basic_mapping.xml:2666 basic_mapping.xml:2730 +#: basic_mapping.xml:2702 basic_mapping.xml:2766 #, no-c-format msgid "proxy (optional): specifies a class or interface to use for lazy initializing proxies." msgstr "" #. Tag: para -#: basic_mapping.xml:2671 basic_mapping.xml:2735 +#: basic_mapping.xml:2707 basic_mapping.xml:2771 #, no-c-format msgid "lazy (optional, defaults to true): setting lazy=\"false\" disables the use of lazy fetching." msgstr "" #. Tag: para -#: basic_mapping.xml:2679 +#: basic_mapping.xml:2715 #, no-c-format msgid "Use the <key> element to declare the primary key / foreign key column. The mapping at the start of the chapter would then be re-written as:" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:2683 +#: basic_mapping.xml:2719 #, no-c-format msgid "" "<?xml version=\"1.0\"?>\n" @@ -3711,19 +3723,19 @@ msgid "" msgstr "" #. Tag: title -#: basic_mapping.xml:2690 +#: basic_mapping.xml:2726 #, no-c-format msgid "Table per class strategy" msgstr "" #. Tag: para -#: basic_mapping.xml:2692 +#: basic_mapping.xml:2728 #, no-c-format msgid "A third option is to map only the concrete classes of an inheritance hierarchy to tables. This is called the table-per-concrete-class strategy. Each table defines all persistent states of the class, including the inherited state. In Hibernate, it is not necessary to explicitly map such inheritance hierarchies. You can map each class as a separate entity root. However, if you wish use polymorphic associations (e.g. an association to the superclass of your hierarchy), you need to use the union subclass mapping." msgstr "" #. Tag: programlisting -#: basic_mapping.xml:2701 +#: basic_mapping.xml:2737 #, no-c-format msgid "" "@Entity\n" @@ -3732,13 +3744,13 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2703 +#: basic_mapping.xml:2739 #, no-c-format msgid "Or in hbm.xml:" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:2716 +#: basic_mapping.xml:2752 #, no-c-format msgid "" "<union-subclass\n" @@ -3763,25 +3775,25 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2743 +#: basic_mapping.xml:2779 #, no-c-format msgid "No discriminator column or key column is required for this mapping strategy." msgstr "" #. Tag: title -#: basic_mapping.xml:2751 +#: basic_mapping.xml:2787 #, no-c-format msgid "Inherit properties from superclasses" msgstr "" #. Tag: para -#: basic_mapping.xml:2753 +#: basic_mapping.xml:2789 #, no-c-format msgid "This is sometimes useful to share common properties through a technical or a business superclass without including it as a regular mapped entity (ie no specific table for this entity). For that purpose you can map them as @MappedSuperclass." msgstr "" #. Tag: programlisting -#: basic_mapping.xml:2758 +#: basic_mapping.xml:2794 #, no-c-format msgid "" "@MappedSuperclass\n" @@ -3800,49 +3812,49 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2760 +#: basic_mapping.xml:2796 #, no-c-format msgid "In database, this hierarchy will be represented as an Order table having the id, lastUpdate and lastUpdater columns. The embedded superclass property mappings are copied into their entity subclasses. Remember that the embeddable superclass is not the root of the hierarchy though." msgstr "" #. Tag: para -#: basic_mapping.xml:2768 +#: basic_mapping.xml:2804 #, no-c-format msgid "Properties from superclasses not mapped as @MappedSuperclass are ignored." msgstr "" #. Tag: para -#: basic_mapping.xml:2773 +#: basic_mapping.xml:2809 #, no-c-format msgid "The default access type (field or methods) is used, unless you use the @Access annotation." msgstr "" #. Tag: para -#: basic_mapping.xml:2778 +#: basic_mapping.xml:2814 #, no-c-format msgid "The same notion can be applied to @Embeddable objects to persist properties from their superclasses. You also need to use @MappedSuperclass to do that (this should not be considered as a standard EJB3 feature though)" msgstr "" #. Tag: para -#: basic_mapping.xml:2786 +#: basic_mapping.xml:2822 #, no-c-format msgid "It is allowed to mark a class as @MappedSuperclass in the middle of the mapped inheritance hierarchy." msgstr "" #. Tag: para -#: basic_mapping.xml:2792 +#: basic_mapping.xml:2828 #, no-c-format msgid "Any class in the hierarchy non annotated with @MappedSuperclass nor @Entity will be ignored." msgstr "" #. Tag: para -#: basic_mapping.xml:2797 +#: basic_mapping.xml:2833 #, no-c-format msgid "You can override columns defined in entity superclasses at the root entity level using the @AttributeOverride annotation." msgstr "" #. Tag: programlisting -#: basic_mapping.xml:2801 +#: basic_mapping.xml:2837 #, no-c-format msgid "" "@MappedSuperclass\n" @@ -3876,43 +3888,43 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2803 +#: basic_mapping.xml:2839 #, no-c-format msgid "The altitude property will be persisted in an fld_altitude column of table Plane and the propulsion association will be materialized in a fld_propulsion_fk foreign key column." msgstr "" #. Tag: para -#: basic_mapping.xml:2809 +#: basic_mapping.xml:2845 #, no-c-format msgid "You can define @AttributeOverride(s) and @AssociationOverride(s) on @Entity classes, @MappedSuperclass classes and properties pointing to an @Embeddable object." msgstr "" #. Tag: para -#: basic_mapping.xml:2815 +#: basic_mapping.xml:2851 #, no-c-format msgid "In hbm.xml, simply map the properties of the superclass in the <class> element of the entity that needs to inherit them." msgstr "" #. Tag: title -#: basic_mapping.xml:2821 +#: basic_mapping.xml:2857 #, no-c-format msgid "Mapping one entity to several tables" msgstr "" #. Tag: para -#: basic_mapping.xml:2823 +#: basic_mapping.xml:2859 #, no-c-format msgid "While not recommended for a fresh schema, some legacy databases force your to map a single entity on several tables." msgstr "" #. Tag: para -#: basic_mapping.xml:2826 +#: basic_mapping.xml:2862 #, no-c-format msgid "Using the @SecondaryTable or @SecondaryTables class level annotations. To express that a column is in a particular table, use the table parameter of @Column or @JoinColumn." msgstr "" #. Tag: programlisting -#: basic_mapping.xml:2832 +#: basic_mapping.xml:2868 #, no-c-format msgid "" "@Entity\n" @@ -3952,49 +3964,49 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2834 +#: basic_mapping.xml:2870 #, no-c-format msgid "In this example, name will be in MainCat. storyPart1 will be in Cat1 and storyPart2 will be in Cat2. Cat1 will be joined to MainCat using the cat_id as a foreign key, and Cat2 using id (ie the same column name, the MainCat id column has). Plus a unique constraint on storyPart2 has been set." msgstr "" #. Tag: para -#: basic_mapping.xml:2844 +#: basic_mapping.xml:2880 #, no-c-format msgid "There is also additional tuning accessible via the @org.hibernate.annotations.Table annotation:" msgstr "" #. Tag: para -#: basic_mapping.xml:2850 +#: basic_mapping.xml:2886 #, no-c-format msgid "fetch: If set to JOIN, the default, Hibernate will use an inner join to retrieve a secondary table defined by a class or its superclasses and an outer join for a secondary table defined by a subclass. If set to SELECT then Hibernate will use a sequential select for a secondary table defined on a subclass, which will be issued only if a row turns out to represent an instance of the subclass. Inner joins will still be used to retrieve a secondary defined by the class and its superclasses." msgstr "" #. Tag: para -#: basic_mapping.xml:2862 +#: basic_mapping.xml:2898 #, no-c-format msgid "inverse: If true, Hibernate will not try to insert or update the properties defined by this join. Default to false." msgstr "" #. Tag: para -#: basic_mapping.xml:2868 +#: basic_mapping.xml:2904 #, no-c-format msgid "optional: If enabled (the default), Hibernate will insert a row only if the properties defined by this join are non-null and will always use an outer join to retrieve the properties." msgstr "" #. Tag: para -#: basic_mapping.xml:2875 +#: basic_mapping.xml:2911 #, no-c-format msgid "foreignKey: defines the Foreign Key name of a secondary table pointing back to the primary table." msgstr "" #. Tag: para -#: basic_mapping.xml:2880 +#: basic_mapping.xml:2916 #, no-c-format msgid "Make sure to use the secondary table name in the appliesto property" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:2883 +#: basic_mapping.xml:2919 #, no-c-format msgid "" "@Entity\n" @@ -4033,13 +4045,13 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2885 +#: basic_mapping.xml:2921 #, no-c-format msgid "In hbm.xml, use the <join> element." msgstr "" #. Tag: programlisting -#: basic_mapping.xml:2903 +#: basic_mapping.xml:2939 #, no-c-format msgid "" "<join\n" @@ -4058,37 +4070,37 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2907 +#: basic_mapping.xml:2943 #, no-c-format msgid "table: the name of the joined table." msgstr "" #. Tag: para -#: basic_mapping.xml:2924 +#: basic_mapping.xml:2960 #, no-c-format msgid "fetch (optional - defaults to join): if set to join, the default, Hibernate will use an inner join to retrieve a <join> defined by a class or its superclasses. It will use an outer join for a <join> defined by a subclass. If set to select then Hibernate will use a sequential select for a <join> defined on a subclass. This will be issued only if a row represents an instance of the subclass. Inner joins will still be used to retrieve a <join> defined by the class and its superclasses." msgstr "" #. Tag: para -#: basic_mapping.xml:2939 +#: basic_mapping.xml:2975 #, no-c-format msgid "inverse (optional - defaults to false): if enabled, Hibernate will not insert or update the properties defined by this join." msgstr "" #. Tag: para -#: basic_mapping.xml:2945 +#: basic_mapping.xml:2981 #, no-c-format msgid "optional (optional - defaults to false): if enabled, Hibernate will insert a row only if the properties defined by this join are non-null. It will always use an outer join to retrieve the properties." msgstr "" #. Tag: para -#: basic_mapping.xml:2953 +#: basic_mapping.xml:2989 #, no-c-format msgid "For example, address information for a person can be mapped to a separate table while preserving value type semantics for all properties:" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:2957 +#: basic_mapping.xml:2993 #, no-c-format msgid "" "<class name=\"Person\"\n" @@ -4106,103 +4118,103 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2959 +#: basic_mapping.xml:2995 #, no-c-format msgid "This feature is often only useful for legacy data models. We recommend fewer tables than classes and a fine-grained domain model. However, it is useful for switching between inheritance mapping strategies in a single hierarchy, as explained later." msgstr "" #. Tag: title -#: basic_mapping.xml:2967 +#: basic_mapping.xml:3003 #, no-c-format msgid "Mapping one to one and one to many associations" msgstr "" #. Tag: para -#: basic_mapping.xml:2969 +#: basic_mapping.xml:3005 #, no-c-format msgid "To link one entity to an other, you need to map the association property as a to one association. In the relational model, you can either use a foreign key or an association table, or (a bit less common) share the same primary key value between the two entities." msgstr "" #. Tag: para -#: basic_mapping.xml:2974 +#: basic_mapping.xml:3010 #, no-c-format msgid "To mark an association, use either @ManyToOne or @OnetoOne." msgstr "" #. Tag: para -#: basic_mapping.xml:2978 +#: basic_mapping.xml:3014 #, no-c-format msgid "@ManyToOne and @OneToOne have a parameter named targetEntity which describes the target entity name. You usually don't need this parameter since the default value (the type of the property that stores the association) is good in almost all cases. However this is useful when you want to use interfaces as the return type instead of the regular entity." msgstr "" #. Tag: para -#: basic_mapping.xml:2985 +#: basic_mapping.xml:3021 #, no-c-format msgid "Setting a value of the cascade attribute to any meaningful value other than nothing will propagate certain operations to the associated object. The meaningful values are divided into three categories." msgstr "" #. Tag: para -#: basic_mapping.xml:2992 +#: basic_mapping.xml:3028 #, no-c-format msgid "basic operations, which include: persist, merge, delete, save-update, evict, replicate, lock and refresh;" msgstr "" #. Tag: para -#: basic_mapping.xml:2998 +#: basic_mapping.xml:3034 #, no-c-format msgid "special values: delete-orphan or all ;" msgstr "" #. Tag: para -#: basic_mapping.xml:3003 +#: basic_mapping.xml:3039 #, no-c-format msgid "comma-separated combinations of operation names: cascade=\"persist,merge,evict\" or cascade=\"all,delete-orphan\". See for a full explanation. Note that single valued many-to-one associations do not support orphan delete." msgstr "" #. Tag: para -#: basic_mapping.xml:3012 +#: basic_mapping.xml:3048 #, no-c-format msgid "By default, single point associations are eagerly fetched in JPA 2. You can mark it as lazily fetched by using @ManyToOne(fetch=FetchType.LAZY) in which case Hibernate will proxy the association and load it when the state of the associated entity is reached. You can force Hibernate not to use a proxy by using @LazyToOne(NO_PROXY). In this case, the property is fetched lazily when the instance variable is first accessed. This requires build-time bytecode instrumentation. lazy=\"false\" specifies that the association will always be eagerly fetched." msgstr "" #. Tag: para -#: basic_mapping.xml:3022 +#: basic_mapping.xml:3058 #, no-c-format msgid "With the default JPA options, single-ended associations are loaded with a subsequent select if set to LAZY, or a SQL JOIN is used for EAGER associations. You can however adjust the fetching strategy, ie how data is fetched by using @Fetch. FetchMode can be SELECT (a select is triggered when the association needs to be loaded) or JOIN (use a SQL JOIN to load the association while loading the owner entity). JOIN overrides any lazy attribute (an association loaded through a JOIN strategy cannot be lazy)." msgstr "" #. Tag: title -#: basic_mapping.xml:3034 +#: basic_mapping.xml:3070 #, no-c-format msgid "Using a foreign key or an association table" msgstr "" #. Tag: para -#: basic_mapping.xml:3036 +#: basic_mapping.xml:3072 #, no-c-format msgid "An ordinary association to another persistent class is declared using a" msgstr "" #. Tag: para -#: basic_mapping.xml:3041 +#: basic_mapping.xml:3077 #, no-c-format msgid "@ManyToOne if several entities can point to the the target entity" msgstr "" #. Tag: para -#: basic_mapping.xml:3046 +#: basic_mapping.xml:3082 #, no-c-format msgid "@OneToOne if only a single entity can point to the the target entity" msgstr "" #. Tag: para -#: basic_mapping.xml:3051 +#: basic_mapping.xml:3087 #, no-c-format msgid "and a foreign key in one table is referencing the primary key column(s) of the target table." msgstr "" #. Tag: programlisting -#: basic_mapping.xml:3054 +#: basic_mapping.xml:3090 #, no-c-format msgid "" "@Entity\n" @@ -4217,13 +4229,13 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:3056 +#: basic_mapping.xml:3092 #, no-c-format msgid "The @JoinColumn attribute is optional, the default value(s) is the concatenation of the name of the relationship in the owner side, _ (underscore), and the name of the primary key column in the owned side. In this example company_id because the property name is company and the column id of Company is id." msgstr "" #. Tag: programlisting -#: basic_mapping.xml:3064 +#: basic_mapping.xml:3100 #, no-c-format msgid "" "@Entity\n" @@ -4242,13 +4254,13 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:3066 +#: basic_mapping.xml:3102 #, no-c-format msgid "You can also map a to one association through an association table. This association table described by the @JoinTable annotation will contains a foreign key referencing back the entity table (through @JoinTable.joinColumns) and a a foreign key referencing the target entity table (through @JoinTable.inverseJoinColumns)." msgstr "" #. Tag: programlisting -#: basic_mapping.xml:3074 +#: basic_mapping.xml:3110 #, no-c-format msgid "" "@Entity\n" @@ -4266,13 +4278,13 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:3077 +#: basic_mapping.xml:3113 #, no-c-format msgid "You can use a SQL fragment to simulate a physical join column using the @JoinColumnOrFormula / @JoinColumnOrformulas annotations (just like you can use a SQL fragment to simulate a property column via the @Formula annotation)." msgstr "" #. Tag: programlisting -#: basic_mapping.xml:3083 +#: basic_mapping.xml:3119 #, no-c-format msgid "" "@Entity\n" @@ -4287,25 +4299,25 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:3086 +#: basic_mapping.xml:3122 #, no-c-format msgid "You can mark an association as mandatory by using the optional=false attribute. We recommend to use Bean Validation's @NotNull annotation as a better alternative however. As a consequence, the foreign key column(s) will be marked as not nullable (if possible)." msgstr "" #. Tag: para -#: basic_mapping.xml:3092 +#: basic_mapping.xml:3128 #, no-c-format msgid "When Hibernate cannot resolve the association because the expected associated element is not in database (wrong id on the association column), an exception is raised. This might be inconvenient for legacy and badly maintained schemas. You can ask Hibernate to ignore such elements instead of raising an exception using the @NotFound annotation." msgstr "" #. Tag: title -#: basic_mapping.xml:3100 +#: basic_mapping.xml:3136 #, no-c-format msgid "@NotFound annotation" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:3102 +#: basic_mapping.xml:3138 #, no-c-format msgid "" "@Entity\n" @@ -4319,19 +4331,19 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:3105 +#: basic_mapping.xml:3141 #, no-c-format msgid "Sometimes you want to delegate to your database the deletion of cascade when a given entity is deleted. In this case Hibernate generates a cascade delete constraint at the database level." msgstr "" #. Tag: title -#: basic_mapping.xml:3110 +#: basic_mapping.xml:3146 #, no-c-format msgid "@OnDelete annotation" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:3112 +#: basic_mapping.xml:3148 #, no-c-format msgid "" "@Entity\n" @@ -4345,19 +4357,19 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:3115 +#: basic_mapping.xml:3151 #, no-c-format msgid "Foreign key constraints, while generated by Hibernate, have a fairly unreadable name. You can override the constraint name using @ForeignKey." msgstr "" #. Tag: title -#: basic_mapping.xml:3120 +#: basic_mapping.xml:3156 #, no-c-format msgid "@ForeignKey annotation" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:3122 +#: basic_mapping.xml:3158 #, no-c-format msgid "" "@Entity\n" @@ -4373,13 +4385,13 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:3125 +#: basic_mapping.xml:3161 #, no-c-format msgid "Sometimes, you want to link one entity to an other not by the target entity primary key but by a different unique key. You can achieve that by referencing the unique key column(s) in @JoinColumn.referenceColumnName." msgstr "" #. Tag: programlisting -#: basic_mapping.xml:3130 basic_mapping.xml:3682 +#: basic_mapping.xml:3166 basic_mapping.xml:3718 #, no-c-format msgid "" "@Entity\n" @@ -4404,19 +4416,19 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:3132 +#: basic_mapping.xml:3168 #, no-c-format msgid "This is not encouraged however and should be reserved to legacy mappings." msgstr "" #. Tag: para -#: basic_mapping.xml:3135 +#: basic_mapping.xml:3171 #, no-c-format msgid "In hbm.xml, mapping an association is similar. The main difference is that a @OneToOne is mapped as <many-to-one unique=\"true\"/>, let's dive into the subject." msgstr "" #. Tag: programlisting -#: basic_mapping.xml:3177 +#: basic_mapping.xml:3213 #, no-c-format msgid "" "<many-to-one\n" @@ -4445,163 +4457,163 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:3185 basic_mapping.xml:3868 +#: basic_mapping.xml:3221 basic_mapping.xml:3904 #, no-c-format msgid "column (optional): the name of the foreign key column. This can also be specified by nested <column> element(s)." msgstr "" #. Tag: para -#: basic_mapping.xml:3191 basic_mapping.xml:3385 +#: basic_mapping.xml:3227 basic_mapping.xml:3421 #, no-c-format msgid "class (optional - defaults to the property type determined by reflection): the name of the associated class." msgstr "" #. Tag: para -#: basic_mapping.xml:3197 basic_mapping.xml:3391 +#: basic_mapping.xml:3233 basic_mapping.xml:3427 #, no-c-format msgid "cascade (optional): specifies which operations should be cascaded from the parent object to the associated object." msgstr "" #. Tag: para -#: basic_mapping.xml:3203 basic_mapping.xml:3407 +#: basic_mapping.xml:3239 basic_mapping.xml:3443 #, no-c-format msgid "fetch (optional - defaults to select): chooses between outer-join fetching or sequential select fetching." msgstr "" #. Tag: para -#: basic_mapping.xml:3209 +#: basic_mapping.xml:3245 #, no-c-format msgid "update, insert (optional - defaults to true): specifies that the mapped columns should be included in SQL UPDATE and/or INSERT statements. Setting both to false allows a pure \"derived\" association whose value is initialized from another property that maps to the same column(s), or by a trigger or other application." msgstr "" #. Tag: para -#: basic_mapping.xml:3219 +#: basic_mapping.xml:3255 #, no-c-format msgid "property-ref (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." msgstr "" #. Tag: para -#: basic_mapping.xml:3232 +#: basic_mapping.xml:3268 #, no-c-format msgid "unique (optional): enables the DDL generation of a unique constraint for the foreign-key column. By allowing this to be the target of a property-ref, you can make the association multiplicity one-to-one." msgstr "" #. Tag: para -#: basic_mapping.xml:3240 +#: basic_mapping.xml:3276 #, no-c-format msgid "not-null (optional): enables the DDL generation of a nullability constraint for the foreign key columns." msgstr "" #. Tag: para -#: basic_mapping.xml:3254 +#: basic_mapping.xml:3290 #, no-c-format msgid "lazy (optional - defaults to proxy): by default, single point associations are proxied. lazy=\"no-proxy\" specifies that the property should be fetched lazily when the instance variable is first accessed. This requires build-time bytecode instrumentation. lazy=\"false\" specifies that the association will always be eagerly fetched." msgstr "" #. Tag: para -#: basic_mapping.xml:3264 +#: basic_mapping.xml:3300 #, no-c-format msgid "not-found (optional - defaults to exception): specifies how foreign keys that reference missing rows will be handled. ignore will treat a missing row as a null association." msgstr "" #. Tag: para -#: basic_mapping.xml:3272 basic_mapping.xml:3448 +#: basic_mapping.xml:3308 basic_mapping.xml:3484 #, no-c-format msgid "entity-name (optional): the entity name of the associated class." msgstr "" #. Tag: para -#: basic_mapping.xml:3277 +#: basic_mapping.xml:3313 #, no-c-format msgid "formula (optional): an SQL expression that defines the value for a computed foreign key." msgstr "" #. Tag: para -#: basic_mapping.xml:3284 +#: basic_mapping.xml:3320 #, no-c-format msgid "Setting a value of the cascade attribute to any meaningful value other than none will propagate certain operations to the associated object. The meaningful values are divided into three categories. First, basic operations, which include: persist, merge, delete, save-update, evict, replicate, lock and refresh; second, special values: delete-orphan; and third,all comma-separated combinations of operation names: cascade=\"persist,merge,evict\" or cascade=\"all,delete-orphan\". See for a full explanation. Note that single valued, many-to-one and one-to-one, associations do not support orphan delete." msgstr "" #. Tag: para -#: basic_mapping.xml:3298 +#: basic_mapping.xml:3334 #, no-c-format msgid "Here is an example of a typical many-to-one declaration:" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:3301 +#: basic_mapping.xml:3337 #, no-c-format msgid "<many-to-one name=\"product\" class=\"Product\" column=\"PRODUCT_ID\"/>" msgstr "" #. Tag: para -#: basic_mapping.xml:3303 +#: basic_mapping.xml:3339 #, no-c-format msgid "The property-ref attribute should only be used for mapping legacy data where a foreign key refers to a unique key of the associated table other than the primary key. This is a complicated and confusing relational model. For example, if the Product class had a unique serial number that is not the primary key. The unique attribute controls Hibernate's DDL generation with the SchemaExport tool." msgstr "" #. Tag: programlisting -#: basic_mapping.xml:3311 +#: basic_mapping.xml:3347 #, no-c-format msgid "<property name=\"serialNumber\" unique=\"true\" type=\"string\" column=\"SERIAL_NUMBER\"/>" msgstr "" #. Tag: para -#: basic_mapping.xml:3313 +#: basic_mapping.xml:3349 #, no-c-format msgid "Then the mapping for OrderItem might use:" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:3316 +#: basic_mapping.xml:3352 #, no-c-format msgid "<many-to-one name=\"product\" property-ref=\"serialNumber\" column=\"PRODUCT_SERIAL_NUMBER\"/>" msgstr "" #. Tag: para -#: basic_mapping.xml:3318 +#: basic_mapping.xml:3354 #, no-c-format msgid "This is not encouraged, however." msgstr "" #. Tag: para -#: basic_mapping.xml:3320 +#: basic_mapping.xml:3356 #, no-c-format msgid "If the referenced unique key comprises multiple properties of the associated entity, you should map the referenced properties inside a named <properties> element." msgstr "" #. Tag: para -#: basic_mapping.xml:3324 +#: basic_mapping.xml:3360 #, no-c-format msgid "If the referenced unique key is the property of a component, you can specify a property path:" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:3327 +#: basic_mapping.xml:3363 #, no-c-format msgid "<many-to-one name=\"owner\" property-ref=\"identity.ssn\" column=\"OWNER_SSN\"/>" msgstr "" #. Tag: title -#: basic_mapping.xml:3331 +#: basic_mapping.xml:3367 #, no-c-format msgid "Sharing the primary key with the associated entity" msgstr "" #. Tag: para -#: basic_mapping.xml:3333 +#: basic_mapping.xml:3369 #, no-c-format msgid "The second approach is to ensure an entity and its associated entity share the same primary key. In this case the primary key column is also a foreign key and there is no extra column. These associations are always one to one." msgstr "" #. Tag: title -#: basic_mapping.xml:3339 +#: basic_mapping.xml:3375 #, no-c-format msgid "One to One association" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:3341 +#: basic_mapping.xml:3377 #, no-c-format msgid "" "@Entity\n" @@ -4625,19 +4637,19 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:3345 +#: basic_mapping.xml:3381 #, no-c-format msgid "Many people got confused by these primary key based one to one associations. They can only be lazily loaded if Hibernate knows that the other side of the association is always present. To indicate to Hibernate that it is the case, use @OneToOne(optional=false)." msgstr "" #. Tag: para -#: basic_mapping.xml:3352 +#: basic_mapping.xml:3388 #, no-c-format msgid "In hbm.xml, use the following mapping." msgstr "" #. Tag: programlisting -#: basic_mapping.xml:3377 +#: basic_mapping.xml:3413 #, no-c-format msgid "" "<one-to-one\n" @@ -4658,61 +4670,61 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:3397 +#: basic_mapping.xml:3433 #, no-c-format msgid "constrained (optional): specifies that a foreign key constraint on the primary key of the mapped table and references the table of the associated class. This option affects the order in which save() and delete() are cascaded, and determines whether the association can be proxied. It is also used by the schema export tool." msgstr "" #. Tag: para -#: basic_mapping.xml:3413 +#: basic_mapping.xml:3449 #, no-c-format msgid "property-ref (optional): the name of a property of the associated class that is joined to the primary key of this class. If not specified, the primary key of the associated class is used." msgstr "" #. Tag: para -#: basic_mapping.xml:3426 +#: basic_mapping.xml:3462 #, no-c-format msgid "formula (optional): almost all one-to-one associations map to the primary key of the owning entity. If this is not the case, you can specify another column, columns or expression to join on using an SQL formula. See org.hibernate.test.onetooneformula for an example." msgstr "" #. Tag: para -#: basic_mapping.xml:3435 +#: basic_mapping.xml:3471 #, no-c-format msgid "lazy (optional - defaults to proxy): by default, single point associations are proxied. lazy=\"no-proxy\" specifies that the property should be fetched lazily when the instance variable is first accessed. It requires build-time bytecode instrumentation. lazy=\"false\" specifies that the association will always be eagerly fetched. Note that if constrained=\"false\", proxying is impossible and Hibernate will eagerly fetch the association." msgstr "" #. Tag: para -#: basic_mapping.xml:3454 +#: basic_mapping.xml:3490 #, no-c-format msgid "Primary key associations do not need an extra table column. If two rows are related by the association, then the two table rows share the same primary key value. To relate two objects by a primary key association, ensure that they are assigned the same identifier value." msgstr "" #. Tag: para -#: basic_mapping.xml:3460 +#: basic_mapping.xml:3496 #, no-c-format msgid "For a primary key association, add the following mappings to Employee and Person respectively:" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:3464 +#: basic_mapping.xml:3500 #, no-c-format msgid "<one-to-one name=\"person\" class=\"Person\"/>" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:3466 +#: basic_mapping.xml:3502 #, no-c-format msgid "<one-to-one name=\"employee\" class=\"Employee\" constrained=\"true\"/>" msgstr "" #. Tag: para -#: basic_mapping.xml:3468 +#: basic_mapping.xml:3504 #, no-c-format msgid "Ensure that the primary keys of the related rows in the PERSON and EMPLOYEE tables are equal. You use a special Hibernate identifier generation strategy called foreign:" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:3472 +#: basic_mapping.xml:3508 #, no-c-format msgid "" "<class name=\"person\" table=\"PERSON\">\n" @@ -4729,25 +4741,25 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:3474 +#: basic_mapping.xml:3510 #, no-c-format msgid "A newly saved instance of Person is assigned the same primary key value as the Employee instance referred with the employee property of that Person." msgstr "" #. Tag: title -#: basic_mapping.xml:3482 +#: basic_mapping.xml:3518 #, no-c-format msgid "Natural-id" msgstr "" #. Tag: para -#: basic_mapping.xml:3484 +#: basic_mapping.xml:3520 #, no-c-format msgid "Although we recommend the use of surrogate keys as primary keys, you should try to identify natural keys for all entities. A natural key is a property or combination of properties that is unique and non-null. It is also immutable. Map the properties of the natural key as @NaturalId or map them inside the <natural-id> element. Hibernate will generate the necessary unique key and nullability constraints and, as a result, your mapping will be more self-documenting." msgstr "" #. Tag: programlisting -#: basic_mapping.xml:3493 +#: basic_mapping.xml:3529 #, no-c-format msgid "" "@Entity\n" @@ -4776,13 +4788,13 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:3495 +#: basic_mapping.xml:3531 #, no-c-format msgid "Or in XML," msgstr "" #. Tag: programlisting -#: basic_mapping.xml:3497 +#: basic_mapping.xml:3533 #, no-c-format msgid "" "<natural-id mutable=\"true|false\"/>\n" @@ -4793,43 +4805,43 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:3499 +#: basic_mapping.xml:3535 #, no-c-format msgid "It is recommended that you implement equals() and hashCode() to compare the natural key properties of the entity." msgstr "" #. Tag: para -#: basic_mapping.xml:3503 +#: basic_mapping.xml:3539 #, no-c-format msgid "This mapping is not intended for use with entities that have natural primary keys." msgstr "" #. Tag: para -#: basic_mapping.xml:3508 +#: basic_mapping.xml:3544 #, no-c-format msgid "mutable (optional - defaults to false): by default, natural identifier properties are assumed to be immutable (constant)." msgstr "" #. Tag: title -#: basic_mapping.xml:3516 +#: basic_mapping.xml:3552 #, no-c-format msgid "Any" msgstr "" #. Tag: para -#: basic_mapping.xml:3518 +#: basic_mapping.xml:3554 #, no-c-format msgid "There is one more type of property mapping. The @Any mapping defines a polymorphic association to classes from multiple tables. This type of mapping requires more than one column. The first column contains the type of the associated entity. The remaining columns contain the identifier. It is impossible to specify a foreign key constraint for this kind of association. This is not the usual way of mapping polymorphic associations and you should use this only in special cases. For example, for audit logs, user session data, etc." msgstr "" #. Tag: para -#: basic_mapping.xml:3528 +#: basic_mapping.xml:3564 #, no-c-format msgid "The @Any annotation describes the column holding the metadata information. To link the value of the metadata information and an actual entity type, The @AnyDef and @AnyDefs annotations are used. The metaType attribute allows the application to specify a custom type that maps database column values to persistent classes that have identifier properties of the type specified by idType. You must specify the mapping from values of the metaType to class names." msgstr "" #. Tag: programlisting -#: basic_mapping.xml:3538 +#: basic_mapping.xml:3574 #, no-c-format msgid "" "@Any( metaColumn = @Column( name = \"property_type\" ), fetch=FetchType.EAGER )\n" @@ -4847,13 +4859,13 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:3540 +#: basic_mapping.xml:3576 #, no-c-format msgid "Note that @AnyDef can be mutualized and reused. It is recommended to place it as a package metadata in this case." msgstr "" #. Tag: programlisting -#: basic_mapping.xml:3544 +#: basic_mapping.xml:3580 #, no-c-format msgid "" "//on a package\n" @@ -4876,13 +4888,13 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:3546 +#: basic_mapping.xml:3582 #, no-c-format msgid "The hbm.xml equivalent is:" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:3548 +#: basic_mapping.xml:3584 #, no-c-format msgid "" "<any name=\"being\" id-type=\"long\" meta-type=\"string\">\n" @@ -4895,13 +4907,13 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:3551 +#: basic_mapping.xml:3587 #, no-c-format msgid "You cannot mutualize the metadata in hbm.xml as you can in annotations." msgstr "" #. Tag: programlisting -#: basic_mapping.xml:3570 +#: basic_mapping.xml:3606 #, no-c-format msgid "" "<any\n" @@ -4922,49 +4934,49 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:3574 +#: basic_mapping.xml:3610 #, no-c-format msgid "name: the property name." msgstr "" #. Tag: para -#: basic_mapping.xml:3578 +#: basic_mapping.xml:3614 #, no-c-format msgid "id-type: the identifier type." msgstr "" #. Tag: para -#: basic_mapping.xml:3582 +#: basic_mapping.xml:3618 #, no-c-format msgid "meta-type (optional - defaults to string): any type that is allowed for a discriminator mapping." msgstr "" #. Tag: para -#: basic_mapping.xml:3588 +#: basic_mapping.xml:3624 #, no-c-format msgid "cascade (optional- defaults to none): the cascade style." msgstr "" #. Tag: para -#: basic_mapping.xml:3599 +#: basic_mapping.xml:3635 #, no-c-format msgid "optimistic-lock (optional - defaults to true): specifies that updates to this property either do or do not require acquisition of the optimistic lock. It defines whether a version increment should occur if this property is dirty." msgstr "" #. Tag: title -#: basic_mapping.xml:3610 +#: basic_mapping.xml:3646 #, no-c-format msgid "Properties" msgstr "" #. Tag: para -#: basic_mapping.xml:3612 +#: basic_mapping.xml:3648 #, no-c-format msgid "The <properties> element allows the definition of a named, logical grouping of the properties of a class. The most important use of the construct is that it allows a combination of properties to be the target of a property-ref. It is also a convenient way to define a multi-column unique constraint. For example:" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:3632 +#: basic_mapping.xml:3668 #, no-c-format msgid "" "<properties\n" @@ -4982,25 +4994,25 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:3636 +#: basic_mapping.xml:3672 #, no-c-format msgid "name: the logical name of the grouping. It is not an actual property name." msgstr "" #. Tag: para -#: basic_mapping.xml:3651 +#: basic_mapping.xml:3687 #, no-c-format msgid "optimistic-lock (optional - defaults to true): specifies that updates to these properties either do or do not require acquisition of the optimistic lock. It determines if a version increment should occur when these properties are dirty." msgstr "" #. Tag: para -#: basic_mapping.xml:3666 +#: basic_mapping.xml:3702 #, no-c-format msgid "For example, if we have the following <properties> mapping:" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:3669 +#: basic_mapping.xml:3705 #, no-c-format msgid "" "<class name=\"Person\">\n" @@ -5017,13 +5029,13 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:3671 +#: basic_mapping.xml:3707 #, no-c-format msgid "You might have some legacy data association that refers to this unique key of the Person table, instead of to the primary key:" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:3675 +#: basic_mapping.xml:3711 #, no-c-format msgid "" "<many-to-one name=\"owner\"\n" @@ -5035,73 +5047,73 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:3678 +#: basic_mapping.xml:3714 #, no-c-format msgid "When using annotations as a mapping strategy, such construct is not necessary as the binding between a column and its related column on the associated table is done directly" msgstr "" #. Tag: para -#: basic_mapping.xml:3685 +#: basic_mapping.xml:3721 #, no-c-format msgid "The use of this outside the context of mapping legacy data is not recommended." msgstr "" #. Tag: title -#: basic_mapping.xml:3690 +#: basic_mapping.xml:3726 #, no-c-format msgid "Some hbm.xml specificities" msgstr "" #. Tag: para -#: basic_mapping.xml:3692 +#: basic_mapping.xml:3728 #, no-c-format msgid "The hbm.xml structure has some specificities naturally not present when using annotations, let's describe them briefly." msgstr "" #. Tag: title -#: basic_mapping.xml:3696 +#: basic_mapping.xml:3732 #, no-c-format msgid "Doctype" msgstr "" #. Tag: para -#: basic_mapping.xml:3698 +#: basic_mapping.xml:3734 #, no-c-format msgid "All XML mappings should declare the doctype shown. The actual DTD can be found at the URL above, in the directory hibernate-x.x.x/src/org/hibernate , or in hibernate3.jar. Hibernate will always look for the DTD in its classpath first. If you experience lookups of the DTD using an Internet connection, check the DTD declaration against the contents of your classpath." msgstr "" #. Tag: title -#: basic_mapping.xml:3707 +#: basic_mapping.xml:3743 #, no-c-format msgid "EntityResolver" msgstr "" #. Tag: para -#: basic_mapping.xml:3709 +#: basic_mapping.xml:3745 #, no-c-format msgid "Hibernate will first attempt to resolve DTDs in its classpath. It does this is by registering a custom org.xml.sax.EntityResolver implementation with the SAXReader it uses to read in the xml files. This custom EntityResolver recognizes two different systemId namespaces:" msgstr "" #. Tag: para -#: basic_mapping.xml:3718 +#: basic_mapping.xml:3754 #, no-c-format msgid "a hibernate namespace is recognized whenever the resolver encounters a systemId starting with http://www.hibernate.org/dtd/. The resolver attempts to resolve these entities via the classloader which loaded the Hibernate classes." msgstr "" #. Tag: para -#: basic_mapping.xml:3726 +#: basic_mapping.xml:3762 #, no-c-format msgid "a user namespace is recognized whenever the resolver encounters a systemId using a classpath:// URL protocol. The resolver will attempt to resolve these entities via (1) the current thread context classloader and (2) the classloader which loaded the Hibernate classes." msgstr "" #. Tag: para -#: basic_mapping.xml:3735 +#: basic_mapping.xml:3771 #, no-c-format msgid "The following is an example of utilizing user namespacing:" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:3738 +#: basic_mapping.xml:3774 #, no-c-format msgid "" "types.xml is a resource in the your.domain package and contains a custom typedef." msgstr "" #. Tag: title -#: basic_mapping.xml:3747 +#: basic_mapping.xml:3783 #, no-c-format msgid "Hibernate-mapping" msgstr "" #. Tag: para -#: basic_mapping.xml:3749 +#: basic_mapping.xml:3785 #, no-c-format msgid "This element has several optional attributes. The schema and catalog attributes specify that tables referred to in this mapping belong to the named schema and/or catalog. If they are specified, tablenames will be qualified by the given schema and catalog names. If they are missing, tablenames will be unqualified. The default-cascade attribute specifies what cascade style should be assumed for properties and collections that do not specify a cascade attribute. By default, the auto-import attribute allows you to use unqualified class names in the query language." msgstr "" #. Tag: programlisting -#: basic_mapping.xml:3778 +#: basic_mapping.xml:3814 #, no-c-format msgid "" "<hibernate-mapping\n" @@ -5142,73 +5154,73 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:3782 +#: basic_mapping.xml:3818 #, no-c-format msgid "schema (optional): the name of a database schema." msgstr "" #. Tag: para -#: basic_mapping.xml:3787 +#: basic_mapping.xml:3823 #, no-c-format msgid "catalog (optional): the name of a database catalog." msgstr "" #. Tag: para -#: basic_mapping.xml:3792 +#: basic_mapping.xml:3828 #, no-c-format msgid "default-cascade (optional - defaults to none): a default cascade style." msgstr "" #. Tag: para -#: basic_mapping.xml:3797 +#: basic_mapping.xml:3833 #, no-c-format msgid "default-access (optional - defaults to property): the strategy Hibernate should use for accessing all properties. It can be a custom implementation of PropertyAccessor." msgstr "" #. Tag: para -#: basic_mapping.xml:3804 +#: basic_mapping.xml:3840 #, no-c-format msgid "default-lazy (optional - defaults to true): the default value for unspecified lazy attributes of class and collection mappings." msgstr "" #. Tag: para -#: basic_mapping.xml:3811 +#: basic_mapping.xml:3847 #, no-c-format msgid "auto-import (optional - defaults to true): specifies whether we can use unqualified class names of classes in this mapping in the query language." msgstr "" #. Tag: para -#: basic_mapping.xml:3818 +#: basic_mapping.xml:3854 #, no-c-format msgid "package (optional): specifies a package prefix to use for unqualified class names in the mapping document." msgstr "" #. Tag: para -#: basic_mapping.xml:3825 +#: basic_mapping.xml:3861 #, no-c-format msgid "If you have two persistent classes with the same unqualified name, you should set auto-import=\"false\". An exception will result if you attempt to assign two classes to the same \"imported\" name." msgstr "" #. Tag: para -#: basic_mapping.xml:3830 +#: basic_mapping.xml:3866 #, no-c-format msgid "The hibernate-mapping element allows you to nest several persistent <class> mappings, as shown above. It is, however, good practice (and expected by some tools) to map only a single persistent class, or a single class hierarchy, in one mapping file and name it after the persistent superclass. For example, Cat.hbm.xml, Dog.hbm.xml, or if using inheritance, Animal.hbm.xml." msgstr "" #. Tag: title -#: basic_mapping.xml:3841 +#: basic_mapping.xml:3877 #, no-c-format msgid "Key" msgstr "" #. Tag: para -#: basic_mapping.xml:3843 +#: basic_mapping.xml:3879 #, no-c-format msgid "The <key> element is featured a few times within this guide. It appears anywhere the parent mapping element defines a join to a new table that references the primary key of the original table. It also defines the foreign key in the joined table:" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:3864 +#: basic_mapping.xml:3900 #, no-c-format msgid "" "<key\n" @@ -5222,67 +5234,67 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:3874 +#: basic_mapping.xml:3910 #, no-c-format msgid "on-delete (optional - defaults to noaction): specifies whether the foreign key constraint has database-level cascade delete enabled." msgstr "" #. Tag: para -#: basic_mapping.xml:3880 +#: basic_mapping.xml:3916 #, no-c-format msgid "property-ref (optional): specifies that the foreign key refers to columns that are not the primary key of the original table. It is provided for legacy data." msgstr "" #. Tag: para -#: basic_mapping.xml:3886 +#: basic_mapping.xml:3922 #, no-c-format msgid "not-null (optional): specifies that the foreign key columns are not nullable. This is implied whenever the foreign key is also part of the primary key." msgstr "" #. Tag: para -#: basic_mapping.xml:3892 +#: basic_mapping.xml:3928 #, no-c-format msgid "update (optional): specifies that the foreign key should never be updated. This is implied whenever the foreign key is also part of the primary key." msgstr "" #. Tag: para -#: basic_mapping.xml:3898 +#: basic_mapping.xml:3934 #, no-c-format msgid "unique (optional): specifies that the foreign key should have a unique constraint. This is implied whenever the foreign key is also the primary key." msgstr "" #. Tag: para -#: basic_mapping.xml:3905 +#: basic_mapping.xml:3941 #, no-c-format msgid "For systems where delete performance is important, we recommend that all keys should be defined on-delete=\"cascade\". Hibernate uses a database-level ON CASCADE DELETE constraint, instead of many individual DELETE statements. Be aware that this feature bypasses Hibernate's usual optimistic locking strategy for versioned data." msgstr "" #. Tag: para -#: basic_mapping.xml:3913 +#: basic_mapping.xml:3949 #, no-c-format msgid "The not-null and update attributes are useful when mapping a unidirectional one-to-many association. If you map a unidirectional one-to-many association to a non-nullable foreign key, you must declare the key column using <key not-null=\"true\">." msgstr "" #. Tag: title -#: basic_mapping.xml:3922 +#: basic_mapping.xml:3958 #, no-c-format msgid "Import" msgstr "" #. Tag: para -#: basic_mapping.xml:3924 +#: basic_mapping.xml:3960 #, no-c-format msgid "If your application has two persistent classes with the same name, and you do not want to specify the fully qualified package name in Hibernate queries, classes can be \"imported\" explicitly, rather than relying upon auto-import=\"true\". You can also import classes and interfaces that are not explicitly mapped:" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:3930 +#: basic_mapping.xml:3966 #, no-c-format msgid "<import class=\"java.lang.Object\" rename=\"Universe\"/>" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:3939 +#: basic_mapping.xml:3975 #, no-c-format msgid "" "<import\n" @@ -5292,37 +5304,37 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:3943 +#: basic_mapping.xml:3979 #, no-c-format msgid "class: the fully qualified class name of any Java class." msgstr "" #. Tag: para -#: basic_mapping.xml:3948 +#: basic_mapping.xml:3984 #, no-c-format msgid "rename (optional - defaults to the unqualified class name): a name that can be used in the query language." msgstr "" #. Tag: para -#: basic_mapping.xml:3956 +#: basic_mapping.xml:3992 #, no-c-format msgid "This feature is unique to hbm.xml and is not supported in annotations." msgstr "" #. Tag: title -#: basic_mapping.xml:3962 +#: basic_mapping.xml:3998 #, no-c-format msgid "Column and formula elements" msgstr "" #. Tag: para -#: basic_mapping.xml:3964 +#: basic_mapping.xml:4000 #, no-c-format msgid "Mapping elements which accept a column attribute will alternatively accept a <column> subelement. Likewise, <formula> is an alternative to the formula attribute. For example:" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:3970 +#: basic_mapping.xml:4006 #, no-c-format msgid "" "<column\n" @@ -5342,25 +5354,25 @@ msgid "" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:3972 +#: basic_mapping.xml:4008 #, no-c-format msgid "<formula>SQL expression</formula>" msgstr "" #. Tag: para -#: basic_mapping.xml:3974 +#: basic_mapping.xml:4010 #, no-c-format msgid "Most of the attributes on column provide a means of tailoring the DDL during automatic schema generation. The read and write attributes allow you to specify custom SQL that Hibernate will use to access the column's value. For more on this, see the discussion of column read and write expressions." msgstr "" #. Tag: para -#: basic_mapping.xml:3982 +#: basic_mapping.xml:4018 #, no-c-format msgid "The column and formula elements can even be combined within the same property or association mapping to express, for example, exotic join conditions." msgstr "" #. Tag: programlisting -#: basic_mapping.xml:3986 +#: basic_mapping.xml:4022 #, no-c-format msgid "" "<many-to-one name=\"homeAddress\" class=\"Address\"\n" @@ -5371,247 +5383,283 @@ msgid "" msgstr "" #. Tag: title -#: basic_mapping.xml:3992 +#: basic_mapping.xml:4028 #, no-c-format msgid "Hibernate types" msgstr "" #. Tag: title -#: basic_mapping.xml:3995 +#: basic_mapping.xml:4031 #, no-c-format msgid "Entities and values" msgstr "" #. Tag: para -#: basic_mapping.xml:3997 +#: basic_mapping.xml:4033 #, no-c-format msgid "In relation to the persistence service, Java language-level objects are classified into two groups:" msgstr "" #. Tag: para -#: basic_mapping.xml:4000 +#: basic_mapping.xml:4036 #, no-c-format msgid "An entity exists independently of any other objects holding references to the entity. Contrast this with the usual Java model, where an unreferenced object is garbage collected. Entities must be explicitly saved and deleted. Saves and deletions, however, can be cascaded from a parent entity to its children. This is different from the ODMG model of object persistence by reachability and corresponds more closely to how application objects are usually used in large systems. Entities support circular and shared references. They can also be versioned." msgstr "" #. Tag: para -#: basic_mapping.xml:4010 +#: basic_mapping.xml:4046 #, no-c-format msgid "An entity's persistent state consists of references to other entities and instances of value types. Values are primitives: collections (not what is inside a collection), components and certain immutable objects. Unlike entities, values in particular collections and components, are persisted and deleted by reachability. Since value objects and primitives are persisted and deleted along with their containing entity, they cannot be independently versioned. Values have no independent identity, so they cannot be shared by two entities or collections." msgstr "" #. Tag: para -#: basic_mapping.xml:4020 +#: basic_mapping.xml:4056 #, no-c-format msgid "Until now, we have been using the term \"persistent class\" to refer to entities. We will continue to do that. Not all user-defined classes with a persistent state, however, are entities. A component is a user-defined class with value semantics. A Java property of type java.lang.String also has value semantics. Given this definition, all types (classes) provided by the JDK have value type semantics in Java, while user-defined types can be mapped with entity or value type semantics. This decision is up to the application developer. An entity class in a domain model will normally have shared references to a single instance of that class, while composition or aggregation usually translates to a value type." msgstr "" #. Tag: para -#: basic_mapping.xml:4033 +#: basic_mapping.xml:4069 #, no-c-format msgid "We will revisit both concepts throughout this reference guide." msgstr "" #. Tag: para -#: basic_mapping.xml:4036 +#: basic_mapping.xml:4072 #, no-c-format msgid "The challenge is to map the Java type system, and the developers' definition of entities and value types, to the SQL/database type system. The bridge between both systems is provided by Hibernate. For entities, <class>, <subclass> and so on are used. For value types we use <property>, <component>etc., that usually have a type attribute. The value of this attribute is the name of a Hibernate mapping type. Hibernate provides a range of mappings for standard JDK value types out of the box. You can write your own mapping types and implement your own custom conversion strategies." msgstr "" #. Tag: para -#: basic_mapping.xml:4049 +#: basic_mapping.xml:4085 #, no-c-format msgid "With the exception of collections, all built-in Hibernate types support null semantics." msgstr "" #. Tag: title -#: basic_mapping.xml:4054 +#: basic_mapping.xml:4090 #, no-c-format msgid "Basic value types" msgstr "" #. Tag: para -#: basic_mapping.xml:4056 +#: basic_mapping.xml:4092 #, no-c-format msgid "The built-in basic mapping types can be roughly categorized into the following:" msgstr "" #. Tag: literal -#: basic_mapping.xml:4059 +#: basic_mapping.xml:4095 #, no-c-format msgid "integer, long, short, float, double, character, byte, boolean, yes_no, true_false" msgstr "" #. Tag: para -#: basic_mapping.xml:4063 +#: basic_mapping.xml:4099 #, no-c-format msgid "Type mappings from Java primitives or wrapper classes to appropriate (vendor-specific) SQL column types. boolean, yes_no and true_false are all alternative encodings for a Java boolean or java.lang.Boolean." msgstr "" #. Tag: literal -#: basic_mapping.xml:4073 +#: basic_mapping.xml:4109 #, no-c-format msgid "string" msgstr "" #. Tag: para -#: basic_mapping.xml:4076 +#: basic_mapping.xml:4112 #, no-c-format msgid "A type mapping from java.lang.String to VARCHAR (or Oracle VARCHAR2)." msgstr "" #. Tag: literal -#: basic_mapping.xml:4083 +#: basic_mapping.xml:4119 #, no-c-format msgid "date, time, timestamp" msgstr "" #. Tag: para -#: basic_mapping.xml:4086 +#: basic_mapping.xml:4122 #, no-c-format msgid "Type mappings from java.util.Date and its subclasses to SQL types DATE, TIME and TIMESTAMP (or equivalent)." msgstr "" #. Tag: literal -#: basic_mapping.xml:4094 +#: basic_mapping.xml:4130 #, no-c-format msgid "calendar, calendar_date" msgstr "" #. Tag: para -#: basic_mapping.xml:4097 +#: basic_mapping.xml:4133 #, no-c-format msgid "Type mappings from java.util.Calendar to SQL types TIMESTAMP and DATE (or equivalent)." msgstr "" #. Tag: literal -#: basic_mapping.xml:4104 +#: basic_mapping.xml:4140 #, no-c-format msgid "big_decimal, big_integer" msgstr "" #. Tag: para -#: basic_mapping.xml:4107 +#: basic_mapping.xml:4143 #, no-c-format msgid "Type mappings from java.math.BigDecimal and java.math.BigInteger to NUMERIC (or Oracle NUMBER)." msgstr "" #. Tag: literal -#: basic_mapping.xml:4115 +#: basic_mapping.xml:4151 #, no-c-format msgid "locale, timezone, currency" msgstr "" #. Tag: para -#: basic_mapping.xml:4118 +#: basic_mapping.xml:4154 #, no-c-format msgid "Type mappings from java.util.Locale, java.util.TimeZone and java.util.Currency to VARCHAR (or Oracle VARCHAR2). Instances of Locale and Currency are mapped to their ISO codes. Instances of TimeZone are mapped to their ID." msgstr "" #. Tag: literal -#: basic_mapping.xml:4131 +#: basic_mapping.xml:4167 #, no-c-format msgid "class" msgstr "" #. Tag: para -#: basic_mapping.xml:4134 +#: basic_mapping.xml:4170 #, no-c-format msgid "A type mapping from java.lang.Class to VARCHAR (or Oracle VARCHAR2). A Class is mapped to its fully qualified name." msgstr "" #. Tag: literal -#: basic_mapping.xml:4142 +#: basic_mapping.xml:4178 #, no-c-format msgid "binary" msgstr "" #. Tag: para -#: basic_mapping.xml:4145 +#: basic_mapping.xml:4181 #, no-c-format msgid "Maps byte arrays to an appropriate SQL binary type." msgstr "" #. Tag: literal -#: basic_mapping.xml:4150 +#: basic_mapping.xml:4186 #, no-c-format msgid "text" msgstr "" #. Tag: para -#: basic_mapping.xml:4153 +#: basic_mapping.xml:4189 #, no-c-format -msgid "Maps long Java strings to a SQL CLOB or TEXT type." +msgid "Maps long Java strings to a SQL LONGVARCHAR or TEXT type." msgstr "" #. Tag: literal -#: basic_mapping.xml:4159 +#: basic_mapping.xml:4195 +#, no-c-format +msgid "image" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:4198 +#, no-c-format +msgid "Maps long byte arrays to a SQL LONGVARBINARY." +msgstr "" + +#. Tag: literal +#: basic_mapping.xml:4203 #, no-c-format msgid "serializable" msgstr "" #. Tag: para -#: basic_mapping.xml:4162 +#: basic_mapping.xml:4206 #, no-c-format msgid "Maps serializable Java types to an appropriate SQL binary type. You can also indicate the Hibernate type serializable with the name of a serializable Java class or interface that does not default to a basic type." msgstr "" #. Tag: literal -#: basic_mapping.xml:4171 +#: basic_mapping.xml:4215 #, no-c-format msgid "clob, blob" msgstr "" #. Tag: para -#: basic_mapping.xml:4174 +#: basic_mapping.xml:4218 #, no-c-format msgid "Type mappings for the JDBC classes java.sql.Clob and java.sql.Blob. These types can be inconvenient for some applications, since the blob or clob object cannot be reused outside of a transaction. Driver support is patchy and inconsistent." msgstr "" #. Tag: literal -#: basic_mapping.xml:4184 +#: basic_mapping.xml:4228 +#, no-c-format +msgid "materialized_clob" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:4231 +#, no-c-format +msgid "Maps long Java strings to a SQL CLOB type. When read, the CLOB value is immediately materialized into a Java string. Some drivers require the CLOB value to be read within a transaction. Once materialized, the Java string is available outside of the transaction." +msgstr "" + +#. Tag: literal +#: basic_mapping.xml:4241 +#, no-c-format +msgid "materialized_blob" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:4244 +#, no-c-format +msgid "Maps long Java byte arrays to a SQL BLOB type. When read, the BLOB value is immediately materialized into a byte array. Some drivers require the BLOB value to be read within a transaction. Once materialized, the byte array is available outside of the transaction." +msgstr "" + +#. Tag: literal +#: basic_mapping.xml:4254 #, no-c-format msgid "imm_date, imm_time, imm_timestamp, imm_calendar, imm_calendar_date, imm_serializable, imm_binary" msgstr "" #. Tag: para -#: basic_mapping.xml:4188 +#: basic_mapping.xml:4258 #, no-c-format msgid "Type mappings for what are considered mutable Java types. This is where Hibernate makes certain optimizations appropriate only for immutable Java types, and the application treats the object as immutable. For example, you should not call Date.setTime() for an instance mapped as imm_timestamp. To change the value of the property, and have that change made persistent, the application must assign a new, nonidentical, object to the property." msgstr "" #. Tag: para -#: basic_mapping.xml:4200 +#: basic_mapping.xml:4270 #, no-c-format msgid "Unique identifiers of entities and collections can be of any basic type except binary, blob and clob. Composite identifiers are also allowed. See below for more information." msgstr "" #. Tag: para -#: basic_mapping.xml:4205 +#: basic_mapping.xml:4275 #, no-c-format msgid "The basic value types have corresponding Type constants defined on org.hibernate.Hibernate. For example, Hibernate.STRING represents the string type." msgstr "" #. Tag: title -#: basic_mapping.xml:4212 +#: basic_mapping.xml:4282 #, no-c-format msgid "Custom value types" msgstr "" #. Tag: para -#: basic_mapping.xml:4214 +#: basic_mapping.xml:4284 #, no-c-format msgid "It is relatively easy for developers to create their own value types. For example, you might want to persist properties of type java.lang.BigInteger to VARCHAR columns. Hibernate does not provide a built-in type for this. Custom types are not limited to mapping a property, or collection element, to a single table column. So, for example, you might have a Java property getName()/setName() of type java.lang.String that is persisted to the columns FIRST_NAME, INITIAL, SURNAME." msgstr "" #. Tag: para -#: basic_mapping.xml:4225 +#: basic_mapping.xml:4295 #, no-c-format msgid "To implement a custom type, implement either org.hibernate.UserType or org.hibernate.CompositeUserType and declare properties using the fully qualified classname of the type. View org.hibernate.test.DoubleStringType to see the kind of things that are possible." msgstr "" #. Tag: programlisting -#: basic_mapping.xml:4232 +#: basic_mapping.xml:4302 #, no-c-format msgid "" "<property name=\"twoStrings\" type=\"org.hibernate.test.DoubleStringType\">\n" @@ -5621,25 +5669,25 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:4234 +#: basic_mapping.xml:4304 #, no-c-format msgid "Notice the use of <column> tags to map a property to multiple columns." msgstr "" #. Tag: para -#: basic_mapping.xml:4237 +#: basic_mapping.xml:4307 #, no-c-format msgid "The CompositeUserType, EnhancedUserType, UserCollectionType, and UserVersionType interfaces provide support for more specialized uses." msgstr "" #. Tag: para -#: basic_mapping.xml:4243 +#: basic_mapping.xml:4313 #, no-c-format msgid "You can even supply parameters to a UserType in the mapping file. To do this, your UserType must implement the org.hibernate.usertype.ParameterizedType interface. To supply parameters to your custom type, you can use the <type> element in your mapping files." msgstr "" #. Tag: programlisting -#: basic_mapping.xml:4250 +#: basic_mapping.xml:4320 #, no-c-format msgid "" "<property name=\"priority\">\n" @@ -5650,19 +5698,19 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:4252 +#: basic_mapping.xml:4322 #, no-c-format msgid "The UserType can now retrieve the value for the parameter named default from the Properties object passed to it." msgstr "" #. Tag: para -#: basic_mapping.xml:4256 +#: basic_mapping.xml:4326 #, no-c-format msgid "If you regularly use a certain UserType, it is useful to define a shorter name for it. You can do this using the <typedef> element. Typedefs assign a name to a custom type, and can also contain a list of default parameter values if the type is parameterized." msgstr "" #. Tag: programlisting -#: basic_mapping.xml:4262 +#: basic_mapping.xml:4332 #, no-c-format msgid "" "<typedef class=\"com.mycompany.usertypes.DefaultValueIntegerType\" name=\"default_zero\">\n" @@ -5671,37 +5719,37 @@ msgid "" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:4264 +#: basic_mapping.xml:4334 #, no-c-format msgid "<property name=\"priority\" type=\"default_zero\"/>" msgstr "" #. Tag: para -#: basic_mapping.xml:4266 +#: basic_mapping.xml:4336 #, no-c-format msgid "It is also possible to override the parameters supplied in a typedef on a case-by-case basis by using type parameters on the property mapping." msgstr "" #. Tag: para -#: basic_mapping.xml:4270 +#: basic_mapping.xml:4340 #, no-c-format msgid "Even though Hibernate's rich range of built-in types and support for components means you will rarely need to use a custom type, it is considered good practice to use custom types for non-entity classes that occur frequently in your application. For example, a MonetaryAmount class is a good candidate for a CompositeUserType, even though it could be mapped as a component. One reason for this is abstraction. With a custom type, your mapping documents would be protected against changes to the way monetary values are represented." msgstr "" #. Tag: title -#: basic_mapping.xml:4283 +#: basic_mapping.xml:4353 #, no-c-format msgid "Mapping a class more than once" msgstr "" #. Tag: para -#: basic_mapping.xml:4285 +#: basic_mapping.xml:4355 #, no-c-format msgid "It is possible to provide more than one mapping for a particular persistent class. In this case, you must specify an entity name to disambiguate between instances of the two mapped entities. By default, the entity name is the same as the class name. Hibernate lets you specify the entity name when working with persistent objects, when writing queries, or when mapping associations to the named entity." msgstr "" #. Tag: programlisting -#: basic_mapping.xml:4293 +#: basic_mapping.xml:4363 #, no-c-format msgid "" "<class name=\"Contract\" table=\"Contracts\"\n" @@ -5724,31 +5772,31 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:4295 +#: basic_mapping.xml:4365 #, no-c-format msgid "Associations are now specified using entity-name instead of class." msgstr "" #. Tag: para -#: basic_mapping.xml:4299 basic_mapping.xml:4379 basic_mapping.xml:4414 +#: basic_mapping.xml:4369 basic_mapping.xml:4497 #, no-c-format msgid "This feature is not supported in Annotations" msgstr "" #. Tag: title -#: basic_mapping.xml:4304 +#: basic_mapping.xml:4374 #, no-c-format msgid "SQL quoted identifiers" msgstr "" #. Tag: para -#: basic_mapping.xml:4306 +#: basic_mapping.xml:4376 #, no-c-format msgid "You can force Hibernate to quote an identifier in the generated SQL by enclosing the table or column name in backticks in the mapping document. Hibernate will use the correct quotation style for the SQL Dialect. This is usually double quotes, but the SQL Server uses brackets and MySQL uses backticks." msgstr "" #. Tag: programlisting -#: basic_mapping.xml:4312 +#: basic_mapping.xml:4382 #, no-c-format msgid "" "@Entity @Table(name=\"`Line Item`\")\n" @@ -5765,61 +5813,83 @@ msgid "" msgstr "" #. Tag: title -#: basic_mapping.xml:4316 +#: basic_mapping.xml:4386 #, no-c-format msgid "Generated properties" msgstr "" #. Tag: para -#: basic_mapping.xml:4318 +#: basic_mapping.xml:4388 #, no-c-format msgid "Generated properties are properties that have their values generated by the database. Typically, Hibernate applications needed to refresh objects that contain any properties for which the database was generating values. Marking properties as generated, however, lets the application delegate this responsibility to Hibernate. When Hibernate issues an SQL INSERT or UPDATE for an entity that has defined generated properties, it immediately issues a select afterwards to retrieve the generated values." msgstr "" #. Tag: para -#: basic_mapping.xml:4327 +#: basic_mapping.xml:4397 #, no-c-format msgid "Properties marked as generated must additionally be non-insertable and non-updateable. Only versions, timestamps, and simple properties, can be marked as generated." msgstr "" #. Tag: para -#: basic_mapping.xml:4334 +#: basic_mapping.xml:4404 #, no-c-format msgid "never (the default): the given property value is not generated within the database." msgstr "" #. Tag: para -#: basic_mapping.xml:4337 +#: basic_mapping.xml:4407 #, no-c-format msgid "insert: the given property value is generated on insert, but is not regenerated on subsequent updates. Properties like created-date fall into this category. Even though version and timestamp properties can be marked as generated, this option is not available." msgstr "" #. Tag: para -#: basic_mapping.xml:4344 +#: basic_mapping.xml:4414 #, no-c-format msgid "always: the property value is generated both on insert and on update." msgstr "" #. Tag: para -#: basic_mapping.xml:4347 +#: basic_mapping.xml:4417 #, no-c-format msgid "To mark a property as generated, use @Generated." msgstr "" #. Tag: title -#: basic_mapping.xml:4352 +#: basic_mapping.xml:4422 #, no-c-format -msgid "Column read and write expressions" +msgid "Column transformers: read and write expressions" msgstr "" #. Tag: para -#: basic_mapping.xml:4354 +#: basic_mapping.xml:4424 #, no-c-format msgid "Hibernate allows you to customize the SQL it uses to read and write the values of columns mapped to simple properties. For example, if your database provides a set of data encryption functions, you can invoke them for individual columns like this:" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:4359 +#: basic_mapping.xml:4430 +#, no-c-format +msgid "" + "@Entity\n" + "class CreditCard {\n" + " @Column(name=\"credit_card_num\")\n" + " @ColumnTransformer(\n" + " read=\"decrypt(credit_card_num)\", \n" + " write=\"encrypt(?)\")\n" + " public String getCreditCardNumber() { return creditCardNumber; }\n" + " public void setCreditCardNumber(String number) { this.creditCardNumber = number; }\n" + " private String creditCardNumber;\n" + "}" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:4432 +#, no-c-format +msgid "or in XML" +msgstr "" + +#. Tag: programlisting +#: basic_mapping.xml:4434 #, no-c-format msgid "" "<property name=\"creditCardNumber\">\n" @@ -5831,49 +5901,81 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:4361 +#: basic_mapping.xml:4437 +#, no-c-format +msgid "You can use the plural form @ColumnTransformers if more than one columns need to define either of these rules." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:4442 +#, no-c-format +msgid "If a property uses more that one column, you must use the forColumn attribute to specify which column, the expressions are targeting." +msgstr "" + +#. Tag: programlisting +#: basic_mapping.xml:4446 +#, no-c-format +msgid "" + "@Entity\n" + "class User {\n" + " @Type(type=\"com.acme.type.CreditCardType\")\n" + " @Columns( {\n" + " @Column(name=\"credit_card_num\"),\n" + " @Column(name=\"exp_date\") } )\n" + " @ColumnTransformer(\n" + " forColumn=\"credit_card_num\", \n" + " read=\"decrypt(credit_card_num)\", \n" + " write=\"encrypt(?)\")\n" + " public CreditCard getCreditCard() { return creditCard; }\n" + " public void setCreditCard(CreditCard card) { this.creditCard = card; }\n" + " private CreditCard creditCard;\n" + "}" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:4448 #, no-c-format msgid "Hibernate applies the custom expressions automatically whenever the property is referenced in a query. This functionality is similar to a derived-property formula with two differences:" msgstr "" #. Tag: para -#: basic_mapping.xml:4366 +#: basic_mapping.xml:4453 #, no-c-format msgid "The property is backed by one or more columns that are exported as part of automatic schema generation." msgstr "" #. Tag: para -#: basic_mapping.xml:4371 +#: basic_mapping.xml:4458 #, no-c-format msgid "The property is read-write, not read-only." msgstr "" #. Tag: para -#: basic_mapping.xml:4375 +#: basic_mapping.xml:4462 #, no-c-format msgid "The write expression, if specified, must contain exactly one '?' placeholder for the value." msgstr "" #. Tag: title -#: basic_mapping.xml:4384 +#: basic_mapping.xml:4467 #, no-c-format msgid "Auxiliary database objects" msgstr "" #. Tag: para -#: basic_mapping.xml:4386 +#: basic_mapping.xml:4469 #, no-c-format msgid "Auxiliary database objects allow for the CREATE and DROP of arbitrary database objects. In conjunction with Hibernate's schema evolution tools, they have the ability to fully define a user schema within the Hibernate mapping files. Although designed specifically for creating and dropping things like triggers or stored procedures, any SQL command that can be run via a java.sql.Statement.execute() method is valid (for example, ALTERs, INSERTS, etc.). There are essentially two modes for defining auxiliary database objects:" msgstr "" #. Tag: para -#: basic_mapping.xml:4396 +#: basic_mapping.xml:4479 #, no-c-format msgid "The first mode is to explicitly list the CREATE and DROP commands in the mapping file:" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:4399 +#: basic_mapping.xml:4482 #, no-c-format msgid "" "<hibernate-mapping>\n" @@ -5886,13 +5988,13 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:4401 +#: basic_mapping.xml:4484 #, no-c-format msgid "The second mode is to supply a custom class that constructs the CREATE and DROP commands. This custom class must implement the org.hibernate.mapping.AuxiliaryDatabaseObject interface." msgstr "" #. Tag: programlisting -#: basic_mapping.xml:4406 +#: basic_mapping.xml:4489 #, no-c-format msgid "" "<hibernate-mapping>\n" @@ -5904,13 +6006,13 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:4408 +#: basic_mapping.xml:4491 #, no-c-format msgid "Additionally, these database objects can be optionally scoped so that they only apply when certain dialects are used." msgstr "" #. Tag: programlisting -#: basic_mapping.xml:4411 +#: basic_mapping.xml:4494 #, no-c-format msgid "" "<hibernate-mapping>\n" diff --git a/documentation/manual/src/main/docbook/pot/content/type.pot b/documentation/manual/src/main/docbook/pot/content/type.pot index 1611f25c4f..de2d4249a8 100644 --- a/documentation/manual/src/main/docbook/pot/content/type.pot +++ b/documentation/manual/src/main/docbook/pot/content/type.pot @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: http://bugs.kde.org\n" -"POT-Creation-Date: 2010-07-21 04:35+0000\n" +"POT-Creation-Date: 2011-01-21 21:18+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -611,377 +611,431 @@ msgstr "" #. Tag: classname #: type.xml:456 #, no-c-format -msgid "java.lang.Class" +msgid "java.net.URL" msgstr "" #. Tag: classname #: type.xml:459 #, no-c-format -msgid "org.hibernate.type.ClassType" +msgid "org.hibernate.type.UrlType" msgstr "" #. Tag: para #: type.xml:461 #, no-c-format -msgid "Maps a java.lang.Class to a JDBC VARCHAR (using the Class name)" +msgid "Maps a java.net.URL to a JDBC VARCHAR (using the external form)" msgstr "" #. Tag: para #: type.xml:464 #, no-c-format -msgid "Registered under class and java.lang.Class in the type registry (see )." +msgid "Registered under url and java.net.URL in the type registry (see )." msgstr "" #. Tag: classname #: type.xml:473 #, no-c-format -msgid "java.sql.Blob" +msgid "java.lang.Class" msgstr "" #. Tag: classname #: type.xml:476 #, no-c-format -msgid "org.hibernate.type.BlobType" +msgid "org.hibernate.type.ClassType" msgstr "" #. Tag: para #: type.xml:478 #, no-c-format -msgid "Maps a java.sql.Blob to a JDBC BLOB" +msgid "Maps a java.lang.Class to a JDBC VARCHAR (using the Class name)" msgstr "" #. Tag: para #: type.xml:481 #, no-c-format -msgid "Registered under blob and java.sql.Blob in the type registry (see )." +msgid "Registered under class and java.lang.Class in the type registry (see )." msgstr "" #. Tag: classname #: type.xml:490 #, no-c-format -msgid "java.sql.Clob" +msgid "java.sql.Blob" msgstr "" #. Tag: classname #: type.xml:493 #, no-c-format -msgid "org.hibernate.type.ClobType" +msgid "org.hibernate.type.BlobType" msgstr "" #. Tag: para #: type.xml:495 #, no-c-format -msgid "Maps a java.sql.Clob to a JDBC CLOB" +msgid "Maps a java.sql.Blob to a JDBC BLOB" msgstr "" #. Tag: para #: type.xml:498 #, no-c-format -msgid "Registered under clob and java.sql.Clob in the type registry (see )." -msgstr "" - -#. Tag: title -#: type.xml:507 type.xml:536 -#, no-c-format -msgid "byte[]" +msgid "Registered under blob and java.sql.Blob in the type registry (see )." msgstr "" #. Tag: classname -#: type.xml:510 type.xml:539 +#: type.xml:507 #, no-c-format -msgid "org.hibernate.type.BinaryType" +msgid "java.sql.Clob" +msgstr "" + +#. Tag: classname +#: type.xml:510 +#, no-c-format +msgid "org.hibernate.type.ClobType" msgstr "" #. Tag: para #: type.xml:512 #, no-c-format -msgid "Maps a primitive byte[] to a JDBC VARBINARY" +msgid "Maps a java.sql.Clob to a JDBC CLOB" msgstr "" #. Tag: para #: type.xml:515 #, no-c-format +msgid "Registered under clob and java.sql.Clob in the type registry (see )." +msgstr "" + +#. Tag: title +#: type.xml:524 +#, no-c-format +msgid "byte[]" +msgstr "" + +#. Tag: classname +#: type.xml:527 type.xml:568 +#, no-c-format +msgid "org.hibernate.type.BinaryType" +msgstr "" + +#. Tag: para +#: type.xml:529 +#, no-c-format +msgid "Maps a primitive byte[] to a JDBC VARBINARY" +msgstr "" + +#. Tag: para +#: type.xml:532 +#, no-c-format msgid "Registered under binary and byte[] in the type registry (see )." msgstr "" #. Tag: classname -#: type.xml:522 +#: type.xml:539 #, no-c-format msgid "org.hibernate.type.MaterializedBlobType" msgstr "" #. Tag: para -#: type.xml:524 +#: type.xml:541 #, no-c-format msgid "Maps a primitive byte[] to a JDBC BLOB" msgstr "" #. Tag: para -#: type.xml:527 +#: type.xml:544 #, no-c-format msgid "Registered under materialized_blob in the type registry (see )." msgstr "" +#. Tag: classname +#: type.xml:551 +#, no-c-format +msgid "org.hibernate.type.ImageType" +msgstr "" + #. Tag: para -#: type.xml:541 +#: type.xml:553 +#, no-c-format +msgid "Maps a primitive byte[] to a JDBC LONGVARBINARY" +msgstr "" + +#. Tag: para +#: type.xml:556 +#, no-c-format +msgid "Registered under image in the type registry (see )." +msgstr "" + +#. Tag: title +#: type.xml:565 +#, no-c-format +msgid "Byte[]" +msgstr "" + +#. Tag: para +#: type.xml:570 #, no-c-format msgid "Maps a java.lang.Byte[] to a JDBC VARBINARY" msgstr "" #. Tag: para -#: type.xml:544 +#: type.xml:573 #, no-c-format msgid "Registered under wrapper-binary, Byte[] and java.lang.Byte[] in the type registry (see )." msgstr "" #. Tag: title -#: type.xml:553 type.xml:570 +#: type.xml:582 #, no-c-format msgid "char[]" msgstr "" #. Tag: classname -#: type.xml:556 +#: type.xml:585 #, no-c-format msgid "org.hibernate.type.CharArrayType" msgstr "" #. Tag: para -#: type.xml:558 +#: type.xml:587 #, no-c-format msgid "Maps a char[] to a JDBC VARCHAR" msgstr "" #. Tag: para -#: type.xml:561 +#: type.xml:590 #, no-c-format msgid "Registered under characters and char[] in the type registry (see )." msgstr "" -#. Tag: classname -#: type.xml:573 +#. Tag: title +#: type.xml:599 #, no-c-format -msgid "org.hibernate.type.CharacterArrayType" -msgstr "" - -#. Tag: para -#: type.xml:575 -#, no-c-format -msgid "Maps a java.lang.Character[] to a JDBC VARCHAR" -msgstr "" - -#. Tag: para -#: type.xml:578 -#, no-c-format -msgid "Registered under wrapper-characters, Character[] and java.lang.Character[] in the type registry (see )." -msgstr "" - -#. Tag: classname -#: type.xml:587 -#, no-c-format -msgid "java.util.UUID" -msgstr "" - -#. Tag: classname -#: type.xml:590 -#, no-c-format -msgid "org.hibernate.type.UUIDBinaryType" -msgstr "" - -#. Tag: para -#: type.xml:592 -#, no-c-format -msgid "Maps a java.util.UUID to a JDBC BINARY" -msgstr "" - -#. Tag: para -#: type.xml:595 -#, no-c-format -msgid "Registered under uuid-binary and java.util.UUID in the type registry (see )." +msgid "Character[]" msgstr "" #. Tag: classname #: type.xml:602 #, no-c-format -msgid "org.hibernate.type.UUIDCharType" +msgid "org.hibernate.type.CharacterArrayType" msgstr "" #. Tag: para #: type.xml:604 #, no-c-format -msgid "Maps a java.util.UUID to a JDBC CHAR (though VARCHAR is fine too for existing schemas)" +msgid "Maps a java.lang.Character[] to a JDBC VARCHAR" msgstr "" #. Tag: para #: type.xml:607 #, no-c-format +msgid "Registered under wrapper-characters, Character[] and java.lang.Character[] in the type registry (see )." +msgstr "" + +#. Tag: classname +#: type.xml:616 +#, no-c-format +msgid "java.util.UUID" +msgstr "" + +#. Tag: classname +#: type.xml:619 +#, no-c-format +msgid "org.hibernate.type.UUIDBinaryType" +msgstr "" + +#. Tag: para +#: type.xml:621 +#, no-c-format +msgid "Maps a java.util.UUID to a JDBC BINARY" +msgstr "" + +#. Tag: para +#: type.xml:624 +#, no-c-format +msgid "Registered under uuid-binary and java.util.UUID in the type registry (see )." +msgstr "" + +#. Tag: classname +#: type.xml:631 +#, no-c-format +msgid "org.hibernate.type.UUIDCharType" +msgstr "" + +#. Tag: para +#: type.xml:633 +#, no-c-format +msgid "Maps a java.util.UUID to a JDBC CHAR (though VARCHAR is fine too for existing schemas)" +msgstr "" + +#. Tag: para +#: type.xml:636 +#, no-c-format msgid "Registered under uuid-char in the type registry (see )." msgstr "" #. Tag: classname -#: type.xml:614 +#: type.xml:643 #, no-c-format msgid "org.hibernate.type.PostgresUUIDType" msgstr "" #. Tag: para -#: type.xml:616 +#: type.xml:645 #, no-c-format msgid "Maps a java.util.UUID to the PostgreSQL UUID data type (through Types#OTHER which is how the PostgreSQL JDBC driver defines it)." msgstr "" #. Tag: para -#: type.xml:620 +#: type.xml:649 #, no-c-format msgid "Registered under pg-uuid in the type registry (see )." msgstr "" #. Tag: interfacename -#: type.xml:629 +#: type.xml:658 #, no-c-format msgid "java.io.Serializable" msgstr "" #. Tag: classname -#: type.xml:632 +#: type.xml:661 #, no-c-format msgid "org.hibernate.type.SerializableType" msgstr "" #. Tag: para -#: type.xml:634 +#: type.xml:663 #, no-c-format msgid "Maps implementors of java.lang.Serializable to a JDBC VARBINARY" msgstr "" #. Tag: para -#: type.xml:637 +#: type.xml:666 #, no-c-format msgid "Unlike the other value types, there are multiple instances of this type. It gets registered once under java.io.Serializable. Additionally it gets registered under the specific java.io.Serializable implementation class names." msgstr "" #. Tag: title -#: type.xml:650 +#: type.xml:679 #, no-c-format msgid "Composite types" msgstr "" #. Tag: para -#: type.xml:652 +#: type.xml:681 #, no-c-format msgid "The Java Persistence API calls these embedded types, while Hibernate traditionally called them components. Just be aware that both terms are used and mean the same thing in the scope of discussing Hibernate." msgstr "" #. Tag: para -#: type.xml:658 +#: type.xml:687 #, no-c-format msgid "Components represent aggregations of values into a single Java type. For example, you might have an Address class that aggregates street, city, state, etc information or a Name class that aggregates the parts of a person's Name. In many ways a component looks exactly like an entity. They are both (generally speaking) classes written specifically for the application. They both might have references to other application-specific classes, as well as to collections and simple JDK types. As discussed before, the only distinguishing factory is the fact that a component does not own its own lifecycle nor does it define an identifier." msgstr "" #. Tag: title -#: type.xml:670 +#: type.xml:699 #, no-c-format msgid "Collection types" msgstr "" #. Tag: para -#: type.xml:672 +#: type.xml:701 #, no-c-format msgid "It is critical understand that we mean the collection itself, not its contents. The contents of the collection can in turn be basic, component or entity types (though not collections), but the collection itself is owned." msgstr "" #. Tag: para -#: type.xml:678 +#: type.xml:707 #, no-c-format msgid "Collections are covered in ." msgstr "" #. Tag: title -#: type.xml:686 +#: type.xml:715 #, no-c-format msgid "Entity types" msgstr "" #. Tag: para -#: type.xml:687 +#: type.xml:716 #, no-c-format msgid "The definition of entities is covered in detail in . For the purpose of this discussion, it is enough to say that entities are (generally application-specific) classes which correlate to rows in a table. Specifically they correlate to the row by means of a unique identifier. Because of this unique identifier, entities exist independently and define their own lifecycle. As an example, when we delete a Membership, both the User and Group entities remain." msgstr "" #. Tag: para -#: type.xml:695 +#: type.xml:724 #, no-c-format msgid "This notion of entity independence can be modified by the application developer using the concept of cascades. Cascades allow certain operations to continue (or \"cascade\") across an association from one entity to another. Cascades are covered in detail in ." msgstr "" #. Tag: title -#: type.xml:705 +#: type.xml:734 #, no-c-format msgid "Significance of type categories" msgstr "" #. Tag: para -#: type.xml:706 +#: type.xml:735 #, no-c-format msgid "Why do we spend so much time categorizing the various types of types? What is the significance of the distinction?" msgstr "" #. Tag: para -#: type.xml:710 +#: type.xml:739 #, no-c-format msgid "The main categorization was between entity types and value types. To review we said that entities, by nature of their unique identifier, exist independently of other objects whereas values do not. An application cannot \"delete\" a Product sku; instead, the sku is removed when the Product itself is deleted (obviously you can update the sku of that Product to null to make it \"go away\", but even there the access is done through the Product)." msgstr "" #. Tag: para -#: type.xml:717 +#: type.xml:746 #, no-c-format msgid "Nor can you define an association to that Product sku. You can define an association to Product based on its sku, assuming sku is unique, but that is totally different." msgstr "" #. Tag: para -#: type.xml:722 +#: type.xml:751 #, no-c-format msgid "TBC..." msgstr "" #. Tag: title -#: type.xml:728 +#: type.xml:757 #, no-c-format msgid "Custom types" msgstr "" #. Tag: para -#: type.xml:729 +#: type.xml:758 #, no-c-format msgid "Hibernate makes it relatively easy for developers to create their own value types. For example, you might want to persist properties of type java.lang.BigInteger to VARCHAR columns. Custom types are not limited to mapping values to a single table column. So, for example, you might want to concatenate together FIRST_NAME, INITIAL and SURNAME columns into a java.lang.String." msgstr "" #. Tag: para -#: type.xml:737 +#: type.xml:766 #, no-c-format msgid "There are 3 approaches to developing a custom Hibernate type. As a means of illustrating the different approaches, lets consider a use case where we need to compose a java.math.BigDecimal and java.util.Currency together into a custom Money class." msgstr "" #. Tag: title -#: type.xml:744 +#: type.xml:773 #, no-c-format msgid "Custom types using org.hibernate.type.Type" msgstr "" #. Tag: para -#: type.xml:745 +#: type.xml:774 #, no-c-format msgid "The first approach is to directly implement the org.hibernate.type.Type interface (or one of its derivatives). Probably, you will be more interested in the more specific org.hibernate.type.BasicType contract which would allow registration of the type (see ). The benefit of this registration is that whenever the metadata for a particular property does not specify the Hibernate type to use, Hibernate will consult the registry for the exposed property type. In our example, the property type would be Money, which is the key we would use to register our type in the registry:" msgstr "" #. Tag: title -#: type.xml:756 +#: type.xml:785 #, no-c-format msgid "Defining and registering the custom Type" msgstr "" #. Tag: programlisting -#: type.xml:757 +#: type.xml:786 #, no-c-format msgid "" "before adding mappings." msgstr "" #. Tag: title -#: type.xml:767 +#: type.xml:796 #, no-c-format msgid "Custom types using org.hibernate.usertype.UserType" msgstr "" #. Tag: para -#: type.xml:769 +#: type.xml:798 #, no-c-format msgid "Both org.hibernate.usertype.UserType and org.hibernate.usertype.CompositeUserType were originally added to isolate user code from internal changes to the org.hibernate.type.Type interfaces." msgstr "" #. Tag: para -#: type.xml:776 +#: type.xml:805 #, no-c-format msgid "The second approach is the use the org.hibernate.usertype.UserType interface, which presents a somewhat simplified view of the org.hibernate.type.Type interface. Using a org.hibernate.usertype.UserType, our Money custom type would look as follows:" msgstr "" #. Tag: title -#: type.xml:783 +#: type.xml:812 #, no-c-format msgid "Defining the custom UserType" msgstr "" #. Tag: programlisting -#: type.xml:784 +#: type.xml:813 #, no-c-format msgid "" "org.hibernate.type.Type example and the org.hibernate.usertype.UserType example, but that is only because of the snippets shown. If you choose the org.hibernate.type.Type approach there are quite a few more methods you would need to implement as compared to the org.hibernate.usertype.UserType." msgstr "" #. Tag: title -#: type.xml:796 +#: type.xml:825 #, no-c-format msgid "Custom types using org.hibernate.usertype.CompositeUserType" msgstr "" #. Tag: para -#: type.xml:797 +#: type.xml:826 #, no-c-format msgid "The third and final approach is the use the org.hibernate.usertype.CompositeUserType interface, which differs from org.hibernate.usertype.UserType in that it gives us the ability to provide Hibernate the information to handle the composition within the Money class (specifically the 2 attributes). This would give us the capability, for example, to reference the amount attribute in an HQL query. Using a org.hibernate.usertype.CompositeUserType, our Money custom type would look as follows:" msgstr "" #. Tag: title -#: type.xml:808 +#: type.xml:837 #, no-c-format msgid "Defining the custom CompositeUserType" msgstr "" #. Tag: programlisting -#: type.xml:809 +#: type.xml:838 #, no-c-format msgid "" ") when it needs to resolve the specific org.hibernate.type.Type to use in certain situations. It also provides a way for applications to add extra basic type registrations as well as override the standard basic type registrations." msgstr "" #. Tag: para -#: type.xml:823 +#: type.xml:852 #, no-c-format msgid "To register a new type or to override an existing type registration, applications would make use of the registerTypeOverride method of the org.hibernate.cfg.Configuration class when bootstrapping Hibernate. For example, lets say you want Hibernate to use your custom SuperDuperStringType; during bootstrap you would call:" msgstr "" #. Tag: title -#: type.xml:830 +#: type.xml:859 #, no-c-format msgid "Overriding the standard StringType" msgstr "" #. Tag: programlisting -#: type.xml:831 +#: type.xml:860 #, no-c-format msgid "" "registerTypeOverride is a org.hibernate.type.BasicType which is a specialization of the org.hibernate.type.Type we saw before. It adds a single method:" msgstr "" #. Tag: title -#: type.xml:839 +#: type.xml:868 #, no-c-format msgid "Snippet from BasicType.java" msgstr "" #. Tag: programlisting -#: type.xml:840 +#: type.xml:869 #, no-c-format msgid "" "/**\n" @@ -1273,7 +1327,7 @@ msgid "" msgstr "" #. Tag: para -#: type.xml:842 +#: type.xml:871 #, no-c-format msgid "One approach is to use inheritance (SuperDuperStringType extends org.hibernate.type.StringType); another is to use delegation." msgstr "" diff --git a/documentation/manual/src/main/docbook/pt-BR/content/basic_mapping.po b/documentation/manual/src/main/docbook/pt-BR/content/basic_mapping.po index 57485bf9f1..a0f988ded7 100644 --- a/documentation/manual/src/main/docbook/pt-BR/content/basic_mapping.po +++ b/documentation/manual/src/main/docbook/pt-BR/content/basic_mapping.po @@ -108,7 +108,7 @@ msgid "" msgstr "" "Project-Id-Version: basic_mapping\n" "Report-Msgid-Bugs-To: http://bugs.kde.org\n" -"POT-Creation-Date: 2010-07-20 21:02+0000\n" +"POT-Creation-Date: 2011-01-21 21:18+0000\n" "PO-Revision-Date: 2010-03-18 10:20+1000\n" "Last-Translator: \n" "Language-Team: \n" @@ -287,8 +287,7 @@ msgid "" "<?xml version=\"1.0\"?>\n" "<!DOCTYPE hibernate-mapping PUBLIC\n" " \"-//Hibernate/Hibernate Mapping DTD 3.0//EN\"\n" -" \"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd" -"\">\n" +" \"http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd\">\n" "\n" "<hibernate-mapping package=\"eg\">\n" "\n" @@ -838,7 +837,7 @@ msgstr "" "literal>): Especifica quais instâncias da classe são (ou não) mutáveis." #. Tag: para -#: basic_mapping.xml:349 basic_mapping.xml:2912 +#: basic_mapping.xml:349 basic_mapping.xml:2948 #, no-c-format msgid "" "schema (optional): overrides the schema name specified by " @@ -848,7 +847,7 @@ msgstr "" "especificado pelo elemento raíz <hibernate-mapping>." #. Tag: para -#: basic_mapping.xml:355 basic_mapping.xml:2918 +#: basic_mapping.xml:355 basic_mapping.xml:2954 #, no-c-format msgid "" "catalog (optional): overrides the catalog name specified " @@ -1173,7 +1172,7 @@ msgstr "" "name (opcional): O nome da propriedade do identificador." #. Tag: para -#: basic_mapping.xml:518 basic_mapping.xml:2141 +#: basic_mapping.xml:518 basic_mapping.xml:2152 #, no-c-format msgid "" "type (optional): a name that indicates the Hibernate type." @@ -3531,8 +3530,8 @@ msgstr "Timestamp (opcional) " #, fuzzy, no-c-format msgid "" "Alternatively, you can use a timestamp. Timestamps are a less safe " -"implementation of optimistic locking. However, sometimes the application " -"might use the timestamps in other ways." +"implementation of optimistic locking. However, sometimes an application " +"might use the timestamps in other ways as well." msgstr "" "O elemento opcional <timestamp> indica que uma " "tabela contém dados em timestamp. Isso tem por objetivo dar uma alternativa " @@ -3564,13 +3563,27 @@ msgstr "" #: basic_mapping.xml:1598 #, no-c-format msgid "" -"Like version numbers, the timestamp can be generated by the database instead " -"of Hibernate. To do that, use @org.hibernate.annotations.Generated" -"(GenerationTime.ALWAYS)." +"When using timestamp versioning you can tell Hibernate where to retrieve the " +"timestamp value from - database or JVM - by optionally adding the " +"@org.hibernate.annotations.Source annotation to the " +"property. Possible values for the value attribute of the annotation are " +"org.hibernate.annotations.SourceType.VM and " +"org.hibernate.annotations.SourceType.DB. The default " +"is SourceType.DB which is also used in case there is " +"no @Source annotation at all." msgstr "" #. Tag: para -#: basic_mapping.xml:1602 +#: basic_mapping.xml:1609 +#, no-c-format +msgid "" +"Like in the case of version numbers, the timestamp can also be generated by " +"the database instead of Hibernate. To do that, use @org.hibernate." +"annotations.Generated(GenerationTime.ALWAYS)." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1613 #, fuzzy, no-c-format msgid "In hbm.xml, use the <timestamp> element:" msgstr "" @@ -3578,7 +3591,7 @@ msgstr "" "literal>:" #. Tag: programlisting -#: basic_mapping.xml:1620 +#: basic_mapping.xml:1631 #, no-c-format msgid "" "<timestamp\n" @@ -3593,7 +3606,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:1624 +#: basic_mapping.xml:1635 #, no-c-format msgid "" "column (optional - defaults to the property name): the " @@ -3603,7 +3616,7 @@ msgstr "" "nome da coluna que mantém o timestamp." #. Tag: para -#: basic_mapping.xml:1630 +#: basic_mapping.xml:1641 #, no-c-format msgid "" "name: the name of a JavaBeans style property of Java type " @@ -3615,8 +3628,8 @@ msgstr "" "persistente." #. Tag: para -#: basic_mapping.xml:1636 basic_mapping.xml:2163 basic_mapping.xml:2380 -#: basic_mapping.xml:3226 basic_mapping.xml:3420 basic_mapping.xml:3593 +#: basic_mapping.xml:1647 basic_mapping.xml:2174 basic_mapping.xml:2391 +#: basic_mapping.xml:3262 basic_mapping.xml:3456 basic_mapping.xml:3629 #, no-c-format msgid "" "access (optional - defaults to propertyunsaved-value (optional - defaults to nullsource (optional - defaults to vm): " @@ -3667,7 +3680,7 @@ msgstr "" "por exemplo)." #. Tag: para -#: basic_mapping.xml:1665 +#: basic_mapping.xml:1676 #, no-c-format msgid "" "generated (optional - defaults to nevergenerated properties para maiores informações. " #. Tag: title -#: basic_mapping.xml:1675 +#: basic_mapping.xml:1686 #, no-c-format msgid "Note" msgstr "Nota" #. Tag: para -#: basic_mapping.xml:1677 +#: basic_mapping.xml:1688 #, no-c-format msgid "" "<Timestamp> is equivalent to <version " @@ -3701,13 +3714,13 @@ msgstr "" "type=\"dbtimestamp\">." #. Tag: title -#: basic_mapping.xml:1686 +#: basic_mapping.xml:1697 #, no-c-format msgid "Property" msgstr "Propriedade " #. Tag: para -#: basic_mapping.xml:1688 +#: basic_mapping.xml:1699 #, no-c-format msgid "" "You need to decide which property needs to be made persistent in a given " @@ -3716,13 +3729,13 @@ msgid "" msgstr "" #. Tag: title -#: basic_mapping.xml:1693 +#: basic_mapping.xml:1704 #, no-c-format msgid "Property mapping with annotations" msgstr "" #. Tag: para -#: basic_mapping.xml:1695 +#: basic_mapping.xml:1706 #, no-c-format msgid "" "In the annotations world, every non static non transient property (field or " @@ -3733,7 +3746,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:1702 +#: basic_mapping.xml:1713 #, no-c-format msgid "" "The @Basic annotation allows you to declare the fetching " @@ -3749,13 +3762,13 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:1715 +#: basic_mapping.xml:1726 #, no-c-format msgid "Let's look at a few examples:" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:1717 +#: basic_mapping.xml:1728 #, no-c-format msgid "" "public transient int counter; //transient property\n" @@ -3781,7 +3794,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:1719 +#: basic_mapping.xml:1730 #, no-c-format msgid "" "counter, a transient field, and lengthInMeter@Lob indicates that the property should be persisted in a " @@ -3836,7 +3849,7 @@ msgid "" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:1759 +#: basic_mapping.xml:1770 #, no-c-format msgid "" "@Lob\n" @@ -3851,7 +3864,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:1761 +#: basic_mapping.xml:1772 #, no-c-format msgid "" "If the property type implements java.io.Serializable " @@ -3861,13 +3874,13 @@ msgid "" msgstr "" #. Tag: title -#: basic_mapping.xml:1768 +#: basic_mapping.xml:1779 #, no-c-format msgid "Type" msgstr "" #. Tag: para -#: basic_mapping.xml:1770 +#: basic_mapping.xml:1781 #, no-c-format msgid "" "You can also manually specify a type using the @org.hibernate." @@ -3876,7 +3889,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:1777 basic_mapping.xml:2209 +#: basic_mapping.xml:1788 basic_mapping.xml:2220 #, no-c-format msgid "" "The name of a Hibernate basic type: integer, string, character, " @@ -3886,7 +3899,7 @@ msgstr "" "date, timestamp, float, binary, serializable, object, blob, etc. " #. Tag: para -#: basic_mapping.xml:1783 basic_mapping.xml:2215 +#: basic_mapping.xml:1794 basic_mapping.xml:2226 #, no-c-format msgid "" "The name of a Java class with a default basic type: int, float, " @@ -3898,13 +3911,13 @@ msgstr "" "literal>, etc." #. Tag: para -#: basic_mapping.xml:1789 basic_mapping.xml:2221 +#: basic_mapping.xml:1800 basic_mapping.xml:2232 #, no-c-format msgid "The name of a serializable Java class." msgstr "O nome da classe Java serializável" #. Tag: para -#: basic_mapping.xml:1793 basic_mapping.xml:2225 +#: basic_mapping.xml:1804 basic_mapping.xml:2236 #, no-c-format msgid "" "The class name of a custom type: com.illflow.type.MyCustomType, etc." #. Tag: para -#: basic_mapping.xml:1798 +#: basic_mapping.xml:1809 #, fuzzy, no-c-format msgid "" "If you do not specify a type, Hibernate will use reflection upon the named " @@ -3931,7 +3944,7 @@ msgstr "" "ou para especificar um tipo customizado." #. Tag: para -#: basic_mapping.xml:1803 +#: basic_mapping.xml:1814 #, no-c-format msgid "" "@org.hibernate.annotations.TypeDef and @org." @@ -3950,7 +3963,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:1819 +#: basic_mapping.xml:1830 #, no-c-format msgid "" "Package level annotations are placed in a file named package-info." @@ -3959,7 +3972,7 @@ msgid "" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:1824 +#: basic_mapping.xml:1835 #, no-c-format msgid "" "@TypeDef(\n" @@ -3979,7 +3992,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:1826 +#: basic_mapping.xml:1837 #, no-c-format msgid "" "The following example shows the usage of the parameters " @@ -3987,7 +4000,7 @@ msgid "" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:1830 +#: basic_mapping.xml:1841 #, no-c-format msgid "" "//in org/hibernate/test/annotations/entity/package-info.java\n" @@ -4013,7 +4026,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:1832 +#: basic_mapping.xml:1843 #, no-c-format msgid "" "When using composite user type, you will have to express column definitions. " @@ -4021,7 +4034,7 @@ msgid "" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:1836 +#: basic_mapping.xml:1847 #, no-c-format msgid "" "@Type(type=\"org.hibernate.test.annotations.entity.MonetaryAmountUserType" @@ -4043,13 +4056,13 @@ msgid "" msgstr "" #. Tag: title -#: basic_mapping.xml:1840 +#: basic_mapping.xml:1851 #, no-c-format msgid "Access type" msgstr "" #. Tag: para -#: basic_mapping.xml:1842 +#: basic_mapping.xml:1853 #, no-c-format msgid "" "By default the access type of a class hierarchy is defined by the position " @@ -4062,7 +4075,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:1850 +#: basic_mapping.xml:1861 #, no-c-format msgid "" "The placement of annotations within a class hierarchy has to be consistent " @@ -4072,31 +4085,31 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:1857 +#: basic_mapping.xml:1868 #, no-c-format msgid "However in some situations, you need to:" msgstr "" #. Tag: para -#: basic_mapping.xml:1861 +#: basic_mapping.xml:1872 #, no-c-format msgid "force the access type of the entity hierarchy" msgstr "" #. Tag: para -#: basic_mapping.xml:1865 +#: basic_mapping.xml:1876 #, no-c-format msgid "override the access type of a specific entity in the class hierarchy" msgstr "" #. Tag: para -#: basic_mapping.xml:1870 +#: basic_mapping.xml:1881 #, no-c-format msgid "override the access type of an embeddable type" msgstr "" #. Tag: para -#: basic_mapping.xml:1874 +#: basic_mapping.xml:1885 #, no-c-format msgid "" "The best use case is an embeddable class used by several entities that might " @@ -4105,7 +4118,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:1879 +#: basic_mapping.xml:1890 #, no-c-format msgid "" "To force the access type on a given class, use the @AccessFIELD " @@ -4186,13 +4199,13 @@ msgid "" msgstr "" #. Tag: title -#: basic_mapping.xml:1896 +#: basic_mapping.xml:1907 #, no-c-format msgid "@org.hibernate.annotations.AccessType" msgstr "" #. Tag: para -#: basic_mapping.xml:1898 +#: basic_mapping.xml:1909 #, no-c-format msgid "" "The annotation @org.hibernate.annotations.AccessType " @@ -4201,13 +4214,13 @@ msgid "" msgstr "" #. Tag: title -#: basic_mapping.xml:1907 +#: basic_mapping.xml:1918 #, no-c-format msgid "Optimistic lock" msgstr "" #. Tag: para -#: basic_mapping.xml:1909 +#: basic_mapping.xml:1920 #, no-c-format msgid "" "It is sometimes useful to avoid increasing the version number even if a " @@ -4217,7 +4230,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:1914 +#: basic_mapping.xml:1925 #, no-c-format msgid "" "More formally, specifies that updates to this property do not require " @@ -4225,13 +4238,13 @@ msgid "" msgstr "" #. Tag: title -#: basic_mapping.xml:1919 +#: basic_mapping.xml:1930 #, no-c-format msgid "Declaring column attributes" msgstr "" #. Tag: para -#: basic_mapping.xml:1921 +#: basic_mapping.xml:1932 #, no-c-format msgid "" "The column(s) used for a property mapping can be defined using the " @@ -4241,37 +4254,37 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:1929 +#: basic_mapping.xml:1940 #, no-c-format msgid "not annotated at all" msgstr "" #. Tag: para -#: basic_mapping.xml:1933 +#: basic_mapping.xml:1944 #, fuzzy, no-c-format msgid "annotated with @Basic" msgstr "assigned" #. Tag: para -#: basic_mapping.xml:1937 +#: basic_mapping.xml:1948 #, fuzzy, no-c-format msgid "annotated with @Version" msgstr "string" #. Tag: para -#: basic_mapping.xml:1941 +#: basic_mapping.xml:1952 #, fuzzy, no-c-format msgid "annotated with @Lob" msgstr "hilo" #. Tag: para -#: basic_mapping.xml:1945 +#: basic_mapping.xml:1956 #, fuzzy, no-c-format msgid "annotated with @Temporal" msgstr "serializable" #. Tag: programlisting -#: basic_mapping.xml:1949 +#: basic_mapping.xml:1960 #, no-c-format msgid "" "@Entity\n" @@ -4283,7 +4296,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:1951 +#: basic_mapping.xml:1962 #, no-c-format msgid "" "The name property is mapped to the flight_namename (optional): the column name (default to the property " @@ -4326,7 +4339,7 @@ msgstr "" "name (opcional): O nome da propriedade do identificador." #. Tag: para -#: basic_mapping.xml:1992 +#: basic_mapping.xml:2003 #, fuzzy, no-c-format msgid "" "unique (optional): set a unique constraint on this column " @@ -4337,7 +4350,7 @@ msgstr "" "uma property-ref. " #. Tag: para -#: basic_mapping.xml:1997 +#: basic_mapping.xml:2008 #, fuzzy, no-c-format msgid "" "nullable (optional): set the column as nullable (default " @@ -4346,7 +4359,7 @@ msgstr "" "name (opcional): O nome da propriedade do identificador." #. Tag: para -#: basic_mapping.xml:2002 +#: basic_mapping.xml:2013 #, fuzzy, no-c-format msgid "" "insertable (optional): whether or not the column will be " @@ -4355,7 +4368,7 @@ msgstr "" "name (opcional): O nome da propriedade do identificador." #. Tag: para -#: basic_mapping.xml:2008 +#: basic_mapping.xml:2019 #, fuzzy, no-c-format msgid "" "updatable (optional): whether or not the column will be " @@ -4364,7 +4377,7 @@ msgstr "" "catalog (opcional): O nome do catálogo do banco de dados. " #. Tag: para -#: basic_mapping.xml:2014 +#: basic_mapping.xml:2025 #, no-c-format msgid "" "columnDefinition (optional): override the sql DDL " @@ -4372,7 +4385,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2020 +#: basic_mapping.xml:2031 #, fuzzy, no-c-format msgid "" "table (optional): define the targeted table (default " @@ -4381,7 +4394,7 @@ msgstr "" "catalog (opcional): O nome do catálogo do banco de dados. " #. Tag: para -#: basic_mapping.xml:2025 +#: basic_mapping.xml:2036 #, no-c-format msgid "" "length (optional): column length " @@ -4389,7 +4402,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2030 +#: basic_mapping.xml:2041 #, no-c-format msgid "" "precision (optional): column decimal " @@ -4397,7 +4410,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2035 +#: basic_mapping.xml:2046 #, no-c-format msgid "" "scale (optional): column decimal scale " @@ -4405,13 +4418,13 @@ msgid "" msgstr "" #. Tag: title -#: basic_mapping.xml:2043 +#: basic_mapping.xml:2054 #, no-c-format msgid "Formula" msgstr "" #. Tag: para -#: basic_mapping.xml:2045 +#: basic_mapping.xml:2056 #, no-c-format msgid "" "Sometimes, you want the Database to do some computation for you rather than " @@ -4422,7 +4435,7 @@ msgid "" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:2051 +#: basic_mapping.xml:2062 #, no-c-format msgid "" "@Formula(\"obj_length * obj_height * obj_width\")\n" @@ -4430,32 +4443,32 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2053 +#: basic_mapping.xml:2064 #, no-c-format msgid "" "The SQL fragment can be as complex as you want and even include subselects." msgstr "" #. Tag: title -#: basic_mapping.xml:2058 +#: basic_mapping.xml:2069 #, no-c-format msgid "Non-annotated property defaults" msgstr "" #. Tag: para -#: basic_mapping.xml:2060 +#: basic_mapping.xml:2071 #, no-c-format msgid "If a property is not annotated, the following rules apply:" msgstr "" #. Tag: para -#: basic_mapping.xml:2063 +#: basic_mapping.xml:2074 #, no-c-format msgid "If the property is of a single type, it is mapped as @Basic" msgstr "" #. Tag: para -#: basic_mapping.xml:2068 +#: basic_mapping.xml:2079 #, no-c-format msgid "" "Otherwise, if the type of the property is annotated as @Embeddable, it is " @@ -4463,7 +4476,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2073 +#: basic_mapping.xml:2084 #, no-c-format msgid "" "Otherwise, if the type of the property is Serializablejava.sql.Clob<property> element declares a persistent " @@ -4498,7 +4511,7 @@ msgstr "" "estilo JavaBean de uma classe." #. Tag: programlisting -#: basic_mapping.xml:2125 +#: basic_mapping.xml:2136 #, no-c-format msgid "" "<property\n" @@ -4524,7 +4537,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2129 +#: basic_mapping.xml:2140 #, no-c-format msgid "" "name: the name of the property, with an initial lowercase " @@ -4534,7 +4547,7 @@ msgstr "" "minúscula." #. Tag: para -#: basic_mapping.xml:2134 +#: basic_mapping.xml:2145 #, no-c-format msgid "" "column (optional - defaults to the property name): the " @@ -4546,7 +4559,7 @@ msgstr "" "pelo(s) elemento(s) <column> aninhados." #. Tag: para -#: basic_mapping.xml:2146 +#: basic_mapping.xml:2157 #, no-c-format msgid "" "update, insert (optional - defaults to trueformula (optional): an SQL expression that defines the " @@ -4576,7 +4589,7 @@ msgstr "" "não possuem uma coluna de mapeamento para elas." #. Tag: para -#: basic_mapping.xml:2169 +#: basic_mapping.xml:2180 #, no-c-format msgid "" "lazy (optional - defaults to false): " @@ -4589,7 +4602,7 @@ msgstr "" "instrumentação bytecode em tempo de criação." #. Tag: para -#: basic_mapping.xml:2176 +#: basic_mapping.xml:2187 #, no-c-format msgid "" "unique (optional): enables the DDL generation of a unique " @@ -4601,7 +4614,7 @@ msgstr "" "uma property-ref. " #. Tag: para -#: basic_mapping.xml:2183 +#: basic_mapping.xml:2194 #, no-c-format msgid "" "not-null (optional): enables the DDL generation of a " @@ -4611,7 +4624,7 @@ msgstr "" "restrição de nulidade para as colunas. " #. Tag: para -#: basic_mapping.xml:2188 basic_mapping.xml:3246 +#: basic_mapping.xml:2199 basic_mapping.xml:3282 #, no-c-format msgid "" "optimistic-lock (optional - defaults to truegenerated (optional - defaults to nevergenerated properties para maiores informações. " #. Tag: para -#: basic_mapping.xml:2205 +#: basic_mapping.xml:2216 #, no-c-format msgid "typename could be:" msgstr "typename pode ser:" #. Tag: para -#: basic_mapping.xml:2230 +#: basic_mapping.xml:2241 #, no-c-format msgid "" "If you do not specify a type, Hibernate will use reflection upon the named " @@ -4665,7 +4678,7 @@ msgstr "" "ou para especificar um tipo customizado." #. Tag: para -#: basic_mapping.xml:2239 +#: basic_mapping.xml:2250 #, no-c-format msgid "" "The access attribute allows you to control how Hibernate " @@ -4686,7 +4699,7 @@ msgstr "" "literal>." #. Tag: para -#: basic_mapping.xml:2248 +#: basic_mapping.xml:2259 #, no-c-format msgid "" "A powerful feature is derived properties. These properties are by definition " @@ -4701,7 +4714,7 @@ msgstr "" "da consulta SQL que carrega a instância: " #. Tag: programlisting -#: basic_mapping.xml:2254 +#: basic_mapping.xml:2265 #, no-c-format msgid "" "<property name=\"totalPrice\"\n" @@ -4713,7 +4726,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2256 +#: basic_mapping.xml:2267 #, no-c-format msgid "" "You can reference the entity table by not declaring an alias on a particular " @@ -4728,13 +4741,13 @@ msgstr "" "se você não gostar de usar o atributo. " #. Tag: title -#: basic_mapping.xml:2265 +#: basic_mapping.xml:2276 #, no-c-format msgid "Embedded objects (aka components)" msgstr "" #. Tag: para -#: basic_mapping.xml:2267 +#: basic_mapping.xml:2278 #, fuzzy, no-c-format msgid "" "Embeddable objects (or components) are objects whose properties are mapped " @@ -4747,7 +4760,7 @@ msgstr "" "coleções. Veja \"Components\" abaixo:" #. Tag: para -#: basic_mapping.xml:2272 +#: basic_mapping.xml:2283 #, no-c-format msgid "" "It is possible to declare an embedded component inside an entity and even " @@ -4759,7 +4772,7 @@ msgid "" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:2280 +#: basic_mapping.xml:2291 #, no-c-format msgid "" "@Entity\n" @@ -4781,7 +4794,7 @@ msgid "" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:2282 +#: basic_mapping.xml:2293 #, no-c-format msgid "" "@Embeddable\n" @@ -4792,7 +4805,7 @@ msgid "" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:2284 +#: basic_mapping.xml:2295 #, no-c-format msgid "" "@Embeddable\n" @@ -4811,7 +4824,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2286 +#: basic_mapping.xml:2297 #, no-c-format msgid "" "An embeddable object inherits the access type of its owning entity (note " @@ -4819,7 +4832,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2290 +#: basic_mapping.xml:2301 #, no-c-format msgid "" "The Person entity has two component properties, " @@ -4837,7 +4850,7 @@ msgid "" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:2305 +#: basic_mapping.xml:2316 #, no-c-format msgid "" "@Embedded\n" @@ -4854,7 +4867,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2307 +#: basic_mapping.xml:2318 #, no-c-format msgid "" "Hibernate Annotations supports something that is not explicitly supported by " @@ -4865,7 +4878,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2313 +#: basic_mapping.xml:2324 #, no-c-format msgid "" "You can also use association annotations in an embeddable object (ie " @@ -4876,7 +4889,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2319 +#: basic_mapping.xml:2330 #, no-c-format msgid "" "If you want to have the same embeddable object type twice in the same " @@ -4890,7 +4903,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2329 +#: basic_mapping.xml:2340 #, no-c-format msgid "" "If a property of the embedded object points back to the owning entity, " @@ -4899,13 +4912,13 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2334 +#: basic_mapping.xml:2345 #, no-c-format msgid "In XML, use the <component> element." msgstr "" #. Tag: programlisting -#: basic_mapping.xml:2356 +#: basic_mapping.xml:2367 #, no-c-format msgid "" "<component\n" @@ -4927,13 +4940,13 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2360 basic_mapping.xml:3181 basic_mapping.xml:3381 +#: basic_mapping.xml:2371 basic_mapping.xml:3217 basic_mapping.xml:3417 #, no-c-format msgid "name: the name of the property." msgstr "name: O nome da propriedade. " #. Tag: para -#: basic_mapping.xml:2364 +#: basic_mapping.xml:2375 #, no-c-format msgid "" "class (optional - defaults to the property type " @@ -4943,7 +4956,7 @@ msgstr "" "determinada por reflection): O nome da classe (filha) do componente." #. Tag: para -#: basic_mapping.xml:2370 basic_mapping.xml:3641 +#: basic_mapping.xml:2381 basic_mapping.xml:3677 #, no-c-format msgid "" "insert: do the mapped columns appear in SQL " @@ -4953,7 +4966,7 @@ msgstr "" "INSERTs? " #. Tag: para -#: basic_mapping.xml:2375 basic_mapping.xml:3646 +#: basic_mapping.xml:2386 basic_mapping.xml:3682 #, no-c-format msgid "" "update: do the mapped columns appear in SQL " @@ -4963,7 +4976,7 @@ msgstr "" "UPDATEs? " #. Tag: para -#: basic_mapping.xml:2386 +#: basic_mapping.xml:2397 #, no-c-format msgid "" "lazy (optional - defaults to false): " @@ -4976,7 +4989,7 @@ msgstr "" "construção." #. Tag: para -#: basic_mapping.xml:2393 +#: basic_mapping.xml:2404 #, no-c-format msgid "" "optimistic-lock (optional - defaults to trueunique (optional - defaults to false): " @@ -5002,7 +5015,7 @@ msgstr "" "mapeadas do componente. " #. Tag: para -#: basic_mapping.xml:2408 +#: basic_mapping.xml:2419 #, no-c-format msgid "" "The child <property> tags map properties of the " @@ -5012,7 +5025,7 @@ msgstr "" "mapeamento da classe filha para colunas de uma tabela." #. Tag: para -#: basic_mapping.xml:2411 +#: basic_mapping.xml:2422 #, no-c-format msgid "" "The <component> element allows a <" @@ -5024,7 +5037,7 @@ msgstr "" "componente como uma referencia de volta para a entidade que o contém." #. Tag: para -#: basic_mapping.xml:2415 +#: basic_mapping.xml:2426 #, fuzzy, no-c-format msgid "" "The <dynamic-component> element allows a " @@ -5038,13 +5051,13 @@ msgstr "" "\"components-dynamic\"/> para maiores informações." #. Tag: title -#: basic_mapping.xml:2423 +#: basic_mapping.xml:2434 #, no-c-format msgid "Inheritance strategy" msgstr "" #. Tag: para -#: basic_mapping.xml:2425 +#: basic_mapping.xml:2436 #, no-c-format msgid "" "Java is a language supporting polymorphism: a class can inherit from " @@ -5052,7 +5065,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2431 +#: basic_mapping.xml:2442 #, no-c-format msgid "" "Single table per class hierarchy strategy: a single table hosts all the " @@ -5060,7 +5073,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2436 +#: basic_mapping.xml:2447 #, no-c-format msgid "" "Joined subclass strategy: one table per class and subclass is present and " @@ -5070,7 +5083,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2443 +#: basic_mapping.xml:2454 #, no-c-format msgid "" "Table per class strategy: one table per concrete class and subclass is " @@ -5080,13 +5093,13 @@ msgid "" msgstr "" #. Tag: title -#: basic_mapping.xml:2451 +#: basic_mapping.xml:2462 #, no-c-format msgid "Single table per class hierarchy strategy" msgstr "" #. Tag: para -#: basic_mapping.xml:2453 +#: basic_mapping.xml:2464 #, no-c-format msgid "" "With this approach the properties of all the subclasses in a given mapped " @@ -5094,7 +5107,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2456 +#: basic_mapping.xml:2467 #, fuzzy, no-c-format msgid "" "Each subclass declares its own persistent properties and subclasses. Version " @@ -5110,7 +5123,7 @@ msgstr "" "usado o nome da classe Java completamente qualificado." #. Tag: programlisting -#: basic_mapping.xml:2462 basic_mapping.xml:2540 +#: basic_mapping.xml:2473 basic_mapping.xml:2581 #, no-c-format msgid "" "@Entity\n" @@ -5128,7 +5141,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2464 +#: basic_mapping.xml:2475 #, fuzzy, no-c-format msgid "" "In hbm.xml, for the table-per-class-hierarchy mapping strategy, the " @@ -5140,7 +5153,7 @@ msgstr "" ". Por exemplo:" #. Tag: programlisting -#: basic_mapping.xml:2479 +#: basic_mapping.xml:2490 #, no-c-format msgid "" "<subclass\n" @@ -5160,7 +5173,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2483 basic_mapping.xml:2656 basic_mapping.xml:2720 +#: basic_mapping.xml:2494 basic_mapping.xml:2692 basic_mapping.xml:2756 #, no-c-format msgid "" "name: the fully qualified class name of the subclass." @@ -5169,7 +5182,7 @@ msgstr "" "subclasse. " #. Tag: para -#: basic_mapping.xml:2488 +#: basic_mapping.xml:2499 #, no-c-format msgid "" "discriminator-value (optional - defaults to the class " @@ -5179,7 +5192,7 @@ msgstr "" "classe): Um valor que distingue subclasses individuais." #. Tag: para -#: basic_mapping.xml:2494 +#: basic_mapping.xml:2505 #, no-c-format msgid "" "proxy (optional): specifies a class or interface used for " @@ -5189,7 +5202,7 @@ msgstr "" "usará os proxies de inicialização lazy." #. Tag: para -#: basic_mapping.xml:2499 +#: basic_mapping.xml:2510 #, no-c-format msgid "" "lazy (optional - defaults to true): " @@ -5200,7 +5213,7 @@ msgstr "" "inicialização lazy." #. Tag: para -#: basic_mapping.xml:2507 basic_mapping.xml:2685 basic_mapping.xml:2746 +#: basic_mapping.xml:2518 basic_mapping.xml:2721 basic_mapping.xml:2782 #, fuzzy, no-c-format msgid "" "For information about inheritance mappings see ." #. Tag: title -#: basic_mapping.xml:2511 +#: basic_mapping.xml:2522 #, no-c-format msgid "Discriminator" msgstr "Discriminador " #. Tag: para -#: basic_mapping.xml:2513 +#: basic_mapping.xml:2524 #, fuzzy, no-c-format msgid "" "Discriminators are required for polymorphic persistence using the table-per-" "class-hierarchy mapping strategy. It declares a discriminator column of the " "table. The discriminator column contains marker values that tell the " -"persistence layer what subclass to instantiate for a particular row. A " -"restricted set of types can be used: string, " -"character, integer, byte, short, boolean, " -"yes_no, true_false." +"persistence layer what subclass to instantiate for a particular row. " +"Hibernate Core supports the follwoing restricted set of types as " +"discriminator column: string, character, integer, byte, " +"short, boolean, yes_no, true_false." msgstr "" "O elemento <discriminator> é necessário para " "persistência polimórfica utilizando a estratégia de mapeamento de tabela-por-" @@ -5239,21 +5253,56 @@ msgstr "" "literal>, yes_no, true_false." #. Tag: para -#: basic_mapping.xml:2523 +#: basic_mapping.xml:2535 #, no-c-format msgid "" "Use the @DiscriminatorColumn to define the " -"discriminator column as well as the discriminator type. Alternatively, you " -"can also use @DiscriminatorFormula to express in SQL " -"what would be in a virtual discriminator column. This is particularly handy " -"when the discriminator value can be extracted from one or more columns of " -"the table. Both @DiscriminatorColumn and " -"@DiscriminatorFormula are to be set on the root " -"entity (once per persisted hierarchy)." +"discriminator column as well as the discriminator type. " +"The enum DiscriminatorType used in " +"javax.persitence.DiscriminatorColumn only contains " +"the values STRING, CHAR and " +"INTEGER which means that not all Hibernate supported " +"types are available via the @DiscriminatorColumn " +"annotation. You can also use @DiscriminatorFormula to express in SQL a virtual discriminator column. This is " +"particularly useful when the discriminator value can be extracted from one " +"or more columns of the table. Both @DiscriminatorColumn and @DiscriminatorFormula are to be set on " +"the root entity (once per persisted hierarchy)." msgstr "" #. Tag: para -#: basic_mapping.xml:2534 +#: basic_mapping.xml:2552 +#, no-c-format +msgid "" +"@org.hibernate.annotations.DiscriminatorOptions " +"allows to optionally specify Hibernate specific discriminator options which " +"are not standardized in JPA. The available options are force and insert. The force " +"attribute is useful if the table contains rows with \"extra\" discriminator " +"values that are not mapped to a persistent class. This could for example " +"occur when working with a legacy database. If force is " +"set to true Hibernate will specify the allowed " +"discriminator values in the SELECT query, even when " +"retrieving all instances of the root class. The second option - " +"insert - tells Hibernate whether or not to include the " +"discriminator column in SQL INSERTs. Usually the column " +"should be part of the INSERT statement, but if your " +"discriminator column is also part of a mapped composite identifier you have " +"to set this option to false." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2569 +#, no-c-format +msgid "" +"There is also a @org.hibernate.annotations.ForceDiscriminator annotation which is deprecated since version 3.6. Use " +"@DiscriminatorOptions instead." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2575 #, no-c-format msgid "" "Finally, use @DiscriminatorValue on each class of the " @@ -5263,7 +5312,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2542 +#: basic_mapping.xml:2583 #, no-c-format msgid "" "In hbm.xml, the <discriminator> element is used to " @@ -5271,7 +5320,7 @@ msgid "" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:2559 +#: basic_mapping.xml:2600 #, no-c-format msgid "" "<discriminator\n" @@ -5284,7 +5333,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2563 +#: basic_mapping.xml:2604 #, no-c-format msgid "" "column (optional - defaults to class): " @@ -5294,7 +5343,7 @@ msgstr "" "O nome da coluna discriminadora." #. Tag: para -#: basic_mapping.xml:2569 +#: basic_mapping.xml:2610 #, no-c-format msgid "" "type (optional - defaults to string): " @@ -5304,7 +5353,7 @@ msgstr "" "O nome que indica o tipo Hibernate." #. Tag: para -#: basic_mapping.xml:2575 +#: basic_mapping.xml:2616 #, no-c-format msgid "" "force (optional - defaults to false): " @@ -5316,7 +5365,7 @@ msgstr "" "quando recuperando todas as instâncias da classe raíz. " #. Tag: para -#: basic_mapping.xml:2582 +#: basic_mapping.xml:2623 #, no-c-format msgid "" "insert (optional - defaults to true): " @@ -5331,7 +5380,7 @@ msgstr "" "literal>s)." #. Tag: para -#: basic_mapping.xml:2590 +#: basic_mapping.xml:2631 #, no-c-format msgid "" "formula (optional): an arbitrary SQL expression that is " @@ -5343,7 +5392,7 @@ msgstr "" "em conteúdo. " #. Tag: para -#: basic_mapping.xml:2597 +#: basic_mapping.xml:2638 #, no-c-format msgid "" "Actual values of the discriminator column are specified by the " @@ -5355,19 +5404,7 @@ msgstr "" "elementos da <subclass>." #. Tag: para -#: basic_mapping.xml:2602 -#, no-c-format -msgid "" -"The force attribute is only useful if the table contains " -"rows with \"extra\" discriminator values that are not mapped to a persistent " -"class. This will not usually be the case." -msgstr "" -"O atributo force é útil (apenas) em tabelas contendo " -"linhas com valores discriminadores \"extras\" que não estão mapeados para " -"uma classe persistente. Este não é geralmente o caso." - -#. Tag: para -#: basic_mapping.xml:2607 +#: basic_mapping.xml:2643 #, no-c-format msgid "" "The formula attribute allows you to declare an arbitrary " @@ -5378,7 +5415,7 @@ msgstr "" "linha. Por exemplo:" #. Tag: programlisting -#: basic_mapping.xml:2611 +#: basic_mapping.xml:2647 #, no-c-format msgid "" "<discriminator\n" @@ -5387,13 +5424,13 @@ msgid "" msgstr "" #. Tag: title -#: basic_mapping.xml:2616 +#: basic_mapping.xml:2652 #, fuzzy, no-c-format msgid "Joined subclass strategy" msgstr "Subclasses Unidas " #. Tag: para -#: basic_mapping.xml:2618 +#: basic_mapping.xml:2654 #, fuzzy, no-c-format msgid "" "Each subclass can also be mapped to its own table. This is called the table-" @@ -5411,7 +5448,7 @@ msgstr "" "elemento <joined-subclass>. Por exemplo:" #. Tag: programlisting -#: basic_mapping.xml:2628 +#: basic_mapping.xml:2664 #, no-c-format msgid "" "@Entity @Table(name=\"CATS\")\n" @@ -5432,7 +5469,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2631 +#: basic_mapping.xml:2667 #, no-c-format msgid "" "The table name still defaults to the non qualified class name. Also if " @@ -5442,7 +5479,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2638 +#: basic_mapping.xml:2674 #, fuzzy, no-c-format msgid "" "In hbm.xml, use the <joined-subclass> element. For " @@ -5452,7 +5489,7 @@ msgstr "" "class. Por exemplo:" #. Tag: programlisting -#: basic_mapping.xml:2652 +#: basic_mapping.xml:2688 #, no-c-format msgid "" "<joined-subclass\n" @@ -5478,13 +5515,13 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2661 basic_mapping.xml:2725 +#: basic_mapping.xml:2697 basic_mapping.xml:2761 #, no-c-format msgid "table: the name of the subclass table." msgstr "table: O nome da tabela da subclasse. " #. Tag: para -#: basic_mapping.xml:2666 basic_mapping.xml:2730 +#: basic_mapping.xml:2702 basic_mapping.xml:2766 #, no-c-format msgid "" "proxy (optional): specifies a class or interface to use " @@ -5494,7 +5531,7 @@ msgstr "" "usará os proxies de inicialização lazy. " #. Tag: para -#: basic_mapping.xml:2671 basic_mapping.xml:2735 +#: basic_mapping.xml:2707 basic_mapping.xml:2771 #, no-c-format msgid "" "lazy (optional, defaults to true): " @@ -5505,7 +5542,7 @@ msgstr "" "inicialização lazy." #. Tag: para -#: basic_mapping.xml:2679 +#: basic_mapping.xml:2715 #, no-c-format msgid "" "Use the <key> element to declare the primary key / " @@ -5514,13 +5551,13 @@ msgid "" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:2683 +#: basic_mapping.xml:2719 #, no-c-format msgid "" "<?xml version=\"1.0\"?>\n" "<!DOCTYPE hibernate-mapping PUBLIC\n" " \"-//Hibernate/Hibernate Mapping DTD//EN\"\n" -" \"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd\">\n" +" \"http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd\">\n" "\n" "<hibernate-mapping package=\"eg\">\n" "\n" @@ -5552,13 +5589,13 @@ msgid "" msgstr "" #. Tag: title -#: basic_mapping.xml:2690 +#: basic_mapping.xml:2726 #, no-c-format msgid "Table per class strategy" msgstr "" #. Tag: para -#: basic_mapping.xml:2692 +#: basic_mapping.xml:2728 #, fuzzy, no-c-format msgid "" "A third option is to map only the concrete classes of an inheritance " @@ -5581,7 +5618,7 @@ msgstr "" "mapeamento <union-subclass>. Por exemplo:" #. Tag: programlisting -#: basic_mapping.xml:2701 +#: basic_mapping.xml:2737 #, no-c-format msgid "" "@Entity\n" @@ -5590,13 +5627,13 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2703 +#: basic_mapping.xml:2739 #, no-c-format msgid "Or in hbm.xml:" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:2716 +#: basic_mapping.xml:2752 #, no-c-format msgid "" "<union-subclass\n" @@ -5621,7 +5658,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2743 +#: basic_mapping.xml:2779 #, no-c-format msgid "" "No discriminator column or key column is required for this mapping strategy." @@ -5629,13 +5666,13 @@ msgstr "" "A coluna discriminatória não é requerida para esta estratégia de mapeamento." #. Tag: title -#: basic_mapping.xml:2751 +#: basic_mapping.xml:2787 #, no-c-format msgid "Inherit properties from superclasses" msgstr "" #. Tag: para -#: basic_mapping.xml:2753 +#: basic_mapping.xml:2789 #, no-c-format msgid "" "This is sometimes useful to share common properties through a technical or a " @@ -5645,7 +5682,7 @@ msgid "" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:2758 +#: basic_mapping.xml:2794 #, no-c-format msgid "" "@MappedSuperclass\n" @@ -5664,7 +5701,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2760 +#: basic_mapping.xml:2796 #, no-c-format msgid "" "In database, this hierarchy will be represented as an Order@MappedSuperclass@Embeddable objects to " @@ -5701,7 +5738,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2786 +#: basic_mapping.xml:2822 #, no-c-format msgid "" "It is allowed to mark a class as @MappedSuperclass in the " @@ -5709,7 +5746,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2792 +#: basic_mapping.xml:2828 #, no-c-format msgid "" "Any class in the hierarchy non annotated with @MappedSuperclassaltitude property will be persisted in an " @@ -5770,7 +5807,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2809 +#: basic_mapping.xml:2845 #, no-c-format msgid "" "You can define @AttributeOverride(s) and " @@ -5780,7 +5817,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2815 +#: basic_mapping.xml:2851 #, no-c-format msgid "" "In hbm.xml, simply map the properties of the superclass in the <" @@ -5788,13 +5825,13 @@ msgid "" msgstr "" #. Tag: title -#: basic_mapping.xml:2821 +#: basic_mapping.xml:2857 #, no-c-format msgid "Mapping one entity to several tables" msgstr "" #. Tag: para -#: basic_mapping.xml:2823 +#: basic_mapping.xml:2859 #, no-c-format msgid "" "While not recommended for a fresh schema, some legacy databases force your " @@ -5802,7 +5839,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2826 +#: basic_mapping.xml:2862 #, no-c-format msgid "" "Using the @SecondaryTable or @SecondaryTablesname will be in MainCat@org.hibernate." @@ -5875,7 +5912,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2850 +#: basic_mapping.xml:2886 #, fuzzy, no-c-format msgid "" "fetch: If set to JOIN, the default, Hibernate will use an " @@ -5899,7 +5936,7 @@ msgstr "" "definido pela classe e suas superclasses. " #. Tag: para -#: basic_mapping.xml:2862 +#: basic_mapping.xml:2898 #, fuzzy, no-c-format msgid "" "inverse: If true, Hibernate will not try to insert or " @@ -5910,7 +5947,7 @@ msgstr "" "propriedades definidas por esta união." #. Tag: para -#: basic_mapping.xml:2868 +#: basic_mapping.xml:2904 #, fuzzy, no-c-format msgid "" "optional: If enabled (the default), Hibernate will insert " @@ -5923,7 +5960,7 @@ msgstr "" "usar uma união externa para recuperar as propriedades." #. Tag: para -#: basic_mapping.xml:2875 +#: basic_mapping.xml:2911 #, no-c-format msgid "" "foreignKey: defines the Foreign Key name of a secondary " @@ -5931,7 +5968,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2880 +#: basic_mapping.xml:2916 #, no-c-format msgid "" "Make sure to use the secondary table name in the appliesto<join> element." msgstr "" @@ -5986,7 +6023,7 @@ msgstr "" "literal>:" #. Tag: programlisting -#: basic_mapping.xml:2903 +#: basic_mapping.xml:2939 #, no-c-format msgid "" "<join\n" @@ -6005,13 +6042,13 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2907 +#: basic_mapping.xml:2943 #, no-c-format msgid "table: the name of the joined table." msgstr "table: O nome da tabela associada. " #. Tag: para -#: basic_mapping.xml:2924 +#: basic_mapping.xml:2960 #, no-c-format msgid "" "fetch (optional - defaults to join): " @@ -6036,7 +6073,7 @@ msgstr "" "definido pela classe e suas superclasses. " #. Tag: para -#: basic_mapping.xml:2939 +#: basic_mapping.xml:2975 #, no-c-format msgid "" "inverse (optional - defaults to falseoptional (optional - defaults to false@ManyToOne or " @@ -6129,7 +6166,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2978 +#: basic_mapping.xml:3014 #, no-c-format msgid "" "@ManyToOne and @OneToOne have a " @@ -6141,7 +6178,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2985 +#: basic_mapping.xml:3021 #, no-c-format msgid "" "Setting a value of the cascade attribute to any " @@ -6150,7 +6187,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2992 +#: basic_mapping.xml:3028 #, no-c-format msgid "" "basic operations, which include: persist, merge, delete, save-" @@ -6158,7 +6195,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2998 +#: basic_mapping.xml:3034 #, fuzzy, no-c-format msgid "" "special values: delete-orphan or all ;" @@ -6167,7 +6204,7 @@ msgstr "" "entity-name ao invés da class. " #. Tag: para -#: basic_mapping.xml:3003 +#: basic_mapping.xml:3039 #, no-c-format msgid "" "comma-separated combinations of operation names: cascade=\"persist," @@ -6177,7 +6214,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:3012 +#: basic_mapping.xml:3048 #, no-c-format msgid "" "By default, single point associations are eagerly fetched in JPA 2. You can " @@ -6192,7 +6229,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:3022 +#: basic_mapping.xml:3058 #, no-c-format msgid "" "With the default JPA options, single-ended associations are loaded with a " @@ -6208,13 +6245,13 @@ msgid "" msgstr "" #. Tag: title -#: basic_mapping.xml:3034 +#: basic_mapping.xml:3070 #, fuzzy, no-c-format msgid "Using a foreign key or an association table" msgstr "Associações de chave exterior exclusiva" #. Tag: para -#: basic_mapping.xml:3036 +#: basic_mapping.xml:3072 #, fuzzy, no-c-format msgid "An ordinary association to another persistent class is declared using a" msgstr "" @@ -6222,7 +6259,7 @@ msgstr "" "elemento one-to-one ." #. Tag: para -#: basic_mapping.xml:3041 +#: basic_mapping.xml:3077 #, no-c-format msgid "" "@ManyToOne if several entities can point to the the " @@ -6230,7 +6267,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:3046 +#: basic_mapping.xml:3082 #, no-c-format msgid "" "@OneToOne if only a single entity can point to the " @@ -6238,7 +6275,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:3051 +#: basic_mapping.xml:3087 #, no-c-format msgid "" "and a foreign key in one table is referencing the primary key column(s) of " @@ -6246,7 +6283,7 @@ msgid "" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:3054 +#: basic_mapping.xml:3090 #, no-c-format msgid "" "@Entity\n" @@ -6261,7 +6298,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:3056 +#: basic_mapping.xml:3092 #, no-c-format msgid "" "The @JoinColumn attribute is optional, the default value" @@ -6273,7 +6310,7 @@ msgid "" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:3064 +#: basic_mapping.xml:3100 #, no-c-format msgid "" "@Entity\n" @@ -6293,7 +6330,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:3066 +#: basic_mapping.xml:3102 #, no-c-format msgid "" "You can also map a to one association through an association table. This " @@ -6305,7 +6342,7 @@ msgid "" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:3074 +#: basic_mapping.xml:3110 #, no-c-format msgid "" "@Entity\n" @@ -6323,7 +6360,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:3077 +#: basic_mapping.xml:3113 #, no-c-format msgid "" "You can use a SQL fragment to simulate a physical join column using the " @@ -6334,7 +6371,7 @@ msgid "" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:3083 +#: basic_mapping.xml:3119 #, no-c-format msgid "" "@Entity\n" @@ -6349,7 +6386,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:3086 +#: basic_mapping.xml:3122 #, no-c-format msgid "" "You can mark an association as mandatory by using the " @@ -6360,7 +6397,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:3092 +#: basic_mapping.xml:3128 #, no-c-format msgid "" "When Hibernate cannot resolve the association because the expected " @@ -6371,13 +6408,13 @@ msgid "" msgstr "" #. Tag: title -#: basic_mapping.xml:3100 +#: basic_mapping.xml:3136 #, no-c-format msgid "@NotFound annotation" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:3102 +#: basic_mapping.xml:3138 #, no-c-format msgid "" "@Entity\n" @@ -6391,7 +6428,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:3105 +#: basic_mapping.xml:3141 #, no-c-format msgid "" "Sometimes you want to delegate to your database the deletion of cascade when " @@ -6400,13 +6437,13 @@ msgid "" msgstr "" #. Tag: title -#: basic_mapping.xml:3110 +#: basic_mapping.xml:3146 #, no-c-format msgid "@OnDelete annotation" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:3112 +#: basic_mapping.xml:3148 #, no-c-format msgid "" "@Entity\n" @@ -6420,7 +6457,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:3115 +#: basic_mapping.xml:3151 #, no-c-format msgid "" "Foreign key constraints, while generated by Hibernate, have a fairly " @@ -6429,13 +6466,13 @@ msgid "" msgstr "" #. Tag: title -#: basic_mapping.xml:3120 +#: basic_mapping.xml:3156 #, fuzzy, no-c-format msgid "@ForeignKey annotation" msgstr "Associações de chave exterior exclusiva" #. Tag: programlisting -#: basic_mapping.xml:3122 +#: basic_mapping.xml:3158 #, no-c-format msgid "" "@Entity\n" @@ -6452,7 +6489,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:3125 +#: basic_mapping.xml:3161 #, no-c-format msgid "" "Sometimes, you want to link one entity to an other not by the target entity " @@ -6462,7 +6499,7 @@ msgid "" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:3130 basic_mapping.xml:3682 +#: basic_mapping.xml:3166 basic_mapping.xml:3718 #, no-c-format msgid "" "@Entity\n" @@ -6487,14 +6524,14 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:3132 +#: basic_mapping.xml:3168 #, no-c-format msgid "" "This is not encouraged however and should be reserved to legacy mappings." msgstr "" #. Tag: para -#: basic_mapping.xml:3135 +#: basic_mapping.xml:3171 #, no-c-format msgid "" "In hbm.xml, mapping an association is similar. The main difference is that a " @@ -6503,7 +6540,7 @@ msgid "" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:3177 +#: basic_mapping.xml:3213 #, no-c-format msgid "" "<many-to-one\n" @@ -6532,7 +6569,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:3185 basic_mapping.xml:3868 +#: basic_mapping.xml:3221 basic_mapping.xml:3904 #, no-c-format msgid "" "column (optional): the name of the foreign key column. " @@ -6544,7 +6581,7 @@ msgstr "" "<column>. " #. Tag: para -#: basic_mapping.xml:3191 basic_mapping.xml:3385 +#: basic_mapping.xml:3227 basic_mapping.xml:3421 #, no-c-format msgid "" "class (optional - defaults to the property type " @@ -6554,7 +6591,7 @@ msgstr "" "determinado pela reflexão): O nome da classe associada." #. Tag: para -#: basic_mapping.xml:3197 basic_mapping.xml:3391 +#: basic_mapping.xml:3233 basic_mapping.xml:3427 #, no-c-format msgid "" "cascade (optional): specifies which operations should be " @@ -6564,7 +6601,7 @@ msgstr "" "cascateada do objeto pai para o objeto associado. " #. Tag: para -#: basic_mapping.xml:3203 basic_mapping.xml:3407 +#: basic_mapping.xml:3239 basic_mapping.xml:3443 #, no-c-format msgid "" "fetch (optional - defaults to select): " @@ -6575,7 +6612,7 @@ msgstr "" "seleção." #. Tag: para -#: basic_mapping.xml:3209 +#: basic_mapping.xml:3245 #, no-c-format msgid "" "update, insert (optional - defaults to trueproperty-ref (optional): the name of a property of the " @@ -6606,7 +6643,7 @@ msgstr "" "especificada, a chave primária da classe associada será utilizada. " #. Tag: para -#: basic_mapping.xml:3232 +#: basic_mapping.xml:3268 #, no-c-format msgid "" "unique (optional): enables the DDL generation of a unique " @@ -6620,7 +6657,7 @@ msgstr "" "associação efetivamente um para um. " #. Tag: para -#: basic_mapping.xml:3240 +#: basic_mapping.xml:3276 #, no-c-format msgid "" "not-null (optional): enables the DDL generation of a " @@ -6630,7 +6667,7 @@ msgstr "" "restrição de nulidade para as colunas de chaves exteriores." #. Tag: para -#: basic_mapping.xml:3254 +#: basic_mapping.xml:3290 #, no-c-format msgid "" "lazy (optional - defaults to proxy): " @@ -6649,7 +6686,7 @@ msgstr "" "procurada." #. Tag: para -#: basic_mapping.xml:3264 +#: basic_mapping.xml:3300 #, no-c-format msgid "" "not-found (optional - defaults to exceptionentity-name (optional): the entity name of the associated " @@ -6673,7 +6710,7 @@ msgstr "" "associada. " #. Tag: para -#: basic_mapping.xml:3277 +#: basic_mapping.xml:3313 #, no-c-format msgid "" "formula (optional): an SQL expression that defines the " @@ -6683,7 +6720,7 @@ msgstr "" "para uma chave exterior computed." #. Tag: para -#: basic_mapping.xml:3284 +#: basic_mapping.xml:3320 #, fuzzy, no-c-format msgid "" "Setting a value of the cascade attribute to any " @@ -6712,7 +6749,7 @@ msgstr "" "delete órfão: " #. Tag: para -#: basic_mapping.xml:3298 +#: basic_mapping.xml:3334 #, no-c-format msgid "" "Here is an example of a typical many-to-one declaration:" @@ -6721,14 +6758,14 @@ msgstr "" "literal>:" #. Tag: programlisting -#: basic_mapping.xml:3301 +#: basic_mapping.xml:3337 #, no-c-format msgid "" "<many-to-one name=\"product\" class=\"Product\" column=\"PRODUCT_ID\"/>" msgstr "" #. Tag: para -#: basic_mapping.xml:3303 +#: basic_mapping.xml:3339 #, no-c-format msgid "" "The property-ref attribute should only be used for " @@ -6748,7 +6785,7 @@ msgstr "" "com a ferramenta SchemaExport." #. Tag: programlisting -#: basic_mapping.xml:3311 +#: basic_mapping.xml:3347 #, no-c-format msgid "" "<property name=\"serialNumber\" unique=\"true\" type=\"string\" column=" @@ -6756,13 +6793,13 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:3313 +#: basic_mapping.xml:3349 #, no-c-format msgid "Then the mapping for OrderItem might use:" msgstr "Então o mapeamento para OrderItem poderia usar:" #. Tag: programlisting -#: basic_mapping.xml:3316 +#: basic_mapping.xml:3352 #, no-c-format msgid "" "<many-to-one name=\"product\" property-ref=\"serialNumber\" column=" @@ -6770,13 +6807,13 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:3318 +#: basic_mapping.xml:3354 #, no-c-format msgid "This is not encouraged, however." msgstr "No entanto, isto não é recomendável." #. Tag: para -#: basic_mapping.xml:3320 +#: basic_mapping.xml:3356 #, no-c-format msgid "" "If the referenced unique key comprises multiple properties of the associated " @@ -6788,7 +6825,7 @@ msgstr "" "elemento chamado <properties>" #. Tag: para -#: basic_mapping.xml:3324 +#: basic_mapping.xml:3360 #, no-c-format msgid "" "If the referenced unique key is the property of a component, you can specify " @@ -6798,7 +6835,7 @@ msgstr "" "pode especificar um caminho para a propriedade:" #. Tag: programlisting -#: basic_mapping.xml:3327 +#: basic_mapping.xml:3363 #, no-c-format msgid "" "<many-to-one name=\"owner\" property-ref=\"identity.ssn\" column=" @@ -6806,13 +6843,13 @@ msgid "" msgstr "" #. Tag: title -#: basic_mapping.xml:3331 +#: basic_mapping.xml:3367 #, no-c-format msgid "Sharing the primary key with the associated entity" msgstr "" #. Tag: para -#: basic_mapping.xml:3333 +#: basic_mapping.xml:3369 #, no-c-format msgid "" "The second approach is to ensure an entity and its associated entity share " @@ -6821,13 +6858,13 @@ msgid "" msgstr "" #. Tag: title -#: basic_mapping.xml:3339 +#: basic_mapping.xml:3375 #, fuzzy, no-c-format msgid "One to One association" msgstr "Associações de chave exterior exclusiva" #. Tag: programlisting -#: basic_mapping.xml:3341 +#: basic_mapping.xml:3377 #, no-c-format msgid "" "@Entity\n" @@ -6851,7 +6888,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:3345 +#: basic_mapping.xml:3381 #, no-c-format msgid "" "Many people got confused by these primary key based one to one associations. " @@ -6861,13 +6898,13 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:3352 +#: basic_mapping.xml:3388 #, no-c-format msgid "In hbm.xml, use the following mapping." msgstr "" #. Tag: programlisting -#: basic_mapping.xml:3377 +#: basic_mapping.xml:3413 #, no-c-format msgid "" "<one-to-one\n" @@ -6888,7 +6925,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:3397 +#: basic_mapping.xml:3433 #, no-c-format msgid "" "constrained (optional): specifies that a foreign key " @@ -6905,7 +6942,7 @@ msgstr "" "pode sofrer o proxie. Isto também é usado pela ferramenta schema export. " #. Tag: para -#: basic_mapping.xml:3413 +#: basic_mapping.xml:3449 #, no-c-format msgid "" "property-ref (optional): the name of a property of the " @@ -6917,7 +6954,7 @@ msgstr "" "especificada, a chave primária da classe associada é utilizada. " #. Tag: para -#: basic_mapping.xml:3426 +#: basic_mapping.xml:3462 #, no-c-format msgid "" "formula (optional): almost all one-to-one associations " @@ -6933,7 +6970,7 @@ msgstr "" "onetooneformula para exemplo. " #. Tag: para -#: basic_mapping.xml:3435 +#: basic_mapping.xml:3471 #, no-c-format msgid "" "lazy (optional - defaults to proxy): " @@ -6956,7 +6993,7 @@ msgstr "" "realizar uma busca antecipada na associação." #. Tag: para -#: basic_mapping.xml:3454 +#: basic_mapping.xml:3490 #, no-c-format msgid "" "Primary key associations do not need an extra table column. If two rows are " @@ -6971,7 +7008,7 @@ msgstr "" "deve ter certeza que foram atribuídos com o mesmo valor identificador." #. Tag: para -#: basic_mapping.xml:3460 +#: basic_mapping.xml:3496 #, no-c-format msgid "" "For a primary key association, add the following mappings to " @@ -6981,20 +7018,20 @@ msgstr "" "Employee e Person, respectivamente:" #. Tag: programlisting -#: basic_mapping.xml:3464 +#: basic_mapping.xml:3500 #, no-c-format msgid "<one-to-one name=\"person\" class=\"Person\"/>" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:3466 +#: basic_mapping.xml:3502 #, no-c-format msgid "" "<one-to-one name=\"employee\" class=\"Employee\" constrained=\"true\"/>" msgstr "" #. Tag: para -#: basic_mapping.xml:3468 +#: basic_mapping.xml:3504 #, no-c-format msgid "" "Ensure that the primary keys of the related rows in the PERSON and EMPLOYEE " @@ -7006,7 +7043,7 @@ msgstr "" "geração de identificador do Hibernate chamada foreign:" #. Tag: programlisting -#: basic_mapping.xml:3472 +#: basic_mapping.xml:3508 #, no-c-format msgid "" "<class name=\"person\" table=\"PERSON\">\n" @@ -7023,7 +7060,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:3474 +#: basic_mapping.xml:3510 #, no-c-format msgid "" "A newly saved instance of Person is assigned the same " @@ -7036,13 +7073,13 @@ msgstr "" "Person." #. Tag: title -#: basic_mapping.xml:3482 +#: basic_mapping.xml:3518 #, no-c-format msgid "Natural-id" msgstr "Id Natural" #. Tag: para -#: basic_mapping.xml:3484 +#: basic_mapping.xml:3520 #, fuzzy, no-c-format msgid "" "Although we recommend the use of surrogate keys as primary keys, you should " @@ -7062,7 +7099,7 @@ msgstr "" "apropriadamente auto documentado." #. Tag: programlisting -#: basic_mapping.xml:3493 +#: basic_mapping.xml:3529 #, no-c-format msgid "" "@Entity\n" @@ -7092,13 +7129,13 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:3495 +#: basic_mapping.xml:3531 #, no-c-format msgid "Or in XML," msgstr "" #. Tag: programlisting -#: basic_mapping.xml:3497 +#: basic_mapping.xml:3533 #, no-c-format msgid "" "<natural-id mutable=\"true|false\"/>\n" @@ -7109,7 +7146,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:3499 +#: basic_mapping.xml:3535 #, no-c-format msgid "" "It is recommended that you implement equals() and " @@ -7121,7 +7158,7 @@ msgstr "" "natural da entidade. " #. Tag: para -#: basic_mapping.xml:3503 +#: basic_mapping.xml:3539 #, no-c-format msgid "" "This mapping is not intended for use with entities that have natural primary " @@ -7131,7 +7168,7 @@ msgstr "" "primárias." #. Tag: para -#: basic_mapping.xml:3508 +#: basic_mapping.xml:3544 #, no-c-format msgid "" "mutable (optional - defaults to falseAny" msgstr "binary" #. Tag: para -#: basic_mapping.xml:3518 +#: basic_mapping.xml:3554 #, fuzzy, no-c-format msgid "" "There is one more type of property mapping. The @Any " @@ -7172,7 +7209,7 @@ msgstr "" "especiais. Por exemplo: audit logs, dados de sessão do usuário, etc. " #. Tag: para -#: basic_mapping.xml:3528 +#: basic_mapping.xml:3564 #, fuzzy, no-c-format msgid "" "The @Any annotation describes the column holding the " @@ -7191,7 +7228,7 @@ msgstr "" "valores do meta-type para nome de classes. " #. Tag: programlisting -#: basic_mapping.xml:3538 +#: basic_mapping.xml:3574 #, no-c-format msgid "" "@Any( metaColumn = @Column( name = \"property_type\" ), fetch=FetchType." @@ -7210,7 +7247,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:3540 +#: basic_mapping.xml:3576 #, no-c-format msgid "" "Note that @AnyDef can be mutualized and reused. It is " @@ -7218,7 +7255,7 @@ msgid "" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:3544 +#: basic_mapping.xml:3580 #, no-c-format msgid "" "//on a package\n" @@ -7242,13 +7279,13 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:3546 +#: basic_mapping.xml:3582 #, no-c-format msgid "The hbm.xml equivalent is:" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:3548 +#: basic_mapping.xml:3584 #, no-c-format msgid "" "<any name=\"being\" id-type=\"long\" meta-type=\"string\">\n" @@ -7261,13 +7298,13 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:3551 +#: basic_mapping.xml:3587 #, no-c-format msgid "You cannot mutualize the metadata in hbm.xml as you can in annotations." msgstr "" #. Tag: programlisting -#: basic_mapping.xml:3570 +#: basic_mapping.xml:3606 #, no-c-format msgid "" "<any\n" @@ -7288,19 +7325,19 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:3574 +#: basic_mapping.xml:3610 #, no-c-format msgid "name: the property name." msgstr "name: o nome da propriedade." #. Tag: para -#: basic_mapping.xml:3578 +#: basic_mapping.xml:3614 #, no-c-format msgid "id-type: the identifier type." msgstr "id-type: o tipo identificador." #. Tag: para -#: basic_mapping.xml:3582 +#: basic_mapping.xml:3618 #, no-c-format msgid "" "meta-type (optional - defaults to string): Qualquer tipo que é permitido para um mapeamento discriminador." #. Tag: para -#: basic_mapping.xml:3588 +#: basic_mapping.xml:3624 #, no-c-format msgid "" "cascade (optional- defaults to none): " @@ -7320,7 +7357,7 @@ msgstr "" "literal>): o estilo cascata." #. Tag: para -#: basic_mapping.xml:3599 +#: basic_mapping.xml:3635 #, no-c-format msgid "" "optimistic-lock (optional - defaults to true<properties> element allows the definition of a " @@ -7357,7 +7394,7 @@ msgstr "" "exemplo:" #. Tag: programlisting -#: basic_mapping.xml:3632 +#: basic_mapping.xml:3668 #, no-c-format msgid "" "<properties\n" @@ -7375,7 +7412,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:3636 +#: basic_mapping.xml:3672 #, no-c-format msgid "" "name: the logical name of the grouping. It is " @@ -7385,7 +7422,7 @@ msgstr "" "emphasis> é o nome atual de propriedade." #. Tag: para -#: basic_mapping.xml:3651 +#: basic_mapping.xml:3687 #, no-c-format msgid "" "optimistic-lock (optional - defaults to true<properties> " @@ -7409,7 +7446,7 @@ msgstr "" "literal>:" #. Tag: programlisting -#: basic_mapping.xml:3669 +#: basic_mapping.xml:3705 #, no-c-format msgid "" "<class name=\"Person\">\n" @@ -7426,7 +7463,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:3671 +#: basic_mapping.xml:3707 #, no-c-format msgid "" "You might have some legacy data association that refers to this unique key " @@ -7437,7 +7474,7 @@ msgstr "" "chave primária:" #. Tag: programlisting -#: basic_mapping.xml:3675 +#: basic_mapping.xml:3711 #, no-c-format msgid "" "<many-to-one name=\"owner\"\n" @@ -7449,7 +7486,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:3678 +#: basic_mapping.xml:3714 #, no-c-format msgid "" "When using annotations as a mapping strategy, such construct is not " @@ -7458,7 +7495,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:3685 +#: basic_mapping.xml:3721 #, no-c-format msgid "" "The use of this outside the context of mapping legacy data is not " @@ -7468,13 +7505,13 @@ msgstr "" "mapeamento de dados legados." #. Tag: title -#: basic_mapping.xml:3690 +#: basic_mapping.xml:3726 #, no-c-format msgid "Some hbm.xml specificities" msgstr "" #. Tag: para -#: basic_mapping.xml:3692 +#: basic_mapping.xml:3728 #, no-c-format msgid "" "The hbm.xml structure has some specificities naturally not present when " @@ -7482,13 +7519,13 @@ msgid "" msgstr "" #. Tag: title -#: basic_mapping.xml:3696 +#: basic_mapping.xml:3732 #, no-c-format msgid "Doctype" msgstr "Doctype" #. Tag: para -#: basic_mapping.xml:3698 +#: basic_mapping.xml:3734 #, no-c-format msgid "" "All XML mappings should declare the doctype shown. The actual DTD can be " @@ -7506,13 +7543,13 @@ msgstr "" "declaração do seu DTD com o conteúdo do seu classpath." #. Tag: title -#: basic_mapping.xml:3707 +#: basic_mapping.xml:3743 #, no-c-format msgid "EntityResolver" msgstr "Solucionador de Entidade" #. Tag: para -#: basic_mapping.xml:3709 +#: basic_mapping.xml:3745 #, no-c-format msgid "" "Hibernate will first attempt to resolve DTDs in its classpath. It does this " @@ -7528,12 +7565,12 @@ msgstr "" "nomes de espaço de sistemas Id diferentes:" #. Tag: para -#: basic_mapping.xml:3718 -#, no-c-format +#: basic_mapping.xml:3754 +#, fuzzy, no-c-format msgid "" "a hibernate namespace is recognized whenever the resolver " -"encounters a systemId starting with http://hibernate.sourceforge." -"net/. The resolver attempts to resolve these entities via the " +"encounters a systemId starting with http://www.hibernate.org/dtd/. The resolver attempts to resolve these entities via the " "classloader which loaded the Hibernate classes." msgstr "" "Um hibernate namespace é reconhecido quando um " @@ -7542,7 +7579,7 @@ msgstr "" "através do carregador de classe que carregou as classes do Hibernate. " #. Tag: para -#: basic_mapping.xml:3726 +#: basic_mapping.xml:3762 #, no-c-format msgid "" "a user namespace is recognized whenever the resolver " @@ -7558,13 +7595,13 @@ msgstr "" "classe (2) que carregou as classes do Hibernate. " #. Tag: para -#: basic_mapping.xml:3735 +#: basic_mapping.xml:3771 #, no-c-format msgid "The following is an example of utilizing user namespacing:" msgstr "Um exemplo de utilização do espaço de nome do usuário:" #. Tag: programlisting -#: basic_mapping.xml:3738 +#: basic_mapping.xml:3774 #, no-c-format msgid "" "types.xml is a resource in the your." @@ -7584,13 +7621,13 @@ msgstr "" "link> personalizado." #. Tag: title -#: basic_mapping.xml:3747 +#: basic_mapping.xml:3783 #, no-c-format msgid "Hibernate-mapping" msgstr "Mapeamento do Hibernate" #. Tag: para -#: basic_mapping.xml:3749 +#: basic_mapping.xml:3785 #, no-c-format msgid "" "This element has several optional attributes. The schema " @@ -7616,7 +7653,7 @@ msgstr "" "linguagem de consulta, por padrão." #. Tag: programlisting -#: basic_mapping.xml:3778 +#: basic_mapping.xml:3814 #, no-c-format msgid "" "<hibernate-mapping\n" @@ -7631,21 +7668,21 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:3782 +#: basic_mapping.xml:3818 #, no-c-format msgid "schema (optional): the name of a database schema." msgstr "" "schema (opcional): O nome do esquema do banco de dados. " #. Tag: para -#: basic_mapping.xml:3787 +#: basic_mapping.xml:3823 #, no-c-format msgid "catalog (optional): the name of a database catalog." msgstr "" "catalog (opcional): O nome do catálogo do banco de dados. " #. Tag: para -#: basic_mapping.xml:3792 +#: basic_mapping.xml:3828 #, no-c-format msgid "" "default-cascade (optional - defaults to none): Um estilo cascata padrão." #. Tag: para -#: basic_mapping.xml:3797 +#: basic_mapping.xml:3833 #, no-c-format msgid "" "default-access (optional - defaults to propertyPropertyAccessor." #. Tag: para -#: basic_mapping.xml:3804 +#: basic_mapping.xml:3840 #, no-c-format msgid "" "default-lazy (optional - defaults to trueauto-import (optional - defaults to truepackage (optional): specifies a package prefix to use for " @@ -7703,7 +7740,7 @@ msgstr "" "mapeamento. " #. Tag: para -#: basic_mapping.xml:3825 +#: basic_mapping.xml:3861 #, no-c-format msgid "" "If you have two persistent classes with the same unqualified name, you " @@ -7716,7 +7753,7 @@ msgstr "" "exceção." #. Tag: para -#: basic_mapping.xml:3830 +#: basic_mapping.xml:3866 #, no-c-format msgid "" "The hibernate-mapping element allows you to nest several " @@ -7737,13 +7774,13 @@ msgstr "" "estiver usando herança, Animal.hbm.xml. " #. Tag: title -#: basic_mapping.xml:3841 +#: basic_mapping.xml:3877 #, no-c-format msgid "Key" msgstr "" #. Tag: para -#: basic_mapping.xml:3843 +#: basic_mapping.xml:3879 #, fuzzy, no-c-format msgid "" "The <key> element is featured a few times within " @@ -7757,7 +7794,7 @@ msgstr "" "associada. Ele também referencia a chave primária da tabela original:" #. Tag: programlisting -#: basic_mapping.xml:3864 +#: basic_mapping.xml:3900 #, no-c-format msgid "" "<key\n" @@ -7771,7 +7808,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:3874 +#: basic_mapping.xml:3910 #, no-c-format msgid "" "on-delete (optional - defaults to noactionproperty-ref (optional): specifies that the foreign key " @@ -7795,7 +7832,7 @@ msgstr "" "os dados legados." #. Tag: para -#: basic_mapping.xml:3886 +#: basic_mapping.xml:3922 #, no-c-format msgid "" "not-null (optional): specifies that the foreign key " @@ -7807,7 +7844,7 @@ msgstr "" "a chave exterior também fizer parte da chave primária." #. Tag: para -#: basic_mapping.xml:3892 +#: basic_mapping.xml:3928 #, no-c-format msgid "" "update (optional): specifies that the foreign key should " @@ -7819,7 +7856,7 @@ msgstr "" "exterior também fizer parte da chave primária." #. Tag: para -#: basic_mapping.xml:3898 +#: basic_mapping.xml:3934 #, no-c-format msgid "" "unique (optional): specifies that the foreign key should " @@ -7831,7 +7868,7 @@ msgstr "" "exterior também fizer parte da chave primária." #. Tag: para -#: basic_mapping.xml:3905 +#: basic_mapping.xml:3941 #, no-c-format msgid "" "For systems where delete performance is important, we recommend that all " @@ -7849,7 +7886,7 @@ msgstr "" "da estratégia usual de bloqueio otimista do Hibernate para dados versionados." #. Tag: para -#: basic_mapping.xml:3913 +#: basic_mapping.xml:3949 #, no-c-format msgid "" "The not-null and update attributes are " @@ -7865,13 +7902,13 @@ msgstr "" "<key not-null=\"true\">." #. Tag: title -#: basic_mapping.xml:3922 +#: basic_mapping.xml:3958 #, no-c-format msgid "Import" msgstr "Importar " #. Tag: para -#: basic_mapping.xml:3924 +#: basic_mapping.xml:3960 #, no-c-format msgid "" "If your application has two persistent classes with the same name, and you " @@ -7887,13 +7924,13 @@ msgstr "" "até importar classes e interfaces que não estão explicitamente mapeadas:" #. Tag: programlisting -#: basic_mapping.xml:3930 +#: basic_mapping.xml:3966 #, no-c-format msgid "<import class=\"java.lang.Object\" rename=\"Universe\"/>" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:3939 +#: basic_mapping.xml:3975 #, no-c-format msgid "" "<import\n" @@ -7903,7 +7940,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:3943 +#: basic_mapping.xml:3979 #, no-c-format msgid "" "class: the fully qualified class name of any Java class." @@ -7912,7 +7949,7 @@ msgstr "" "Java." #. Tag: para -#: basic_mapping.xml:3948 +#: basic_mapping.xml:3984 #, no-c-format msgid "" "rename (optional - defaults to the unqualified class " @@ -7922,19 +7959,19 @@ msgstr "" "qualificada): Um nome que pode ser usado numa linguagem de consulta." #. Tag: para -#: basic_mapping.xml:3956 +#: basic_mapping.xml:3992 #, no-c-format msgid "This feature is unique to hbm.xml and is not supported in annotations." msgstr "" #. Tag: title -#: basic_mapping.xml:3962 +#: basic_mapping.xml:3998 #, no-c-format msgid "Column and formula elements" msgstr "Elementos coluna e fórmula " #. Tag: para -#: basic_mapping.xml:3964 +#: basic_mapping.xml:4000 #, no-c-format msgid "" "Mapping elements which accept a column attribute will " @@ -7948,7 +7985,7 @@ msgstr "" "alternativa para a função formula." #. Tag: programlisting -#: basic_mapping.xml:3970 +#: basic_mapping.xml:4006 #, no-c-format msgid "" "<column\n" @@ -7968,13 +8005,13 @@ msgid "" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:3972 +#: basic_mapping.xml:4008 #, no-c-format msgid "<formula>SQL expression</formula>" msgstr "" #. Tag: para -#: basic_mapping.xml:3974 +#: basic_mapping.xml:4010 #, no-c-format msgid "" "Most of the attributes on column provide a means of " @@ -7993,7 +8030,7 @@ msgstr "" "informações." #. Tag: para -#: basic_mapping.xml:3982 +#: basic_mapping.xml:4018 #, no-c-format msgid "" "The column and formula elements can " @@ -8005,7 +8042,7 @@ msgstr "" "expressar, por exemplo, condições de associações exóticas." #. Tag: programlisting -#: basic_mapping.xml:3986 +#: basic_mapping.xml:4022 #, no-c-format msgid "" "<many-to-one name=\"homeAddress\" class=\"Address\"\n" @@ -8016,19 +8053,19 @@ msgid "" msgstr "" #. Tag: title -#: basic_mapping.xml:3992 +#: basic_mapping.xml:4028 #, no-c-format msgid "Hibernate types" msgstr "Tipos do Hibernate " #. Tag: title -#: basic_mapping.xml:3995 +#: basic_mapping.xml:4031 #, no-c-format msgid "Entities and values" msgstr "Entidades e valores" #. Tag: para -#: basic_mapping.xml:3997 +#: basic_mapping.xml:4033 #, no-c-format msgid "" "In relation to the persistence service, Java language-level objects are " @@ -8038,7 +8075,7 @@ msgstr "" "relação ao serviço de persistência:" #. Tag: para -#: basic_mapping.xml:4000 +#: basic_mapping.xml:4036 #, no-c-format msgid "" "An entity exists independently of any other objects " @@ -8063,7 +8100,7 @@ msgstr "" "podem ser versionados." #. Tag: para -#: basic_mapping.xml:4010 +#: basic_mapping.xml:4046 #, no-c-format msgid "" "An entity's persistent state consists of references to other entities and " @@ -8087,7 +8124,7 @@ msgstr "" "assim eles não podem ser comuns para duas entidades ou coleções." #. Tag: para -#: basic_mapping.xml:4020 +#: basic_mapping.xml:4056 #, no-c-format msgid "" "Until now, we have been using the term \"persistent class\" to refer to " @@ -8117,13 +8154,13 @@ msgstr "" "de valor." #. Tag: para -#: basic_mapping.xml:4033 +#: basic_mapping.xml:4069 #, no-c-format msgid "We will revisit both concepts throughout this reference guide." msgstr "Iremos rever ambos os conceitos durante todo o guia de referência." #. Tag: para -#: basic_mapping.xml:4036 +#: basic_mapping.xml:4072 #, no-c-format msgid "" "The challenge is to map the Java type system, and the developers' definition " @@ -8150,7 +8187,7 @@ msgstr "" "estratégia de conversão adaptada, como você." #. Tag: para -#: basic_mapping.xml:4049 +#: basic_mapping.xml:4085 #, no-c-format msgid "" "With the exception of collections, all built-in Hibernate types support null " @@ -8160,13 +8197,13 @@ msgstr "" "nulas com a exceção das coleções." #. Tag: title -#: basic_mapping.xml:4054 +#: basic_mapping.xml:4090 #, no-c-format msgid "Basic value types" msgstr "Valores de tipos básicos" #. Tag: para -#: basic_mapping.xml:4056 +#: basic_mapping.xml:4092 #, no-c-format msgid "" "The built-in basic mapping types can be roughly " @@ -8176,7 +8213,7 @@ msgstr "" "categorização do seguinte:" #. Tag: literal -#: basic_mapping.xml:4059 +#: basic_mapping.xml:4095 #, fuzzy, no-c-format msgid "" "integer, long, short, float, double, character, byte, boolean, yes_no, " @@ -8186,7 +8223,7 @@ msgstr "" "yes_no, true_false" #. Tag: para -#: basic_mapping.xml:4063 +#: basic_mapping.xml:4099 #, no-c-format msgid "" "Type mappings from Java primitives or wrapper classes to appropriate (vendor-" @@ -8200,13 +8237,13 @@ msgstr "" "boolean ou java.lang.Boolean do Java." #. Tag: literal -#: basic_mapping.xml:4073 +#: basic_mapping.xml:4109 #, no-c-format msgid "string" msgstr "" #. Tag: para -#: basic_mapping.xml:4076 +#: basic_mapping.xml:4112 #, no-c-format msgid "" "A type mapping from java.lang.String to VARCHARVARCHAR (ou VARCHAR2 no Oracle)." #. Tag: literal -#: basic_mapping.xml:4083 +#: basic_mapping.xml:4119 #, fuzzy, no-c-format msgid "date, time, timestamp" msgstr "date, time, timestamp" #. Tag: para -#: basic_mapping.xml:4086 +#: basic_mapping.xml:4122 #, no-c-format msgid "" "Type mappings from java.util.Date and its subclasses to " @@ -8234,13 +8271,13 @@ msgstr "" "TIMESTAMP (ou equivalente)." #. Tag: literal -#: basic_mapping.xml:4094 +#: basic_mapping.xml:4130 #, fuzzy, no-c-format msgid "calendar, calendar_date" msgstr "calendar, calendar_date" #. Tag: para -#: basic_mapping.xml:4097 +#: basic_mapping.xml:4133 #, no-c-format msgid "" "Type mappings from java.util.Calendar to SQL types " @@ -8250,13 +8287,13 @@ msgstr "" "SQL TIMESTAMP e DATE (ou equivalente)." #. Tag: literal -#: basic_mapping.xml:4104 +#: basic_mapping.xml:4140 #, fuzzy, no-c-format msgid "big_decimal, big_integer" msgstr "big_decimal, big_integer" #. Tag: para -#: basic_mapping.xml:4107 +#: basic_mapping.xml:4143 #, no-c-format msgid "" "Type mappings from java.math.BigDecimal and java." @@ -8268,13 +8305,13 @@ msgstr "" "NUMBER no Oracle)." #. Tag: literal -#: basic_mapping.xml:4115 +#: basic_mapping.xml:4151 #, fuzzy, no-c-format msgid "locale, timezone, currency" msgstr "locale, timezone, currency" #. Tag: para -#: basic_mapping.xml:4118 +#: basic_mapping.xml:4154 #, no-c-format msgid "" "Type mappings from java.util.Locale, java.util." @@ -8292,13 +8329,13 @@ msgstr "" "são mapeados para seu ID." #. Tag: literal -#: basic_mapping.xml:4131 +#: basic_mapping.xml:4167 #, fuzzy, no-c-format msgid "class" msgstr "Classe" #. Tag: para -#: basic_mapping.xml:4134 +#: basic_mapping.xml:4170 #, no-c-format msgid "" "A type mapping from java.lang.Class to VARCHARClass é mapeada pelo seu nome qualificado (completo)." #. Tag: literal -#: basic_mapping.xml:4142 +#: basic_mapping.xml:4178 #, no-c-format msgid "binary" msgstr "" #. Tag: para -#: basic_mapping.xml:4145 +#: basic_mapping.xml:4181 #, no-c-format msgid "Maps byte arrays to an appropriate SQL binary type." msgstr "Mapeia matrizes de bytes para um tipo binário de SQL apropriado." #. Tag: literal -#: basic_mapping.xml:4150 +#: basic_mapping.xml:4186 #, no-c-format msgid "text" msgstr "" #. Tag: para -#: basic_mapping.xml:4153 -#, no-c-format +#: basic_mapping.xml:4189 +#, fuzzy, no-c-format msgid "" -"Maps long Java strings to a SQL CLOB or TEXT type." +"Maps long Java strings to a SQL LONGVARCHAR or " +"TEXT type." msgstr "" "Mapeia strings de Java longos para um tipo SQL CLOB ou " "TEXT. " #. Tag: literal -#: basic_mapping.xml:4159 +#: basic_mapping.xml:4195 +#, no-c-format +msgid "image" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:4198 +#, fuzzy, no-c-format +msgid "Maps long byte arrays to a SQL LONGVARBINARY." +msgstr "" +"Mapeia strings de Java longos para um tipo SQL CLOB ou " +"TEXT. " + +#. Tag: literal +#: basic_mapping.xml:4203 #, no-c-format msgid "serializable" msgstr "" #. Tag: para -#: basic_mapping.xml:4162 +#: basic_mapping.xml:4206 #, no-c-format msgid "" "Maps serializable Java types to an appropriate SQL binary type. You can also " @@ -8357,13 +8408,13 @@ msgstr "" "tipo básico. " #. Tag: literal -#: basic_mapping.xml:4171 +#: basic_mapping.xml:4215 #, no-c-format msgid "clob, blob" msgstr "" #. Tag: para -#: basic_mapping.xml:4174 +#: basic_mapping.xml:4218 #, no-c-format msgid "" "Type mappings for the JDBC classes java.sql.Clob and " @@ -8378,7 +8429,41 @@ msgstr "" "e inconsistente." #. Tag: literal -#: basic_mapping.xml:4184 +#: basic_mapping.xml:4228 +#, no-c-format +msgid "materialized_clob" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:4231 +#, no-c-format +msgid "" +"Maps long Java strings to a SQL CLOB type. When read, the " +"CLOB value is immediately materialized into a Java " +"string. Some drivers require the CLOB value to be read " +"within a transaction. Once materialized, the Java string is available " +"outside of the transaction." +msgstr "" + +#. Tag: literal +#: basic_mapping.xml:4241 +#, no-c-format +msgid "materialized_blob" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:4244 +#, no-c-format +msgid "" +"Maps long Java byte arrays to a SQL BLOB type. When read, " +"the BLOB value is immediately materialized into a byte " +"array. Some drivers require the BLOB value to be read " +"within a transaction. Once materialized, the byte array is available outside " +"of the transaction." +msgstr "" + +#. Tag: literal +#: basic_mapping.xml:4254 #, fuzzy, no-c-format msgid "" "imm_date, imm_time, imm_timestamp, imm_calendar, imm_calendar_date, " @@ -8388,7 +8473,7 @@ msgstr "" "imm_serializable, imm_binary" #. Tag: para -#: basic_mapping.xml:4188 +#: basic_mapping.xml:4258 #, no-c-format msgid "" "Type mappings for what are considered mutable Java types. This is where " @@ -8408,7 +8493,7 @@ msgstr "" "aplicação deve atribuir um novo objeto (nonidentical) à propriedade." #. Tag: para -#: basic_mapping.xml:4200 +#: basic_mapping.xml:4270 #, no-c-format msgid "" "Unique identifiers of entities and collections can be of any basic type " @@ -8422,7 +8507,7 @@ msgstr "" "Leia abaixo para maiores informações." #. Tag: para -#: basic_mapping.xml:4205 +#: basic_mapping.xml:4275 #, no-c-format msgid "" "The basic value types have corresponding Type constants " @@ -8436,13 +8521,13 @@ msgstr "" "string." #. Tag: title -#: basic_mapping.xml:4212 +#: basic_mapping.xml:4282 #, no-c-format msgid "Custom value types" msgstr "Tipos de valores personalizados" #. Tag: para -#: basic_mapping.xml:4214 +#: basic_mapping.xml:4284 #, no-c-format msgid "" "It is relatively easy for developers to create their own value types. For " @@ -8467,7 +8552,7 @@ msgstr "" "SURNAME. " #. Tag: para -#: basic_mapping.xml:4225 +#: basic_mapping.xml:4295 #, no-c-format msgid "" "To implement a custom type, implement either org.hibernate." @@ -8483,7 +8568,7 @@ msgstr "" "funcionalidades. " #. Tag: programlisting -#: basic_mapping.xml:4232 +#: basic_mapping.xml:4302 #, no-c-format msgid "" "<property name=\"twoStrings\" type=\"org.hibernate.test.DoubleStringType" @@ -8494,7 +8579,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:4234 +#: basic_mapping.xml:4304 #, no-c-format msgid "" "Notice the use of <column> tags to map a property " @@ -8504,7 +8589,7 @@ msgstr "" "propriedade para colunas múltiplas." #. Tag: para -#: basic_mapping.xml:4237 +#: basic_mapping.xml:4307 #, no-c-format msgid "" "The CompositeUserType, EnhancedUserTypeUserType in the " @@ -8534,7 +8619,7 @@ msgstr "" "o elemento <type> em seus arquivos de mapeamento. " #. Tag: programlisting -#: basic_mapping.xml:4250 +#: basic_mapping.xml:4320 #, no-c-format msgid "" "<property name=\"priority\">\n" @@ -8545,7 +8630,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:4252 +#: basic_mapping.xml:4322 #, no-c-format msgid "" "The UserType can now retrieve the value for the parameter " @@ -8557,7 +8642,7 @@ msgstr "" "passado a ele." #. Tag: para -#: basic_mapping.xml:4256 +#: basic_mapping.xml:4326 #, no-c-format msgid "" "If you regularly use a certain UserType, it is useful to " @@ -8573,7 +8658,7 @@ msgstr "" "padrão se o tipo for parametrizado." #. Tag: programlisting -#: basic_mapping.xml:4262 +#: basic_mapping.xml:4332 #, no-c-format msgid "" "<typedef class=\"com.mycompany.usertypes.DefaultValueIntegerType\" name=" @@ -8583,13 +8668,13 @@ msgid "" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:4264 +#: basic_mapping.xml:4334 #, no-c-format msgid "<property name=\"priority\" type=\"default_zero\"/>" msgstr "" #. Tag: para -#: basic_mapping.xml:4266 +#: basic_mapping.xml:4336 #, no-c-format msgid "" "It is also possible to override the parameters supplied in a typedef on a " @@ -8600,7 +8685,7 @@ msgstr "" "mapeamento da propriedade." #. Tag: para -#: basic_mapping.xml:4270 +#: basic_mapping.xml:4340 #, no-c-format msgid "" "Even though Hibernate's rich range of built-in types and support for " @@ -8623,13 +8708,13 @@ msgstr "" "contra mudanças possíveis na forma de representação de valores monetários. " #. Tag: title -#: basic_mapping.xml:4283 +#: basic_mapping.xml:4353 #, no-c-format msgid "Mapping a class more than once" msgstr "Mapeando uma classe mais de uma vez" #. Tag: para -#: basic_mapping.xml:4285 +#: basic_mapping.xml:4355 #, no-c-format msgid "" "It is possible to provide more than one mapping for a particular persistent " @@ -8648,7 +8733,7 @@ msgstr "" "associações para a entidade nomeada. " #. Tag: programlisting -#: basic_mapping.xml:4293 +#: basic_mapping.xml:4363 #, no-c-format msgid "" "<class name=\"Contract\" table=\"Contracts\"\n" @@ -8671,7 +8756,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:4295 +#: basic_mapping.xml:4365 #, no-c-format msgid "" "Associations are now specified using entity-name instead " @@ -8681,19 +8766,19 @@ msgstr "" "entity-name ao invés da class. " #. Tag: para -#: basic_mapping.xml:4299 basic_mapping.xml:4379 basic_mapping.xml:4414 +#: basic_mapping.xml:4369 basic_mapping.xml:4497 #, no-c-format msgid "This feature is not supported in Annotations" msgstr "" #. Tag: title -#: basic_mapping.xml:4304 +#: basic_mapping.xml:4374 #, no-c-format msgid "SQL quoted identifiers" msgstr "Identificadores quotados do SQL" #. Tag: para -#: basic_mapping.xml:4306 +#: basic_mapping.xml:4376 #, no-c-format msgid "" "You can force Hibernate to quote an identifier in the generated SQL by " @@ -8709,7 +8794,7 @@ msgstr "" "para o Servidor SQL e backticks para MeuSQL." #. Tag: programlisting -#: basic_mapping.xml:4312 +#: basic_mapping.xml:4382 #, no-c-format msgid "" "@Entity @Table(name=\"`Line Item`\")\n" @@ -8727,13 +8812,13 @@ msgid "" msgstr "" #. Tag: title -#: basic_mapping.xml:4316 +#: basic_mapping.xml:4386 #, no-c-format msgid "Generated properties" msgstr "Propriedades geradas " #. Tag: para -#: basic_mapping.xml:4318 +#: basic_mapping.xml:4388 #, no-c-format msgid "" "Generated properties are properties that have their values generated by the " @@ -8754,7 +8839,7 @@ msgstr "" "para recuperar os valores gerados." #. Tag: para -#: basic_mapping.xml:4327 +#: basic_mapping.xml:4397 #, no-c-format msgid "" "Properties marked as generated must additionally be non-insertable and non-" @@ -8770,7 +8855,7 @@ msgstr "" "\">simple properties podem ser marcadas como geradas." #. Tag: para -#: basic_mapping.xml:4334 +#: basic_mapping.xml:4404 #, no-c-format msgid "" "never (the default): the given property value is not " @@ -8780,7 +8865,7 @@ msgstr "" "dado não é gerado dentro do banco de dados. " #. Tag: para -#: basic_mapping.xml:4337 +#: basic_mapping.xml:4407 #, no-c-format msgid "" "insert: the given property value is generated on insert, " @@ -8799,7 +8884,7 @@ msgstr "" "disponível." #. Tag: para -#: basic_mapping.xml:4344 +#: basic_mapping.xml:4414 #, no-c-format msgid "" "always: the property value is generated both on insert " @@ -8809,19 +8894,19 @@ msgstr "" "tanto ao inserir quanto ao atualizar. " #. Tag: para -#: basic_mapping.xml:4347 +#: basic_mapping.xml:4417 #, no-c-format msgid "To mark a property as generated, use @Generated." msgstr "" #. Tag: title -#: basic_mapping.xml:4352 -#, no-c-format -msgid "Column read and write expressions" +#: basic_mapping.xml:4422 +#, fuzzy, no-c-format +msgid "Column transformers: read and write expressions" msgstr "Coluna de expressöes de gravação e leitura" #. Tag: para -#: basic_mapping.xml:4354 +#: basic_mapping.xml:4424 #, fuzzy, no-c-format msgid "" "Hibernate allows you to customize the SQL it uses to read and write the " @@ -8840,7 +8925,30 @@ msgstr "" "programlisting>" #. Tag: programlisting -#: basic_mapping.xml:4359 +#: basic_mapping.xml:4430 +#, no-c-format +msgid "" +"@Entity\n" +"class CreditCard {\n" +" @Column(name=\"credit_card_num\")\n" +" @ColumnTransformer(\n" +" read=\"decrypt(credit_card_num)\", \n" +" write=\"encrypt(?)\")\n" +" public String getCreditCardNumber() { return creditCardNumber; }\n" +" public void setCreditCardNumber(String number) { this.creditCardNumber = " +"number; }\n" +" private String creditCardNumber;\n" +"}" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:4432 +#, no-c-format +msgid "or in XML" +msgstr "" + +#. Tag: programlisting +#: basic_mapping.xml:4434 #, no-c-format msgid "" "<property name=\"creditCardNumber\">\n" @@ -8852,7 +8960,44 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:4361 +#: basic_mapping.xml:4437 +#, no-c-format +msgid "" +"You can use the plural form @ColumnTransformers if " +"more than one columns need to define either of these rules." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:4442 +#, no-c-format +msgid "" +"If a property uses more that one column, you must use the " +"forColumn attribute to specify which column, the " +"expressions are targeting." +msgstr "" + +#. Tag: programlisting +#: basic_mapping.xml:4446 +#, no-c-format +msgid "" +"@Entity\n" +"class User {\n" +" @Type(type=\"com.acme.type.CreditCardType\")\n" +" @Columns( {\n" +" @Column(name=\"credit_card_num\"),\n" +" @Column(name=\"exp_date\") } )\n" +" @ColumnTransformer(\n" +" forColumn=\"credit_card_num\", \n" +" read=\"decrypt(credit_card_num)\", \n" +" write=\"encrypt(?)\")\n" +" public CreditCard getCreditCard() { return creditCard; }\n" +" public void setCreditCard(CreditCard card) { this.creditCard = card; }\n" +" private CreditCard creditCard;\n" +"}" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:4448 #, no-c-format msgid "" "Hibernate applies the custom expressions automatically whenever the property " @@ -8865,7 +9010,7 @@ msgstr "" "diferenças:" #. Tag: para -#: basic_mapping.xml:4366 +#: basic_mapping.xml:4453 #, no-c-format msgid "" "The property is backed by one or more columns that are exported as part of " @@ -8875,13 +9020,13 @@ msgstr "" "parte da geração do esquema automático." #. Tag: para -#: basic_mapping.xml:4371 +#: basic_mapping.xml:4458 #, no-c-format msgid "The property is read-write, not read-only." msgstr "Esta propriedade é de gravação-leitura, e não de leitura apenas." #. Tag: para -#: basic_mapping.xml:4375 +#: basic_mapping.xml:4462 #, no-c-format msgid "" "The write expression, if specified, must contain exactly " @@ -8891,13 +9036,13 @@ msgstr "" "'?' para o valor." #. Tag: title -#: basic_mapping.xml:4384 +#: basic_mapping.xml:4467 #, no-c-format msgid "Auxiliary database objects" msgstr "Objetos de Banco de Dados Auxiliares " #. Tag: para -#: basic_mapping.xml:4386 +#: basic_mapping.xml:4469 #, no-c-format msgid "" "Auxiliary database objects allow for the CREATE and DROP of arbitrary " @@ -8919,7 +9064,7 @@ msgstr "" "módulos essenciais para definir objetos de banco de dados auxiliares:" #. Tag: para -#: basic_mapping.xml:4396 +#: basic_mapping.xml:4479 #, no-c-format msgid "" "The first mode is to explicitly list the CREATE and DROP commands in the " @@ -8929,7 +9074,7 @@ msgstr "" "arquivo de mapeamento: " #. Tag: programlisting -#: basic_mapping.xml:4399 +#: basic_mapping.xml:4482 #, no-c-format msgid "" "<hibernate-mapping>\n" @@ -8942,7 +9087,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:4401 +#: basic_mapping.xml:4484 #, no-c-format msgid "" "The second mode is to supply a custom class that constructs the CREATE and " @@ -8954,7 +9099,7 @@ msgstr "" "org.hibernate.mapping.AuxiliaryDatabaseObject. " #. Tag: programlisting -#: basic_mapping.xml:4406 +#: basic_mapping.xml:4489 #, no-c-format msgid "" "<hibernate-mapping>\n" @@ -8966,7 +9111,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:4408 +#: basic_mapping.xml:4491 #, no-c-format msgid "" "Additionally, these database objects can be optionally scoped so that they " @@ -8976,7 +9121,7 @@ msgstr "" "só será aplicado quando certos dialetos forem utilizados. " #. Tag: programlisting -#: basic_mapping.xml:4411 +#: basic_mapping.xml:4494 #, no-c-format msgid "" "<hibernate-mapping>\n" @@ -8991,6 +9136,15 @@ msgid "" "</hibernate-mapping>" msgstr "" +#~ msgid "" +#~ "The force attribute is only useful if the table " +#~ "contains rows with \"extra\" discriminator values that are not mapped to " +#~ "a persistent class. This will not usually be the case." +#~ msgstr "" +#~ "O atributo force é útil (apenas) em tabelas contendo " +#~ "linhas com valores discriminadores \"extras\" que não estão mapeados para " +#~ "uma classe persistente. Este não é geralmente o caso." + #~ msgid "" #~ "Use of select-before-update will usually decrease " #~ "performance. It is useful to prevent a database update trigger being " diff --git a/documentation/manual/src/main/docbook/pt-BR/content/type.po b/documentation/manual/src/main/docbook/pt-BR/content/type.po index 4080e8d15e..55d89442c2 100644 --- a/documentation/manual/src/main/docbook/pt-BR/content/type.po +++ b/documentation/manual/src/main/docbook/pt-BR/content/type.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: http://bugs.kde.org\n" -"POT-Creation-Date: 2010-07-21 04:35+0000\n" +"POT-Creation-Date: 2011-01-21 21:18+0000\n" "PO-Revision-Date: 2010-07-21 04:32+0000\n" "Last-Translator: Automatically generated\n" "Language-Team: none\n" @@ -714,25 +714,53 @@ msgstr "" #. Tag: classname #: type.xml:456 #, no-c-format -msgid "java.lang.Class" +msgid "java.net.URL" msgstr "" #. Tag: classname #: type.xml:459 #, no-c-format -msgid "org.hibernate.type.ClassType" +msgid "org.hibernate.type.UrlType" msgstr "" #. Tag: para #: type.xml:461 #, no-c-format msgid "" +"Maps a java.net.URL to a JDBC VARCHAR (using the " +"external form)" +msgstr "" + +#. Tag: para +#: type.xml:464 +#, no-c-format +msgid "" +"Registered under url and java.net.URL " +"in the type registry (see )." +msgstr "" + +#. Tag: classname +#: type.xml:473 +#, no-c-format +msgid "java.lang.Class" +msgstr "" + +#. Tag: classname +#: type.xml:476 +#, no-c-format +msgid "org.hibernate.type.ClassType" +msgstr "" + +#. Tag: para +#: type.xml:478 +#, no-c-format +msgid "" "Maps a java.lang.Class to a JDBC VARCHAR (using the " "Class name)" msgstr "" #. Tag: para -#: type.xml:464 +#: type.xml:481 #, no-c-format msgid "" "Registered under class and java.lang.Classjava.sql.Blob to a JDBC BLOB" msgstr "" #. Tag: para -#: type.xml:481 +#: type.xml:498 #, no-c-format msgid "" "Registered under blob and java.sql.Blobjava.sql.Clob to a JDBC CLOB" msgstr "" #. Tag: para -#: type.xml:498 +#: type.xml:515 #, no-c-format msgid "" "Registered under clob and java.sql.Clobbinary and byte[] in " @@ -818,33 +846,59 @@ msgid "" msgstr "" #. Tag: classname -#: type.xml:522 +#: type.xml:539 #, no-c-format msgid "org.hibernate.type.MaterializedBlobType" msgstr "" #. Tag: para -#: type.xml:524 +#: type.xml:541 #, no-c-format msgid "Maps a primitive byte[] to a JDBC BLOB" msgstr "" #. Tag: para -#: type.xml:527 +#: type.xml:544 #, no-c-format msgid "" "Registered under materialized_blob in the type registry " "(see )." msgstr "" +#. Tag: classname +#: type.xml:551 +#, no-c-format +msgid "org.hibernate.type.ImageType" +msgstr "" + #. Tag: para -#: type.xml:541 +#: type.xml:553 +#, no-c-format +msgid "Maps a primitive byte[] to a JDBC LONGVARBINARY" +msgstr "" + +#. Tag: para +#: type.xml:556 +#, no-c-format +msgid "" +"Registered under image in the type registry (see )." +msgstr "" + +#. Tag: title +#: type.xml:565 +#, no-c-format +msgid "Byte[]" +msgstr "" + +#. Tag: para +#: type.xml:570 #, no-c-format msgid "Maps a java.lang.Byte[] to a JDBC VARBINARY" msgstr "" #. Tag: para -#: type.xml:544 +#: type.xml:573 #, no-c-format msgid "" "Registered under wrapper-binary, Byte[]characters and char[] " "in the type registry (see )." msgstr "" +#. Tag: title +#: type.xml:599 +#, no-c-format +msgid "Character[]" +msgstr "" + #. Tag: classname -#: type.xml:573 +#: type.xml:602 #, no-c-format msgid "org.hibernate.type.CharacterArrayType" msgstr "" #. Tag: para -#: type.xml:575 +#: type.xml:604 #, no-c-format msgid "Maps a java.lang.Character[] to a JDBC VARCHAR" msgstr "" #. Tag: para -#: type.xml:578 +#: type.xml:607 #, no-c-format msgid "" "Registered under wrapper-characters, Character[]" @@ -900,25 +960,25 @@ msgid "" msgstr "" #. Tag: classname -#: type.xml:587 +#: type.xml:616 #, no-c-format msgid "java.util.UUID" msgstr "" #. Tag: classname -#: type.xml:590 +#: type.xml:619 #, no-c-format msgid "org.hibernate.type.UUIDBinaryType" msgstr "" #. Tag: para -#: type.xml:592 +#: type.xml:621 #, no-c-format msgid "Maps a java.util.UUID to a JDBC BINARY" msgstr "" #. Tag: para -#: type.xml:595 +#: type.xml:624 #, no-c-format msgid "" "Registered under uuid-binary and java.util.UUIDuuid-char in the type registry (see " @@ -948,13 +1008,13 @@ msgid "" msgstr "" #. Tag: classname -#: type.xml:614 +#: type.xml:643 #, no-c-format msgid "org.hibernate.type.PostgresUUIDType" msgstr "" #. Tag: para -#: type.xml:616 +#: type.xml:645 #, no-c-format msgid "" "Maps a java.util.UUID to the PostgreSQL UUID data type (through " @@ -963,7 +1023,7 @@ msgid "" msgstr "" #. Tag: para -#: type.xml:620 +#: type.xml:649 #, no-c-format msgid "" "Registered under pg-uuid in the type registry (see ." msgstr "" #. Tag: title -#: type.xml:686 +#: type.xml:715 #, no-c-format msgid "Entity types" msgstr "" #. Tag: para -#: type.xml:687 +#: type.xml:716 #, no-c-format msgid "" "The definition of entities is covered in detail in to that Product sku. " @@ -1118,19 +1178,19 @@ msgid "" msgstr "" #. Tag: para -#: type.xml:722 +#: type.xml:751 #, no-c-format msgid "TBC..." msgstr "" #. Tag: title -#: type.xml:728 +#: type.xml:757 #, no-c-format msgid "Custom types" msgstr "" #. Tag: para -#: type.xml:729 +#: type.xml:758 #, no-c-format msgid "" "Hibernate makes it relatively easy for developers to create their own " @@ -1144,7 +1204,7 @@ msgid "" msgstr "" #. Tag: para -#: type.xml:737 +#: type.xml:766 #, no-c-format msgid "" "There are 3 approaches to developing a custom Hibernate type. As a means of " @@ -1155,14 +1215,14 @@ msgid "" msgstr "" #. Tag: title -#: type.xml:744 +#: type.xml:773 #, no-c-format msgid "" "Custom types using org.hibernate.type.Type" msgstr "" #. Tag: para -#: type.xml:745 +#: type.xml:774 #, no-c-format msgid "" "The first approach is to directly implement the org.hibernate." @@ -1178,13 +1238,13 @@ msgid "" msgstr "" #. Tag: title -#: type.xml:756 +#: type.xml:785 #, no-c-format msgid "Defining and registering the custom Type" msgstr "" #. Tag: programlisting -#: type.xml:757 +#: type.xml:786 #, no-c-format msgid "" "before " @@ -1257,7 +1317,7 @@ msgid "" msgstr "" #. Tag: title -#: type.xml:767 +#: type.xml:796 #, no-c-format msgid "" "Custom types using org.hibernate.usertype.UserTypeorg.hibernate.usertype.UserType and " @@ -1275,7 +1335,7 @@ msgid "" msgstr "" #. Tag: para -#: type.xml:776 +#: type.xml:805 #, no-c-format msgid "" "The second approach is the use the org.hibernate.usertype." @@ -1287,13 +1347,13 @@ msgid "" msgstr "" #. Tag: title -#: type.xml:783 +#: type.xml:812 #, no-c-format msgid "Defining the custom UserType" msgstr "" #. Tag: programlisting -#: type.xml:784 +#: type.xml:813 #, no-c-format msgid "" "org.hibernate.type." @@ -1351,7 +1411,7 @@ msgid "" msgstr "" #. Tag: title -#: type.xml:796 +#: type.xml:825 #, no-c-format msgid "" "Custom types using org.hibernate.usertype.CompositeUserTypeorg.hibernate." @@ -1374,13 +1434,13 @@ msgid "" msgstr "" #. Tag: title -#: type.xml:808 +#: type.xml:837 #, no-c-format msgid "Defining the custom CompositeUserType" msgstr "" #. Tag: programlisting -#: type.xml:809 +#: type.xml:838 #, no-c-format msgid "" "StringType" msgstr "" #. Tag: programlisting -#: type.xml:831 +#: type.xml:860 #, no-c-format msgid "" "registerTypeOverride is a " @@ -1525,13 +1585,13 @@ msgid "" msgstr "" #. Tag: title -#: type.xml:839 +#: type.xml:868 #, no-c-format msgid "Snippet from BasicType.java" msgstr "" #. Tag: programlisting -#: type.xml:840 +#: type.xml:869 #, no-c-format msgid "" "/**\n" @@ -1544,7 +1604,7 @@ msgid "" msgstr "" #. Tag: para -#: type.xml:842 +#: type.xml:871 #, no-c-format msgid "" "One approach is to use inheritance (SuperDuperStringType\n" "Language-Team: \n" @@ -182,8 +182,7 @@ msgid "" "<?xml version=\"1.0\"?>\n" "<!DOCTYPE hibernate-mapping PUBLIC\n" " \"-//Hibernate/Hibernate Mapping DTD 3.0//EN\"\n" -" \"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd" -"\">\n" +" \"http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd\">\n" "\n" "<hibernate-mapping package=\"eg\">\n" "\n" @@ -800,7 +799,7 @@ msgstr "" "类的实例是可变的或者不可变的。 " #. Tag: para -#: basic_mapping.xml:349 basic_mapping.xml:2912 +#: basic_mapping.xml:349 basic_mapping.xml:2948 #, no-c-format msgid "" "schema (optional): overrides the schema name specified by " @@ -810,7 +809,7 @@ msgstr "" "mapping> 元素中指定的 schema 名字。 " #. Tag: para -#: basic_mapping.xml:355 basic_mapping.xml:2918 +#: basic_mapping.xml:355 basic_mapping.xml:2954 #, no-c-format msgid "" "catalog (optional): overrides the catalog name specified " @@ -1139,7 +1138,7 @@ msgid "" msgstr "name(可选):标识属性的名字。 " #. Tag: para -#: basic_mapping.xml:518 basic_mapping.xml:2141 +#: basic_mapping.xml:518 basic_mapping.xml:2152 #, no-c-format msgid "" "type (optional): a name that indicates the Hibernate type." @@ -3479,8 +3478,8 @@ msgstr "timestamp(可选) " #, fuzzy, no-c-format msgid "" "Alternatively, you can use a timestamp. Timestamps are a less safe " -"implementation of optimistic locking. However, sometimes the application " -"might use the timestamps in other ways." +"implementation of optimistic locking. However, sometimes an application " +"might use the timestamps in other ways as well." msgstr "" "可选的 <timestamp> 元素指明了表中包含时间戳数据。这" "用来作为版本的替代。时间戳本质上是一种对乐观锁定的一种不是特别安全的实现。当" @@ -3510,19 +3509,33 @@ msgstr "" #: basic_mapping.xml:1598 #, no-c-format msgid "" -"Like version numbers, the timestamp can be generated by the database instead " -"of Hibernate. To do that, use @org.hibernate.annotations.Generated" -"(GenerationTime.ALWAYS)." +"When using timestamp versioning you can tell Hibernate where to retrieve the " +"timestamp value from - database or JVM - by optionally adding the " +"@org.hibernate.annotations.Source annotation to the " +"property. Possible values for the value attribute of the annotation are " +"org.hibernate.annotations.SourceType.VM and " +"org.hibernate.annotations.SourceType.DB. The default " +"is SourceType.DB which is also used in case there is " +"no @Source annotation at all." msgstr "" #. Tag: para -#: basic_mapping.xml:1602 +#: basic_mapping.xml:1609 +#, no-c-format +msgid "" +"Like in the case of version numbers, the timestamp can also be generated by " +"the database instead of Hibernate. To do that, use @org.hibernate." +"annotations.Generated(GenerationTime.ALWAYS)." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1613 #, fuzzy, no-c-format msgid "In hbm.xml, use the <timestamp> element:" msgstr "例如,如果我们有如下的 <properties> 映射:" #. Tag: programlisting -#: basic_mapping.xml:1620 +#: basic_mapping.xml:1631 #, fuzzy, no-c-format msgid "" "<timestamp\n" @@ -3546,7 +3559,7 @@ msgstr "" "/>]]>" #. Tag: para -#: basic_mapping.xml:1624 +#: basic_mapping.xml:1635 #, no-c-format msgid "" "column (optional - defaults to the property name): the " @@ -3555,7 +3568,7 @@ msgstr "" "column(可选 — 默认为属性名):存有时间戳的字段名。 " #. Tag: para -#: basic_mapping.xml:1630 +#: basic_mapping.xml:1641 #, no-c-format msgid "" "name: the name of a JavaBeans style property of Java type " @@ -3566,8 +3579,8 @@ msgstr "" "是 Date 或者 Timestamp 的。 " #. Tag: para -#: basic_mapping.xml:1636 basic_mapping.xml:2163 basic_mapping.xml:2380 -#: basic_mapping.xml:3226 basic_mapping.xml:3420 basic_mapping.xml:3593 +#: basic_mapping.xml:1647 basic_mapping.xml:2174 basic_mapping.xml:2391 +#: basic_mapping.xml:3262 basic_mapping.xml:3456 basic_mapping.xml:3629 #, no-c-format msgid "" "access (optional - defaults to propertyunsaved-value (optional - defaults to nullundefined 指明使用标识属性值进行这种判断。) " #. Tag: para -#: basic_mapping.xml:1652 +#: basic_mapping.xml:1663 #, no-c-format msgid "" "source (optional - defaults to vm): " @@ -3612,7 +3625,7 @@ msgstr "" "(例如 Oracle 8)。 " #. Tag: para -#: basic_mapping.xml:1665 +#: basic_mapping.xml:1676 #, no-c-format msgid "" "generated (optional - defaults to nevergenerated properties 的讨论。 " #. Tag: title -#: basic_mapping.xml:1675 +#: basic_mapping.xml:1686 #, no-c-format msgid "Note" msgstr "注意" #. Tag: para -#: basic_mapping.xml:1677 +#: basic_mapping.xml:1688 #, no-c-format msgid "" "<Timestamp> is equivalent to <version " @@ -3645,13 +3658,13 @@ msgstr "" "是等价的。 " #. Tag: title -#: basic_mapping.xml:1686 +#: basic_mapping.xml:1697 #, no-c-format msgid "Property" msgstr "Property" #. Tag: para -#: basic_mapping.xml:1688 +#: basic_mapping.xml:1699 #, no-c-format msgid "" "You need to decide which property needs to be made persistent in a given " @@ -3660,13 +3673,13 @@ msgid "" msgstr "" #. Tag: title -#: basic_mapping.xml:1693 +#: basic_mapping.xml:1704 #, no-c-format msgid "Property mapping with annotations" msgstr "" #. Tag: para -#: basic_mapping.xml:1695 +#: basic_mapping.xml:1706 #, no-c-format msgid "" "In the annotations world, every non static non transient property (field or " @@ -3677,7 +3690,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:1702 +#: basic_mapping.xml:1713 #, no-c-format msgid "" "The @Basic annotation allows you to declare the fetching " @@ -3693,13 +3706,13 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:1715 +#: basic_mapping.xml:1726 #, no-c-format msgid "Let's look at a few examples:" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:1717 +#: basic_mapping.xml:1728 #, no-c-format msgid "" "public transient int counter; //transient property\n" @@ -3725,7 +3738,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:1719 +#: basic_mapping.xml:1730 #, no-c-format msgid "" "counter, a transient field, and lengthInMeter@Lob indicates that the property should be persisted in a " @@ -3780,7 +3793,7 @@ msgid "" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:1759 +#: basic_mapping.xml:1770 #, no-c-format msgid "" "@Lob\n" @@ -3795,7 +3808,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:1761 +#: basic_mapping.xml:1772 #, no-c-format msgid "" "If the property type implements java.io.Serializable " @@ -3805,13 +3818,13 @@ msgid "" msgstr "" #. Tag: title -#: basic_mapping.xml:1768 +#: basic_mapping.xml:1779 #, no-c-format msgid "Type" msgstr "" #. Tag: para -#: basic_mapping.xml:1770 +#: basic_mapping.xml:1781 #, no-c-format msgid "" "You can also manually specify a type using the @org.hibernate." @@ -3820,7 +3833,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:1777 basic_mapping.xml:2209 +#: basic_mapping.xml:1788 basic_mapping.xml:2220 #, no-c-format msgid "" "The name of a Hibernate basic type: integer, string, character, " @@ -3830,7 +3843,7 @@ msgstr "" "timestamp, float, binary, serializable, object, blob)。 " #. Tag: para -#: basic_mapping.xml:1783 basic_mapping.xml:2215 +#: basic_mapping.xml:1794 basic_mapping.xml:2226 #, no-c-format msgid "" "The name of a Java class with a default basic type: int, float, " @@ -3842,13 +3855,13 @@ msgstr "" "literal>)。 " #. Tag: para -#: basic_mapping.xml:1789 basic_mapping.xml:2221 +#: basic_mapping.xml:1800 basic_mapping.xml:2232 #, no-c-format msgid "The name of a serializable Java class." msgstr "一个可以序列化的 Java 类的名字。" #. Tag: para -#: basic_mapping.xml:1793 basic_mapping.xml:2225 +#: basic_mapping.xml:1804 basic_mapping.xml:2236 #, no-c-format msgid "" "The class name of a custom type: com.illflow.type.MyCustomType)。 " #. Tag: para -#: basic_mapping.xml:1798 +#: basic_mapping.xml:1809 #, fuzzy, no-c-format msgid "" "If you do not specify a type, Hibernate will use reflection upon the named " @@ -3873,7 +3886,7 @@ msgstr "" "Hibernate.TIMESTAMP,或者为了指定一个自定义类型。) " #. Tag: para -#: basic_mapping.xml:1803 +#: basic_mapping.xml:1814 #, no-c-format msgid "" "@org.hibernate.annotations.TypeDef and @org." @@ -3892,7 +3905,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:1819 +#: basic_mapping.xml:1830 #, no-c-format msgid "" "Package level annotations are placed in a file named package-info." @@ -3901,7 +3914,7 @@ msgid "" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:1824 +#: basic_mapping.xml:1835 #, no-c-format msgid "" "@TypeDef(\n" @@ -3921,7 +3934,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:1826 +#: basic_mapping.xml:1837 #, no-c-format msgid "" "The following example shows the usage of the parameters " @@ -3929,7 +3942,7 @@ msgid "" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:1830 +#: basic_mapping.xml:1841 #, no-c-format msgid "" "//in org/hibernate/test/annotations/entity/package-info.java\n" @@ -3955,7 +3968,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:1832 +#: basic_mapping.xml:1843 #, no-c-format msgid "" "When using composite user type, you will have to express column definitions. " @@ -3963,7 +3976,7 @@ msgid "" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:1836 +#: basic_mapping.xml:1847 #, no-c-format msgid "" "@Type(type=\"org.hibernate.test.annotations.entity.MonetaryAmountUserType" @@ -3985,13 +3998,13 @@ msgid "" msgstr "" #. Tag: title -#: basic_mapping.xml:1840 +#: basic_mapping.xml:1851 #, no-c-format msgid "Access type" msgstr "" #. Tag: para -#: basic_mapping.xml:1842 +#: basic_mapping.xml:1853 #, no-c-format msgid "" "By default the access type of a class hierarchy is defined by the position " @@ -4004,7 +4017,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:1850 +#: basic_mapping.xml:1861 #, no-c-format msgid "" "The placement of annotations within a class hierarchy has to be consistent " @@ -4014,31 +4027,31 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:1857 +#: basic_mapping.xml:1868 #, no-c-format msgid "However in some situations, you need to:" msgstr "" #. Tag: para -#: basic_mapping.xml:1861 +#: basic_mapping.xml:1872 #, no-c-format msgid "force the access type of the entity hierarchy" msgstr "" #. Tag: para -#: basic_mapping.xml:1865 +#: basic_mapping.xml:1876 #, no-c-format msgid "override the access type of a specific entity in the class hierarchy" msgstr "" #. Tag: para -#: basic_mapping.xml:1870 +#: basic_mapping.xml:1881 #, no-c-format msgid "override the access type of an embeddable type" msgstr "" #. Tag: para -#: basic_mapping.xml:1874 +#: basic_mapping.xml:1885 #, no-c-format msgid "" "The best use case is an embeddable class used by several entities that might " @@ -4047,7 +4060,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:1879 +#: basic_mapping.xml:1890 #, no-c-format msgid "" "To force the access type on a given class, use the @AccessFIELD " @@ -4128,13 +4141,13 @@ msgid "" msgstr "" #. Tag: title -#: basic_mapping.xml:1896 +#: basic_mapping.xml:1907 #, no-c-format msgid "@org.hibernate.annotations.AccessType" msgstr "" #. Tag: para -#: basic_mapping.xml:1898 +#: basic_mapping.xml:1909 #, no-c-format msgid "" "The annotation @org.hibernate.annotations.AccessType " @@ -4143,13 +4156,13 @@ msgid "" msgstr "" #. Tag: title -#: basic_mapping.xml:1907 +#: basic_mapping.xml:1918 #, no-c-format msgid "Optimistic lock" msgstr "" #. Tag: para -#: basic_mapping.xml:1909 +#: basic_mapping.xml:1920 #, no-c-format msgid "" "It is sometimes useful to avoid increasing the version number even if a " @@ -4159,7 +4172,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:1914 +#: basic_mapping.xml:1925 #, no-c-format msgid "" "More formally, specifies that updates to this property do not require " @@ -4167,13 +4180,13 @@ msgid "" msgstr "" #. Tag: title -#: basic_mapping.xml:1919 +#: basic_mapping.xml:1930 #, no-c-format msgid "Declaring column attributes" msgstr "" #. Tag: para -#: basic_mapping.xml:1921 +#: basic_mapping.xml:1932 #, no-c-format msgid "" "The column(s) used for a property mapping can be defined using the " @@ -4183,37 +4196,37 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:1929 +#: basic_mapping.xml:1940 #, no-c-format msgid "not annotated at all" msgstr "" #. Tag: para -#: basic_mapping.xml:1933 +#: basic_mapping.xml:1944 #, fuzzy, no-c-format msgid "annotated with @Basic" msgstr "assigned" #. Tag: para -#: basic_mapping.xml:1937 +#: basic_mapping.xml:1948 #, fuzzy, no-c-format msgid "annotated with @Version" msgstr "string" #. Tag: para -#: basic_mapping.xml:1941 +#: basic_mapping.xml:1952 #, fuzzy, no-c-format msgid "annotated with @Lob" msgstr "hilo" #. Tag: para -#: basic_mapping.xml:1945 +#: basic_mapping.xml:1956 #, fuzzy, no-c-format msgid "annotated with @Temporal" msgstr "serializable" #. Tag: programlisting -#: basic_mapping.xml:1949 +#: basic_mapping.xml:1960 #, no-c-format msgid "" "@Entity\n" @@ -4225,7 +4238,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:1951 +#: basic_mapping.xml:1962 #, no-c-format msgid "" "The name property is mapped to the flight_namename (optional): the column name (default to the property " @@ -4267,7 +4280,7 @@ msgid "" msgstr "name(可选):标识属性的名字。 " #. Tag: para -#: basic_mapping.xml:1992 +#: basic_mapping.xml:2003 #, fuzzy, no-c-format msgid "" "unique (optional): set a unique constraint on this column " @@ -4277,7 +4290,7 @@ msgstr "" "许它作为 property-ref 引用的目标。 " #. Tag: para -#: basic_mapping.xml:1997 +#: basic_mapping.xml:2008 #, fuzzy, no-c-format msgid "" "nullable (optional): set the column as nullable (default " @@ -4285,7 +4298,7 @@ msgid "" msgstr "name(可选):标识属性的名字。 " #. Tag: para -#: basic_mapping.xml:2002 +#: basic_mapping.xml:2013 #, fuzzy, no-c-format msgid "" "insertable (optional): whether or not the column will be " @@ -4293,7 +4306,7 @@ msgid "" msgstr "name(可选):标识属性的名字。 " #. Tag: para -#: basic_mapping.xml:2008 +#: basic_mapping.xml:2019 #, fuzzy, no-c-format msgid "" "updatable (optional): whether or not the column will be " @@ -4301,7 +4314,7 @@ msgid "" msgstr "catalog(可选):数据库 catalog 的名称。 " #. Tag: para -#: basic_mapping.xml:2014 +#: basic_mapping.xml:2025 #, no-c-format msgid "" "columnDefinition (optional): override the sql DDL " @@ -4309,7 +4322,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2020 +#: basic_mapping.xml:2031 #, fuzzy, no-c-format msgid "" "table (optional): define the targeted table (default " @@ -4317,7 +4330,7 @@ msgid "" msgstr "catalog(可选):数据库 catalog 的名称。 " #. Tag: para -#: basic_mapping.xml:2025 +#: basic_mapping.xml:2036 #, no-c-format msgid "" "length (optional): column length " @@ -4325,7 +4338,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2030 +#: basic_mapping.xml:2041 #, no-c-format msgid "" "precision (optional): column decimal " @@ -4333,7 +4346,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2035 +#: basic_mapping.xml:2046 #, no-c-format msgid "" "scale (optional): column decimal scale " @@ -4341,13 +4354,13 @@ msgid "" msgstr "" #. Tag: title -#: basic_mapping.xml:2043 +#: basic_mapping.xml:2054 #, no-c-format msgid "Formula" msgstr "" #. Tag: para -#: basic_mapping.xml:2045 +#: basic_mapping.xml:2056 #, no-c-format msgid "" "Sometimes, you want the Database to do some computation for you rather than " @@ -4358,7 +4371,7 @@ msgid "" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:2051 +#: basic_mapping.xml:2062 #, no-c-format msgid "" "@Formula(\"obj_length * obj_height * obj_width\")\n" @@ -4366,32 +4379,32 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2053 +#: basic_mapping.xml:2064 #, no-c-format msgid "" "The SQL fragment can be as complex as you want and even include subselects." msgstr "" #. Tag: title -#: basic_mapping.xml:2058 +#: basic_mapping.xml:2069 #, no-c-format msgid "Non-annotated property defaults" msgstr "" #. Tag: para -#: basic_mapping.xml:2060 +#: basic_mapping.xml:2071 #, no-c-format msgid "If a property is not annotated, the following rules apply:" msgstr "" #. Tag: para -#: basic_mapping.xml:2063 +#: basic_mapping.xml:2074 #, no-c-format msgid "If the property is of a single type, it is mapped as @Basic" msgstr "" #. Tag: para -#: basic_mapping.xml:2068 +#: basic_mapping.xml:2079 #, no-c-format msgid "" "Otherwise, if the type of the property is annotated as @Embeddable, it is " @@ -4399,7 +4412,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2073 +#: basic_mapping.xml:2084 #, no-c-format msgid "" "Otherwise, if the type of the property is Serializablejava.sql.Clob<property> element declares a persistent " @@ -4434,7 +4447,7 @@ msgstr "" "的属性。 " #. Tag: programlisting -#: basic_mapping.xml:2125 +#: basic_mapping.xml:2136 #, fuzzy, no-c-format msgid "" "<property\n" @@ -4480,7 +4493,7 @@ msgstr "" "/>]]>" #. Tag: para -#: basic_mapping.xml:2129 +#: basic_mapping.xml:2140 #, no-c-format msgid "" "name: the name of the property, with an initial lowercase " @@ -4488,7 +4501,7 @@ msgid "" msgstr "name:属性的名字,以小写字母开头。" #. Tag: para -#: basic_mapping.xml:2134 +#: basic_mapping.xml:2145 #, no-c-format msgid "" "column (optional - defaults to the property name): the " @@ -4499,7 +4512,7 @@ msgstr "" "以通过嵌套的 <column> 元素指定。 " #. Tag: para -#: basic_mapping.xml:2146 +#: basic_mapping.xml:2157 #, no-c-format msgid "" "update, insert (optional - defaults to trueformula (optional): an SQL expression that defines the " @@ -4527,7 +4540,7 @@ msgstr "" "算 (computed) 属性的值。计算属性没有和它对应的数据库字段。" #. Tag: para -#: basic_mapping.xml:2169 +#: basic_mapping.xml:2180 #, no-c-format msgid "" "lazy (optional - defaults to false): " @@ -4539,7 +4552,7 @@ msgstr "" "节码增强)。 " #. Tag: para -#: basic_mapping.xml:2176 +#: basic_mapping.xml:2187 #, no-c-format msgid "" "unique (optional): enables the DDL generation of a unique " @@ -4550,7 +4563,7 @@ msgstr "" "许它作为 property-ref 引用的目标。 " #. Tag: para -#: basic_mapping.xml:2183 +#: basic_mapping.xml:2194 #, no-c-format msgid "" "not-null (optional): enables the DDL generation of a " @@ -4560,7 +4573,7 @@ msgstr "" "(nullability)的约束。 " #. Tag: para -#: basic_mapping.xml:2188 basic_mapping.xml:3246 +#: basic_mapping.xml:2199 basic_mapping.xml:3282 #, no-c-format msgid "" "optimistic-lock (optional - defaults to truegenerated (optional - defaults to nevergenerated properties 的讨论。 " #. Tag: para -#: basic_mapping.xml:2205 +#: basic_mapping.xml:2216 #, no-c-format msgid "typename could be:" msgstr "typename 可以是如下几种:" #. Tag: para -#: basic_mapping.xml:2230 +#: basic_mapping.xml:2241 #, no-c-format msgid "" "If you do not specify a type, Hibernate will use reflection upon the named " @@ -4610,7 +4623,7 @@ msgstr "" "Hibernate.TIMESTAMP,或者为了指定一个自定义类型。) " #. Tag: para -#: basic_mapping.xml:2239 +#: basic_mapping.xml:2250 #, no-c-format msgid "" "The access attribute allows you to control how Hibernate " @@ -4629,7 +4642,7 @@ msgstr "" "中设置你自定义策略类的名字。 " #. Tag: para -#: basic_mapping.xml:2248 +#: basic_mapping.xml:2259 #, no-c-format msgid "" "A powerful feature is derived properties. These properties are by definition " @@ -4642,7 +4655,7 @@ msgstr "" "时翻译成一个 SQL 查询的 SELECT 子查询语句。 " #. Tag: programlisting -#: basic_mapping.xml:2254 +#: basic_mapping.xml:2265 #, fuzzy, no-c-format msgid "" "<property name=\"totalPrice\"\n" @@ -4660,7 +4673,7 @@ msgstr "" " AND li.orderNumber = orderNumber )\"/>" #. Tag: para -#: basic_mapping.xml:2256 +#: basic_mapping.xml:2267 #, no-c-format msgid "" "You can reference the entity table by not declaring an alias on a particular " @@ -4673,13 +4686,13 @@ msgstr "" "嵌套的 <formula> 映射元素。 " #. Tag: title -#: basic_mapping.xml:2265 +#: basic_mapping.xml:2276 #, no-c-format msgid "Embedded objects (aka components)" msgstr "" #. Tag: para -#: basic_mapping.xml:2267 +#: basic_mapping.xml:2278 #, fuzzy, no-c-format msgid "" "Embeddable objects (or components) are objects whose properties are mapped " @@ -4691,7 +4704,7 @@ msgstr "" "的“Components”一章。 " #. Tag: para -#: basic_mapping.xml:2272 +#: basic_mapping.xml:2283 #, no-c-format msgid "" "It is possible to declare an embedded component inside an entity and even " @@ -4703,7 +4716,7 @@ msgid "" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:2280 +#: basic_mapping.xml:2291 #, no-c-format msgid "" "@Entity\n" @@ -4725,7 +4738,7 @@ msgid "" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:2282 +#: basic_mapping.xml:2293 #, no-c-format msgid "" "@Embeddable\n" @@ -4736,7 +4749,7 @@ msgid "" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:2284 +#: basic_mapping.xml:2295 #, no-c-format msgid "" "@Embeddable\n" @@ -4755,7 +4768,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2286 +#: basic_mapping.xml:2297 #, no-c-format msgid "" "An embeddable object inherits the access type of its owning entity (note " @@ -4763,7 +4776,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2290 +#: basic_mapping.xml:2301 #, no-c-format msgid "" "The Person entity has two component properties, " @@ -4781,7 +4794,7 @@ msgid "" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:2305 +#: basic_mapping.xml:2316 #, no-c-format msgid "" "@Embedded\n" @@ -4798,7 +4811,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2307 +#: basic_mapping.xml:2318 #, no-c-format msgid "" "Hibernate Annotations supports something that is not explicitly supported by " @@ -4809,7 +4822,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2313 +#: basic_mapping.xml:2324 #, no-c-format msgid "" "You can also use association annotations in an embeddable object (ie " @@ -4820,7 +4833,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2319 +#: basic_mapping.xml:2330 #, no-c-format msgid "" "If you want to have the same embeddable object type twice in the same " @@ -4834,7 +4847,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2329 +#: basic_mapping.xml:2340 #, no-c-format msgid "" "If a property of the embedded object points back to the owning entity, " @@ -4843,13 +4856,13 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2334 +#: basic_mapping.xml:2345 #, no-c-format msgid "In XML, use the <component> element." msgstr "" #. Tag: programlisting -#: basic_mapping.xml:2356 +#: basic_mapping.xml:2367 #, fuzzy, no-c-format msgid "" "<component\n" @@ -4887,13 +4900,13 @@ msgstr "" "</component>" #. Tag: para -#: basic_mapping.xml:2360 basic_mapping.xml:3181 basic_mapping.xml:3381 +#: basic_mapping.xml:2371 basic_mapping.xml:3217 basic_mapping.xml:3417 #, no-c-format msgid "name: the name of the property." msgstr "name:属性名。" #. Tag: para -#: basic_mapping.xml:2364 +#: basic_mapping.xml:2375 #, no-c-format msgid "" "class (optional - defaults to the property type " @@ -4903,7 +4916,7 @@ msgstr "" "的名字。 " #. Tag: para -#: basic_mapping.xml:2370 basic_mapping.xml:3641 +#: basic_mapping.xml:2381 basic_mapping.xml:3677 #, no-c-format msgid "" "insert: do the mapped columns appear in SQL " @@ -4913,7 +4926,7 @@ msgstr "" "literal> 语句中? " #. Tag: para -#: basic_mapping.xml:2375 basic_mapping.xml:3646 +#: basic_mapping.xml:2386 basic_mapping.xml:3682 #, no-c-format msgid "" "update: do the mapped columns appear in SQL " @@ -4923,7 +4936,7 @@ msgstr "" "literal> 语句中? " #. Tag: para -#: basic_mapping.xml:2386 +#: basic_mapping.xml:2397 #, no-c-format msgid "" "lazy (optional - defaults to false): " @@ -4934,7 +4947,7 @@ msgstr "" "应在实例变量第一次被访问的时候延迟加载(需要编译时字节码装置器)。" #. Tag: para -#: basic_mapping.xml:2393 +#: basic_mapping.xml:2404 #, no-c-format msgid "" "optimistic-lock (optional - defaults to trueunique (optional - defaults to false): " @@ -4958,7 +4971,7 @@ msgstr "" "映射的所有字段上都有唯一性约束。" #. Tag: para -#: basic_mapping.xml:2408 +#: basic_mapping.xml:2419 #, no-c-format msgid "" "The child <property> tags map properties of the " @@ -4968,7 +4981,7 @@ msgstr "" "映射。" #. Tag: para -#: basic_mapping.xml:2411 +#: basic_mapping.xml:2422 #, no-c-format msgid "" "The <component> element allows a <" @@ -4979,7 +4992,7 @@ msgstr "" " 子元素,在组件类内部就可以有一个指向其容器的实体的反向引用。" #. Tag: para -#: basic_mapping.xml:2415 +#: basic_mapping.xml:2426 #, fuzzy, no-c-format msgid "" "The <dynamic-component> element allows a " @@ -4992,13 +5005,13 @@ msgstr "" "\"components-dynamic\"/>。 " #. Tag: title -#: basic_mapping.xml:2423 +#: basic_mapping.xml:2434 #, no-c-format msgid "Inheritance strategy" msgstr "" #. Tag: para -#: basic_mapping.xml:2425 +#: basic_mapping.xml:2436 #, no-c-format msgid "" "Java is a language supporting polymorphism: a class can inherit from " @@ -5006,7 +5019,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2431 +#: basic_mapping.xml:2442 #, no-c-format msgid "" "Single table per class hierarchy strategy: a single table hosts all the " @@ -5014,7 +5027,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2436 +#: basic_mapping.xml:2447 #, no-c-format msgid "" "Joined subclass strategy: one table per class and subclass is present and " @@ -5024,7 +5037,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2443 +#: basic_mapping.xml:2454 #, no-c-format msgid "" "Table per class strategy: one table per concrete class and subclass is " @@ -5034,13 +5047,13 @@ msgid "" msgstr "" #. Tag: title -#: basic_mapping.xml:2451 +#: basic_mapping.xml:2462 #, no-c-format msgid "Single table per class hierarchy strategy" msgstr "" #. Tag: para -#: basic_mapping.xml:2453 +#: basic_mapping.xml:2464 #, no-c-format msgid "" "With this approach the properties of all the subclasses in a given mapped " @@ -5048,7 +5061,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2456 +#: basic_mapping.xml:2467 #, fuzzy, no-c-format msgid "" "Each subclass declares its own persistent properties and subclasses. Version " @@ -5062,7 +5075,7 @@ msgstr "" "如果没有指定,就会使用 Java 类的全限定名。 " #. Tag: programlisting -#: basic_mapping.xml:2462 basic_mapping.xml:2540 +#: basic_mapping.xml:2473 basic_mapping.xml:2581 #, no-c-format msgid "" "@Entity\n" @@ -5080,7 +5093,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2464 +#: basic_mapping.xml:2475 #, fuzzy, no-c-format msgid "" "In hbm.xml, for the table-per-class-hierarchy mapping strategy, the " @@ -5090,7 +5103,7 @@ msgstr "" "表”的策略来说,就需要使用 <subclass> 定义。 " #. Tag: programlisting -#: basic_mapping.xml:2479 +#: basic_mapping.xml:2490 #, fuzzy, no-c-format msgid "" "<subclass\n" @@ -5124,14 +5137,14 @@ msgstr "" "</subclass>" #. Tag: para -#: basic_mapping.xml:2483 basic_mapping.xml:2656 basic_mapping.xml:2720 +#: basic_mapping.xml:2494 basic_mapping.xml:2692 basic_mapping.xml:2756 #, no-c-format msgid "" "name: the fully qualified class name of the subclass." msgstr "name:子类的全限定名。 " #. Tag: para -#: basic_mapping.xml:2488 +#: basic_mapping.xml:2499 #, no-c-format msgid "" "discriminator-value (optional - defaults to the class " @@ -5141,7 +5154,7 @@ msgstr "" "用于区分每个独立的子类的值。 " #. Tag: para -#: basic_mapping.xml:2494 +#: basic_mapping.xml:2505 #, no-c-format msgid "" "proxy (optional): specifies a class or interface used for " @@ -5151,7 +5164,7 @@ msgstr "" "用。 " #. Tag: para -#: basic_mapping.xml:2499 +#: basic_mapping.xml:2510 #, no-c-format msgid "" "lazy (optional - defaults to true): " @@ -5161,7 +5174,7 @@ msgstr "" "lazy=\"false\" 禁止使用延迟装载。 " #. Tag: para -#: basic_mapping.xml:2507 basic_mapping.xml:2685 basic_mapping.xml:2746 +#: basic_mapping.xml:2518 basic_mapping.xml:2721 basic_mapping.xml:2782 #, fuzzy, no-c-format msgid "" "For information about inheritance mappings see 。 " #. Tag: title -#: basic_mapping.xml:2511 +#: basic_mapping.xml:2522 #, no-c-format msgid "Discriminator" msgstr "鉴别器(discriminator) " #. Tag: para -#: basic_mapping.xml:2513 +#: basic_mapping.xml:2524 #, fuzzy, no-c-format msgid "" "Discriminators are required for polymorphic persistence using the table-per-" "class-hierarchy mapping strategy. It declares a discriminator column of the " "table. The discriminator column contains marker values that tell the " -"persistence layer what subclass to instantiate for a particular row. A " -"restricted set of types can be used: string, " -"character, integer, byte, short, boolean, " -"yes_no, true_false." +"persistence layer what subclass to instantiate for a particular row. " +"Hibernate Core supports the follwoing restricted set of types as " +"discriminator column: string, character, integer, byte, " +"short, boolean, yes_no, true_false." msgstr "" "在\"一棵对象继承树对应一个表\"的策略中,<discriminator> 元素是必需的,它定义了表的鉴别器字段。鉴别器字段包含标志值,用于告知" @@ -5196,21 +5210,56 @@ msgstr "" "true_false。" #. Tag: para -#: basic_mapping.xml:2523 +#: basic_mapping.xml:2535 #, no-c-format msgid "" "Use the @DiscriminatorColumn to define the " -"discriminator column as well as the discriminator type. Alternatively, you " -"can also use @DiscriminatorFormula to express in SQL " -"what would be in a virtual discriminator column. This is particularly handy " -"when the discriminator value can be extracted from one or more columns of " -"the table. Both @DiscriminatorColumn and " -"@DiscriminatorFormula are to be set on the root " -"entity (once per persisted hierarchy)." +"discriminator column as well as the discriminator type. " +"The enum DiscriminatorType used in " +"javax.persitence.DiscriminatorColumn only contains " +"the values STRING, CHAR and " +"INTEGER which means that not all Hibernate supported " +"types are available via the @DiscriminatorColumn " +"annotation. You can also use @DiscriminatorFormula to express in SQL a virtual discriminator column. This is " +"particularly useful when the discriminator value can be extracted from one " +"or more columns of the table. Both @DiscriminatorColumn and @DiscriminatorFormula are to be set on " +"the root entity (once per persisted hierarchy)." msgstr "" #. Tag: para -#: basic_mapping.xml:2534 +#: basic_mapping.xml:2552 +#, no-c-format +msgid "" +"@org.hibernate.annotations.DiscriminatorOptions " +"allows to optionally specify Hibernate specific discriminator options which " +"are not standardized in JPA. The available options are force and insert. The force " +"attribute is useful if the table contains rows with \"extra\" discriminator " +"values that are not mapped to a persistent class. This could for example " +"occur when working with a legacy database. If force is " +"set to true Hibernate will specify the allowed " +"discriminator values in the SELECT query, even when " +"retrieving all instances of the root class. The second option - " +"insert - tells Hibernate whether or not to include the " +"discriminator column in SQL INSERTs. Usually the column " +"should be part of the INSERT statement, but if your " +"discriminator column is also part of a mapped composite identifier you have " +"to set this option to false." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2569 +#, no-c-format +msgid "" +"There is also a @org.hibernate.annotations.ForceDiscriminator annotation which is deprecated since version 3.6. Use " +"@DiscriminatorOptions instead." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2575 #, no-c-format msgid "" "Finally, use @DiscriminatorValue on each class of the " @@ -5220,7 +5269,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2542 +#: basic_mapping.xml:2583 #, no-c-format msgid "" "In hbm.xml, the <discriminator> element is used to " @@ -5228,7 +5277,7 @@ msgid "" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:2559 +#: basic_mapping.xml:2600 #, fuzzy, no-c-format msgid "" "<discriminator\n" @@ -5248,7 +5297,7 @@ msgstr "" "/>]]>" #. Tag: para -#: basic_mapping.xml:2563 +#: basic_mapping.xml:2604 #, no-c-format msgid "" "column (optional - defaults to class): " @@ -5258,7 +5307,7 @@ msgstr "" "discriminator 器字段的名字。" #. Tag: para -#: basic_mapping.xml:2569 +#: basic_mapping.xml:2610 #, no-c-format msgid "" "type (optional - defaults to string): " @@ -5268,7 +5317,7 @@ msgstr "" "Hibernate 字段类型的名字 " #. Tag: para -#: basic_mapping.xml:2575 +#: basic_mapping.xml:2616 #, no-c-format msgid "" "force (optional - defaults to false): " @@ -5279,7 +5328,7 @@ msgstr "" "制\" Hibernate 指定允许的鉴别器值,即使当取得的所有实例都是根类的。 " #. Tag: para -#: basic_mapping.xml:2582 +#: basic_mapping.xml:2623 #, no-c-format msgid "" "insert (optional - defaults to true): " @@ -5293,7 +5342,7 @@ msgstr "" "literal> 时不包含该列) " #. Tag: para -#: basic_mapping.xml:2590 +#: basic_mapping.xml:2631 #, no-c-format msgid "" "formula (optional): an arbitrary SQL expression that is " @@ -5304,7 +5353,7 @@ msgstr "" "具体子类 — 译注)时执行。可用于基于内容的鉴别器。 " #. Tag: para -#: basic_mapping.xml:2597 +#: basic_mapping.xml:2638 #, no-c-format msgid "" "Actual values of the discriminator column are specified by the " @@ -5316,18 +5365,7 @@ msgstr "" "来的。" #. Tag: para -#: basic_mapping.xml:2602 -#, no-c-format -msgid "" -"The force attribute is only useful if the table contains " -"rows with \"extra\" discriminator values that are not mapped to a persistent " -"class. This will not usually be the case." -msgstr "" -"force 属性仅仅在这种情况下有用的:表中包含没有被映射到持久" -"化类的附加辨别器值。这种情况不会经常遇到。 " - -#. Tag: para -#: basic_mapping.xml:2607 +#: basic_mapping.xml:2643 #, no-c-format msgid "" "The formula attribute allows you to declare an arbitrary " @@ -5337,7 +5375,7 @@ msgstr "" "据的类型。" #. Tag: programlisting -#: basic_mapping.xml:2611 +#: basic_mapping.xml:2647 #, fuzzy, no-c-format msgid "" "<discriminator\n" @@ -5349,13 +5387,13 @@ msgstr "" " type=\"integer\"/>]]>" #. Tag: title -#: basic_mapping.xml:2616 +#: basic_mapping.xml:2652 #, fuzzy, no-c-format msgid "Joined subclass strategy" msgstr "连接的子类(joined-subclass) " #. Tag: para -#: basic_mapping.xml:2618 +#: basic_mapping.xml:2654 #, fuzzy, no-c-format msgid "" "Each subclass can also be mapped to its own table. This is called the table-" @@ -5372,7 +5410,7 @@ msgstr "" "元素。 " #. Tag: programlisting -#: basic_mapping.xml:2628 +#: basic_mapping.xml:2664 #, no-c-format msgid "" "@Entity @Table(name=\"CATS\")\n" @@ -5393,7 +5431,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2631 +#: basic_mapping.xml:2667 #, no-c-format msgid "" "The table name still defaults to the non qualified class name. Also if " @@ -5403,7 +5441,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2638 +#: basic_mapping.xml:2674 #, fuzzy, no-c-format msgid "" "In hbm.xml, use the <joined-subclass> element. For " @@ -5411,7 +5449,7 @@ msgid "" msgstr "你可以使用 class 元素来定义一个持久化类。例如:" #. Tag: programlisting -#: basic_mapping.xml:2652 +#: basic_mapping.xml:2688 #, fuzzy, no-c-format msgid "" "<joined-subclass\n" @@ -5457,13 +5495,13 @@ msgstr "" "</joined-subclass>" #. Tag: para -#: basic_mapping.xml:2661 basic_mapping.xml:2725 +#: basic_mapping.xml:2697 basic_mapping.xml:2761 #, no-c-format msgid "table: the name of the subclass table." msgstr "table:子类的表名。" #. Tag: para -#: basic_mapping.xml:2666 basic_mapping.xml:2730 +#: basic_mapping.xml:2702 basic_mapping.xml:2766 #, no-c-format msgid "" "proxy (optional): specifies a class or interface to use " @@ -5473,7 +5511,7 @@ msgstr "" "用。 " #. Tag: para -#: basic_mapping.xml:2671 basic_mapping.xml:2735 +#: basic_mapping.xml:2707 basic_mapping.xml:2771 #, no-c-format msgid "" "lazy (optional, defaults to true): " @@ -5483,7 +5521,7 @@ msgstr "" "lazy=\"false\" 禁止使用延迟装载。 " #. Tag: para -#: basic_mapping.xml:2679 +#: basic_mapping.xml:2715 #, no-c-format msgid "" "Use the <key> element to declare the primary key / " @@ -5492,13 +5530,13 @@ msgid "" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:2683 +#: basic_mapping.xml:2719 #, fuzzy, no-c-format msgid "" "<?xml version=\"1.0\"?>\n" "<!DOCTYPE hibernate-mapping PUBLIC\n" " \"-//Hibernate/Hibernate Mapping DTD//EN\"\n" -" \"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd\">\n" +" \"http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd\">\n" "\n" "<hibernate-mapping package=\"eg\">\n" "\n" @@ -5562,13 +5600,13 @@ msgstr "" "</hibernate-mapping>" #. Tag: title -#: basic_mapping.xml:2690 +#: basic_mapping.xml:2726 #, no-c-format msgid "Table per class strategy" msgstr "" #. Tag: para -#: basic_mapping.xml:2692 +#: basic_mapping.xml:2728 #, fuzzy, no-c-format msgid "" "A third option is to map only the concrete classes of an inheritance " @@ -5587,7 +5625,7 @@ msgstr "" "类的关联),你需要使用 <union-subclass> 映射。 " #. Tag: programlisting -#: basic_mapping.xml:2701 +#: basic_mapping.xml:2737 #, no-c-format msgid "" "@Entity\n" @@ -5596,13 +5634,13 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2703 +#: basic_mapping.xml:2739 #, no-c-format msgid "Or in hbm.xml:" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:2716 +#: basic_mapping.xml:2752 #, fuzzy, no-c-format msgid "" "<union-subclass\n" @@ -5646,20 +5684,20 @@ msgstr "" "</union-subclass>" #. Tag: para -#: basic_mapping.xml:2743 +#: basic_mapping.xml:2779 #, no-c-format msgid "" "No discriminator column or key column is required for this mapping strategy." msgstr "这种映射策略不需要指定辨别标志(discriminator)字段。" #. Tag: title -#: basic_mapping.xml:2751 +#: basic_mapping.xml:2787 #, no-c-format msgid "Inherit properties from superclasses" msgstr "" #. Tag: para -#: basic_mapping.xml:2753 +#: basic_mapping.xml:2789 #, no-c-format msgid "" "This is sometimes useful to share common properties through a technical or a " @@ -5669,7 +5707,7 @@ msgid "" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:2758 +#: basic_mapping.xml:2794 #, no-c-format msgid "" "@MappedSuperclass\n" @@ -5688,7 +5726,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2760 +#: basic_mapping.xml:2796 #, no-c-format msgid "" "In database, this hierarchy will be represented as an Order@MappedSuperclass@Embeddable objects to " @@ -5725,7 +5763,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2786 +#: basic_mapping.xml:2822 #, no-c-format msgid "" "It is allowed to mark a class as @MappedSuperclass in the " @@ -5733,7 +5771,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2792 +#: basic_mapping.xml:2828 #, no-c-format msgid "" "Any class in the hierarchy non annotated with @MappedSuperclassaltitude property will be persisted in an " @@ -5794,7 +5832,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2809 +#: basic_mapping.xml:2845 #, no-c-format msgid "" "You can define @AttributeOverride(s) and " @@ -5804,7 +5842,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2815 +#: basic_mapping.xml:2851 #, no-c-format msgid "" "In hbm.xml, simply map the properties of the superclass in the <" @@ -5812,13 +5850,13 @@ msgid "" msgstr "" #. Tag: title -#: basic_mapping.xml:2821 +#: basic_mapping.xml:2857 #, no-c-format msgid "Mapping one entity to several tables" msgstr "" #. Tag: para -#: basic_mapping.xml:2823 +#: basic_mapping.xml:2859 #, no-c-format msgid "" "While not recommended for a fresh schema, some legacy databases force your " @@ -5826,7 +5864,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2826 +#: basic_mapping.xml:2862 #, no-c-format msgid "" "Using the @SecondaryTable or @SecondaryTablesname will be in MainCat@org.hibernate." @@ -5899,7 +5937,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2850 +#: basic_mapping.xml:2886 #, fuzzy, no-c-format msgid "" "fetch: If set to JOIN, the default, Hibernate will use an " @@ -5920,7 +5958,7 @@ msgstr "" "<join>,依然会使用内连接得到。 " #. Tag: para -#: basic_mapping.xml:2862 +#: basic_mapping.xml:2898 #, fuzzy, no-c-format msgid "" "inverse: If true, Hibernate will not try to insert or " @@ -5930,7 +5968,7 @@ msgstr "" "开,Hibernate 不会插入或者更新此连接定义的属性。 " #. Tag: para -#: basic_mapping.xml:2868 +#: basic_mapping.xml:2904 #, fuzzy, no-c-format msgid "" "optional: If enabled (the default), Hibernate will insert " @@ -5942,7 +5980,7 @@ msgstr "" "接来得到这些属性。 " #. Tag: para -#: basic_mapping.xml:2875 +#: basic_mapping.xml:2911 #, no-c-format msgid "" "foreignKey: defines the Foreign Key name of a secondary " @@ -5950,7 +5988,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2880 +#: basic_mapping.xml:2916 #, no-c-format msgid "" "Make sure to use the secondary table name in the appliesto<join> element." msgstr "例如,如果我们有如下的 <properties> 映射:" #. Tag: programlisting -#: basic_mapping.xml:2903 +#: basic_mapping.xml:2939 #, fuzzy, no-c-format msgid "" "<join\n" @@ -6035,13 +6073,13 @@ msgstr "" "</join>" #. Tag: para -#: basic_mapping.xml:2907 +#: basic_mapping.xml:2943 #, no-c-format msgid "table: the name of the joined table." msgstr "table:被连接表的名称。 " #. Tag: para -#: basic_mapping.xml:2924 +#: basic_mapping.xml:2960 #, no-c-format msgid "" "fetch (optional - defaults to join): " @@ -6063,7 +6101,7 @@ msgstr "" "<join>,依然会使用内连接得到。 " #. Tag: para -#: basic_mapping.xml:2939 +#: basic_mapping.xml:2975 #, no-c-format msgid "" "inverse (optional - defaults to falseoptional (optional - defaults to false@ManyToOne or " @@ -6163,7 +6201,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2978 +#: basic_mapping.xml:3014 #, no-c-format msgid "" "@ManyToOne and @OneToOne have a " @@ -6175,7 +6213,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2985 +#: basic_mapping.xml:3021 #, no-c-format msgid "" "Setting a value of the cascade attribute to any " @@ -6184,7 +6222,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2992 +#: basic_mapping.xml:3028 #, no-c-format msgid "" "basic operations, which include: persist, merge, delete, save-" @@ -6192,7 +6230,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:2998 +#: basic_mapping.xml:3034 #, fuzzy, no-c-format msgid "" "special values: delete-orphan or all ;" @@ -6201,7 +6239,7 @@ msgstr "" "literal> 的。 " #. Tag: para -#: basic_mapping.xml:3003 +#: basic_mapping.xml:3039 #, no-c-format msgid "" "comma-separated combinations of operation names: cascade=\"persist," @@ -6211,7 +6249,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:3012 +#: basic_mapping.xml:3048 #, no-c-format msgid "" "By default, single point associations are eagerly fetched in JPA 2. You can " @@ -6226,7 +6264,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:3022 +#: basic_mapping.xml:3058 #, no-c-format msgid "" "With the default JPA options, single-ended associations are loaded with a " @@ -6242,13 +6280,13 @@ msgid "" msgstr "" #. Tag: title -#: basic_mapping.xml:3034 +#: basic_mapping.xml:3070 #, fuzzy, no-c-format msgid "Using a foreign key or an association table" msgstr "惟一外键关联" #. Tag: para -#: basic_mapping.xml:3036 +#: basic_mapping.xml:3072 #, fuzzy, no-c-format msgid "An ordinary association to another persistent class is declared using a" msgstr "" @@ -6256,7 +6294,7 @@ msgstr "" "的。" #. Tag: para -#: basic_mapping.xml:3041 +#: basic_mapping.xml:3077 #, no-c-format msgid "" "@ManyToOne if several entities can point to the the " @@ -6264,7 +6302,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:3046 +#: basic_mapping.xml:3082 #, no-c-format msgid "" "@OneToOne if only a single entity can point to the " @@ -6272,7 +6310,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:3051 +#: basic_mapping.xml:3087 #, no-c-format msgid "" "and a foreign key in one table is referencing the primary key column(s) of " @@ -6280,7 +6318,7 @@ msgid "" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:3054 +#: basic_mapping.xml:3090 #, no-c-format msgid "" "@Entity\n" @@ -6295,7 +6333,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:3056 +#: basic_mapping.xml:3092 #, no-c-format msgid "" "The @JoinColumn attribute is optional, the default value" @@ -6307,7 +6345,7 @@ msgid "" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:3064 +#: basic_mapping.xml:3100 #, no-c-format msgid "" "@Entity\n" @@ -6327,7 +6365,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:3066 +#: basic_mapping.xml:3102 #, no-c-format msgid "" "You can also map a to one association through an association table. This " @@ -6339,7 +6377,7 @@ msgid "" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:3074 +#: basic_mapping.xml:3110 #, no-c-format msgid "" "@Entity\n" @@ -6357,7 +6395,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:3077 +#: basic_mapping.xml:3113 #, no-c-format msgid "" "You can use a SQL fragment to simulate a physical join column using the " @@ -6368,7 +6406,7 @@ msgid "" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:3083 +#: basic_mapping.xml:3119 #, no-c-format msgid "" "@Entity\n" @@ -6383,7 +6421,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:3086 +#: basic_mapping.xml:3122 #, no-c-format msgid "" "You can mark an association as mandatory by using the " @@ -6394,7 +6432,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:3092 +#: basic_mapping.xml:3128 #, no-c-format msgid "" "When Hibernate cannot resolve the association because the expected " @@ -6405,13 +6443,13 @@ msgid "" msgstr "" #. Tag: title -#: basic_mapping.xml:3100 +#: basic_mapping.xml:3136 #, no-c-format msgid "@NotFound annotation" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:3102 +#: basic_mapping.xml:3138 #, no-c-format msgid "" "@Entity\n" @@ -6425,7 +6463,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:3105 +#: basic_mapping.xml:3141 #, no-c-format msgid "" "Sometimes you want to delegate to your database the deletion of cascade when " @@ -6434,13 +6472,13 @@ msgid "" msgstr "" #. Tag: title -#: basic_mapping.xml:3110 +#: basic_mapping.xml:3146 #, no-c-format msgid "@OnDelete annotation" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:3112 +#: basic_mapping.xml:3148 #, no-c-format msgid "" "@Entity\n" @@ -6454,7 +6492,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:3115 +#: basic_mapping.xml:3151 #, no-c-format msgid "" "Foreign key constraints, while generated by Hibernate, have a fairly " @@ -6463,13 +6501,13 @@ msgid "" msgstr "" #. Tag: title -#: basic_mapping.xml:3120 +#: basic_mapping.xml:3156 #, fuzzy, no-c-format msgid "@ForeignKey annotation" msgstr "惟一外键关联" #. Tag: programlisting -#: basic_mapping.xml:3122 +#: basic_mapping.xml:3158 #, no-c-format msgid "" "@Entity\n" @@ -6486,7 +6524,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:3125 +#: basic_mapping.xml:3161 #, no-c-format msgid "" "Sometimes, you want to link one entity to an other not by the target entity " @@ -6496,7 +6534,7 @@ msgid "" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:3130 basic_mapping.xml:3682 +#: basic_mapping.xml:3166 basic_mapping.xml:3718 #, no-c-format msgid "" "@Entity\n" @@ -6521,14 +6559,14 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:3132 +#: basic_mapping.xml:3168 #, no-c-format msgid "" "This is not encouraged however and should be reserved to legacy mappings." msgstr "" #. Tag: para -#: basic_mapping.xml:3135 +#: basic_mapping.xml:3171 #, no-c-format msgid "" "In hbm.xml, mapping an association is similar. The main difference is that a " @@ -6537,7 +6575,7 @@ msgid "" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:3177 +#: basic_mapping.xml:3213 #, fuzzy, no-c-format msgid "" "<many-to-one\n" @@ -6589,7 +6627,7 @@ msgstr "" "/>" #. Tag: para -#: basic_mapping.xml:3185 basic_mapping.xml:3868 +#: basic_mapping.xml:3221 basic_mapping.xml:3904 #, no-c-format msgid "" "column (optional): the name of the foreign key column. " @@ -6600,7 +6638,7 @@ msgstr "" "<column> 指定。 " #. Tag: para -#: basic_mapping.xml:3191 basic_mapping.xml:3385 +#: basic_mapping.xml:3227 basic_mapping.xml:3421 #, no-c-format msgid "" "class (optional - defaults to the property type " @@ -6610,7 +6648,7 @@ msgstr "" "名字。 " #. Tag: para -#: basic_mapping.xml:3197 basic_mapping.xml:3391 +#: basic_mapping.xml:3233 basic_mapping.xml:3427 #, no-c-format msgid "" "cascade (optional): specifies which operations should be " @@ -6620,7 +6658,7 @@ msgstr "" "对象。 " #. Tag: para -#: basic_mapping.xml:3203 basic_mapping.xml:3407 +#: basic_mapping.xml:3239 basic_mapping.xml:3443 #, no-c-format msgid "" "fetch (optional - defaults to select): " @@ -6631,7 +6669,7 @@ msgstr "" "选择其一。 " #. Tag: para -#: basic_mapping.xml:3209 +#: basic_mapping.xml:3245 #, no-c-format msgid "" "update, insert (optional - defaults to trueproperty-ref (optional): the name of a property of the " @@ -6659,7 +6697,7 @@ msgstr "" "字。如果没有指定,被关联类的主键将被使用。 " #. Tag: para -#: basic_mapping.xml:3232 +#: basic_mapping.xml:3268 #, no-c-format msgid "" "unique (optional): enables the DDL generation of a unique " @@ -6672,7 +6710,7 @@ msgstr "" "有一对一的效果。 " #. Tag: para -#: basic_mapping.xml:3240 +#: basic_mapping.xml:3276 #, no-c-format msgid "" "not-null (optional): enables the DDL generation of a " @@ -6681,7 +6719,7 @@ msgstr "" "not-null(可选):使用 DDL 为外键字段生成一个非空约束。 " #. Tag: para -#: basic_mapping.xml:3254 +#: basic_mapping.xml:3290 #, no-c-format msgid "" "lazy (optional - defaults to proxy): " @@ -6697,7 +6735,7 @@ msgstr "" "强)。lazy=\"false\" 指定此关联总是被预先抓取。 " #. Tag: para -#: basic_mapping.xml:3264 +#: basic_mapping.xml:3300 #, no-c-format msgid "" "not-found (optional - defaults to exceptionentity-name (optional): the entity name of the associated " @@ -6718,7 +6756,7 @@ msgid "" msgstr "entity-name(可选):被关联的类的实体名。 " #. Tag: para -#: basic_mapping.xml:3277 +#: basic_mapping.xml:3313 #, no-c-format msgid "" "formula (optional): an SQL expression that defines the " @@ -6728,7 +6766,7 @@ msgstr "" "(计算出的)外键值。" #. Tag: para -#: basic_mapping.xml:3284 +#: basic_mapping.xml:3320 #, fuzzy, no-c-format msgid "" "Setting a value of the cascade attribute to any " @@ -6754,14 +6792,14 @@ msgstr "" "联)不支持删除孤儿(orphan delete,删除不再被引用的值)。 " #. Tag: para -#: basic_mapping.xml:3298 +#: basic_mapping.xml:3334 #, no-c-format msgid "" "Here is an example of a typical many-to-one declaration:" msgstr "一个典型的简单 many-to-one 定义例子: " #. Tag: programlisting -#: basic_mapping.xml:3301 +#: basic_mapping.xml:3337 #, fuzzy, no-c-format msgid "" "<many-to-one name=\"product\" class=\"Product\" column=\"PRODUCT_ID\"/>" @@ -6769,7 +6807,7 @@ msgstr "" "<many-to-one name=\"product\" class=\"Product\" column=\"PRODUCT_ID\"/>" #. Tag: para -#: basic_mapping.xml:3303 +#: basic_mapping.xml:3339 #, no-c-format msgid "" "The property-ref attribute should only be used for " @@ -6787,7 +6825,7 @@ msgstr "" "过 SchemaExport 工具进行的 DDL 生成。) " #. Tag: programlisting -#: basic_mapping.xml:3311 +#: basic_mapping.xml:3347 #, fuzzy, no-c-format msgid "" "<property name=\"serialNumber\" unique=\"true\" type=\"string\" column=" @@ -6797,13 +6835,13 @@ msgstr "" "\"SERIAL_NUMBER\"/>" #. Tag: para -#: basic_mapping.xml:3313 +#: basic_mapping.xml:3349 #, no-c-format msgid "Then the mapping for OrderItem might use:" msgstr "那么关于 OrderItem 的映射可能是:" #. Tag: programlisting -#: basic_mapping.xml:3316 +#: basic_mapping.xml:3352 #, fuzzy, no-c-format msgid "" "<many-to-one name=\"product\" property-ref=\"serialNumber\" column=" @@ -6813,13 +6851,13 @@ msgstr "" "\"PRODUCT_SERIAL_NUMBER\"/>" #. Tag: para -#: basic_mapping.xml:3318 +#: basic_mapping.xml:3354 #, no-c-format msgid "This is not encouraged, however." msgstr "当然,我们决不鼓励这种用法。 " #. Tag: para -#: basic_mapping.xml:3320 +#: basic_mapping.xml:3356 #, no-c-format msgid "" "If the referenced unique key comprises multiple properties of the associated " @@ -6830,7 +6868,7 @@ msgstr "" "properties> 的元素 里面映射所有关联的属性。" #. Tag: para -#: basic_mapping.xml:3324 +#: basic_mapping.xml:3360 #, no-c-format msgid "" "If the referenced unique key is the property of a component, you can specify " @@ -6838,7 +6876,7 @@ msgid "" msgstr "假若被引用的唯一主键是组件的属性,你可以指定属性路径: " #. Tag: programlisting -#: basic_mapping.xml:3327 +#: basic_mapping.xml:3363 #, fuzzy, no-c-format msgid "" "<many-to-one name=\"owner\" property-ref=\"identity.ssn\" column=" @@ -6848,13 +6886,13 @@ msgstr "" "\"OWNER_SSN\"/>" #. Tag: title -#: basic_mapping.xml:3331 +#: basic_mapping.xml:3367 #, no-c-format msgid "Sharing the primary key with the associated entity" msgstr "" #. Tag: para -#: basic_mapping.xml:3333 +#: basic_mapping.xml:3369 #, no-c-format msgid "" "The second approach is to ensure an entity and its associated entity share " @@ -6863,13 +6901,13 @@ msgid "" msgstr "" #. Tag: title -#: basic_mapping.xml:3339 +#: basic_mapping.xml:3375 #, fuzzy, no-c-format msgid "One to One association" msgstr "惟一外键关联" #. Tag: programlisting -#: basic_mapping.xml:3341 +#: basic_mapping.xml:3377 #, no-c-format msgid "" "@Entity\n" @@ -6893,7 +6931,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:3345 +#: basic_mapping.xml:3381 #, no-c-format msgid "" "Many people got confused by these primary key based one to one associations. " @@ -6903,13 +6941,13 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:3352 +#: basic_mapping.xml:3388 #, no-c-format msgid "In hbm.xml, use the following mapping." msgstr "" #. Tag: programlisting -#: basic_mapping.xml:3377 +#: basic_mapping.xml:3413 #, fuzzy, no-c-format msgid "" "<one-to-one\n" @@ -6945,7 +6983,7 @@ msgstr "" "/>" #. Tag: para -#: basic_mapping.xml:3397 +#: basic_mapping.xml:3433 #, no-c-format msgid "" "constrained (optional): specifies that a foreign key " @@ -6961,7 +6999,7 @@ msgstr "" "时的先后顺序以及决定该关联能否被委托(也在 schema export tool 中被使用)。 " #. Tag: para -#: basic_mapping.xml:3413 +#: basic_mapping.xml:3449 #, no-c-format msgid "" "property-ref (optional): the name of a property of the " @@ -6972,7 +7010,7 @@ msgstr "" "类的主键相对应。如果没有指定,会使用对方关联类的主键。 " #. Tag: para -#: basic_mapping.xml:3426 +#: basic_mapping.xml:3462 #, no-c-format msgid "" "formula (optional): almost all one-to-one associations " @@ -6987,7 +7025,7 @@ msgstr "" "onetooneformula 找到例子) " #. Tag: para -#: basic_mapping.xml:3435 +#: basic_mapping.xml:3471 #, no-c-format msgid "" "lazy (optional - defaults to proxy): " @@ -7007,7 +7045,7 @@ msgstr "" "会采取预先抓取。" #. Tag: para -#: basic_mapping.xml:3454 +#: basic_mapping.xml:3490 #, no-c-format msgid "" "Primary key associations do not need an extra table column. If two rows are " @@ -7020,7 +7058,7 @@ msgstr "" "它们被赋予同样的标识值。" #. Tag: para -#: basic_mapping.xml:3460 +#: basic_mapping.xml:3496 #, no-c-format msgid "" "For a primary key association, add the following mappings to " @@ -7030,13 +7068,13 @@ msgstr "" "行主键一对一关联:" #. Tag: programlisting -#: basic_mapping.xml:3464 +#: basic_mapping.xml:3500 #, fuzzy, no-c-format msgid "<one-to-one name=\"person\" class=\"Person\"/>" msgstr "<one-to-one name=\"person\" class=\"Person\"/>" #. Tag: programlisting -#: basic_mapping.xml:3466 +#: basic_mapping.xml:3502 #, fuzzy, no-c-format msgid "" "<one-to-one name=\"employee\" class=\"Employee\" constrained=\"true\"/>" @@ -7044,7 +7082,7 @@ msgstr "" "<one-to-one name=\"employee\" class=\"Employee\" constrained=\"true\"/>" #. Tag: para -#: basic_mapping.xml:3468 +#: basic_mapping.xml:3504 #, no-c-format msgid "" "Ensure that the primary keys of the related rows in the PERSON and EMPLOYEE " @@ -7055,7 +7093,7 @@ msgstr "" "foreign 的特殊的 hibernate 标识符生成策略: " #. Tag: programlisting -#: basic_mapping.xml:3472 +#: basic_mapping.xml:3508 #, fuzzy, no-c-format msgid "" "<class name=\"person\" table=\"PERSON\">\n" @@ -7083,7 +7121,7 @@ msgstr "" "</class>" #. Tag: para -#: basic_mapping.xml:3474 +#: basic_mapping.xml:3510 #, no-c-format msgid "" "A newly saved instance of Person is assigned the same " @@ -7095,13 +7133,13 @@ msgstr "" "literal> 实例同样的关键字值。 " #. Tag: title -#: basic_mapping.xml:3482 +#: basic_mapping.xml:3518 #, no-c-format msgid "Natural-id" msgstr "自然 ID(natural-id) " #. Tag: para -#: basic_mapping.xml:3484 +#: basic_mapping.xml:3520 #, fuzzy, no-c-format msgid "" "Although we recommend the use of surrogate keys as primary keys, you should " @@ -7120,7 +7158,7 @@ msgstr "" "解)。 " #. Tag: programlisting -#: basic_mapping.xml:3493 +#: basic_mapping.xml:3529 #, no-c-format msgid "" "@Entity\n" @@ -7150,13 +7188,13 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:3495 +#: basic_mapping.xml:3531 #, no-c-format msgid "Or in XML," msgstr "" #. Tag: programlisting -#: basic_mapping.xml:3497 +#: basic_mapping.xml:3533 #, fuzzy, no-c-format msgid "" "<natural-id mutable=\"true|false\"/>\n" @@ -7172,7 +7210,7 @@ msgstr "" "</natural-id>" #. Tag: para -#: basic_mapping.xml:3499 +#: basic_mapping.xml:3535 #, no-c-format msgid "" "It is recommended that you implement equals() and " @@ -7183,7 +7221,7 @@ msgstr "" "literal> 方法,来比较实体的自然键属性。 " #. Tag: para -#: basic_mapping.xml:3503 +#: basic_mapping.xml:3539 #, no-c-format msgid "" "This mapping is not intended for use with entities that have natural primary " @@ -7191,7 +7229,7 @@ msgid "" msgstr "这一映射不是为了把自然键作为主键而准备的。 " #. Tag: para -#: basic_mapping.xml:3508 +#: basic_mapping.xml:3544 #, no-c-format msgid "" "mutable (optional - defaults to falseAny" msgstr "any" #. Tag: para -#: basic_mapping.xml:3518 +#: basic_mapping.xml:3554 #, fuzzy, no-c-format msgid "" "There is one more type of property mapping. The @Any " @@ -7227,7 +7265,7 @@ msgstr "" "使用它(比如,审计 log,用户会话数据等等)。 " #. Tag: para -#: basic_mapping.xml:3528 +#: basic_mapping.xml:3564 #, fuzzy, no-c-format msgid "" "The @Any annotation describes the column holding the " @@ -7244,7 +7282,7 @@ msgstr "" "标识符属性。你必须指定从 meta-type 的值到类名的映射。 " #. Tag: programlisting -#: basic_mapping.xml:3538 +#: basic_mapping.xml:3574 #, no-c-format msgid "" "@Any( metaColumn = @Column( name = \"property_type\" ), fetch=FetchType." @@ -7263,7 +7301,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:3540 +#: basic_mapping.xml:3576 #, no-c-format msgid "" "Note that @AnyDef can be mutualized and reused. It is " @@ -7271,7 +7309,7 @@ msgid "" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:3544 +#: basic_mapping.xml:3580 #, no-c-format msgid "" "//on a package\n" @@ -7295,13 +7333,13 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:3546 +#: basic_mapping.xml:3582 #, no-c-format msgid "The hbm.xml equivalent is:" msgstr "" #. Tag: programlisting -#: basic_mapping.xml:3548 +#: basic_mapping.xml:3584 #, fuzzy, no-c-format msgid "" "<any name=\"being\" id-type=\"long\" meta-type=\"string\">\n" @@ -7321,13 +7359,13 @@ msgstr "" "</any>" #. Tag: para -#: basic_mapping.xml:3551 +#: basic_mapping.xml:3587 #, no-c-format msgid "You cannot mutualize the metadata in hbm.xml as you can in annotations." msgstr "" #. Tag: programlisting -#: basic_mapping.xml:3570 +#: basic_mapping.xml:3606 #, fuzzy, no-c-format msgid "" "<any\n" @@ -7363,19 +7401,19 @@ msgstr "" "</any>" #. Tag: para -#: basic_mapping.xml:3574 +#: basic_mapping.xml:3610 #, no-c-format msgid "name: the property name." msgstr "name:属性名" #. Tag: para -#: basic_mapping.xml:3578 +#: basic_mapping.xml:3614 #, no-c-format msgid "id-type: the identifier type." msgstr "id-type:标识符类型" #. Tag: para -#: basic_mapping.xml:3582 +#: basic_mapping.xml:3618 #, no-c-format msgid "" "meta-type (optional - defaults to stringcascade (optional- defaults to none): " @@ -7395,7 +7433,7 @@ msgstr "" "型。" #. Tag: para -#: basic_mapping.xml:3599 +#: basic_mapping.xml:3635 #, no-c-format msgid "" "optimistic-lock (optional - defaults to true<properties> element allows the definition of a " @@ -7429,7 +7467,7 @@ msgstr "" "束的一种方便途径。例如:" #. Tag: programlisting -#: basic_mapping.xml:3632 +#: basic_mapping.xml:3668 #, fuzzy, no-c-format msgid "" "<properties\n" @@ -7459,7 +7497,7 @@ msgstr "" "</properties>" #. Tag: para -#: basic_mapping.xml:3636 +#: basic_mapping.xml:3672 #, no-c-format msgid "" "name: the logical name of the grouping. It is " @@ -7469,7 +7507,7 @@ msgstr "" "的名称。 " #. Tag: para -#: basic_mapping.xml:3651 +#: basic_mapping.xml:3687 #, no-c-format msgid "" "optimistic-lock (optional - defaults to true<properties> " @@ -7490,7 +7528,7 @@ msgid "" msgstr "例如,如果我们有如下的 <properties> 映射:" #. Tag: programlisting -#: basic_mapping.xml:3669 +#: basic_mapping.xml:3705 #, fuzzy, no-c-format msgid "" "<class name=\"Person\">\n" @@ -7517,7 +7555,7 @@ msgstr "" "</class>" #. Tag: para -#: basic_mapping.xml:3671 +#: basic_mapping.xml:3707 #, no-c-format msgid "" "You might have some legacy data association that refers to this unique key " @@ -7527,7 +7565,7 @@ msgstr "" "一键,而不是主键:" #. Tag: programlisting -#: basic_mapping.xml:3675 +#: basic_mapping.xml:3711 #, fuzzy, no-c-format msgid "" "<many-to-one name=\"owner\"\n" @@ -7545,7 +7583,7 @@ msgstr "" "</many-to-one>" #. Tag: para -#: basic_mapping.xml:3678 +#: basic_mapping.xml:3714 #, no-c-format msgid "" "When using annotations as a mapping strategy, such construct is not " @@ -7554,7 +7592,7 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:3685 +#: basic_mapping.xml:3721 #, no-c-format msgid "" "The use of this outside the context of mapping legacy data is not " @@ -7562,13 +7600,13 @@ msgid "" msgstr "我们并不推荐这样使用,除非在映射遗留数据的情况下。 " #. Tag: title -#: basic_mapping.xml:3690 +#: basic_mapping.xml:3726 #, no-c-format msgid "Some hbm.xml specificities" msgstr "" #. Tag: para -#: basic_mapping.xml:3692 +#: basic_mapping.xml:3728 #, no-c-format msgid "" "The hbm.xml structure has some specificities naturally not present when " @@ -7576,13 +7614,13 @@ msgid "" msgstr "" #. Tag: title -#: basic_mapping.xml:3696 +#: basic_mapping.xml:3732 #, no-c-format msgid "Doctype" msgstr "Doctype" #. Tag: para -#: basic_mapping.xml:3698 +#: basic_mapping.xml:3734 #, no-c-format msgid "" "All XML mappings should declare the doctype shown. The actual DTD can be " @@ -7599,13 +7637,13 @@ msgstr "" "对照你的 classpath 目录检查 XML 文件里的 DTD 声明。" #. Tag: title -#: basic_mapping.xml:3707 +#: basic_mapping.xml:3743 #, no-c-format msgid "EntityResolver" msgstr "EntityResolver" #. Tag: para -#: basic_mapping.xml:3709 +#: basic_mapping.xml:3745 #, no-c-format msgid "" "Hibernate will first attempt to resolve DTDs in its classpath. It does this " @@ -7620,12 +7658,12 @@ msgstr "" "不同的 systenId 命名空间:" #. Tag: para -#: basic_mapping.xml:3718 -#, no-c-format +#: basic_mapping.xml:3754 +#, fuzzy, no-c-format msgid "" "a hibernate namespace is recognized whenever the resolver " -"encounters a systemId starting with http://hibernate.sourceforge." -"net/. The resolver attempts to resolve these entities via the " +"encounters a systemId starting with http://www.hibernate.org/dtd/. The resolver attempts to resolve these entities via the " "classloader which loaded the Hibernate classes." msgstr "" "若 resolver 遇到了一个以 http://hibernate.sourceforge.net/user namespace is recognized whenever the resolver " @@ -7649,13 +7687,13 @@ msgstr "" "来查找这些实体。" #. Tag: para -#: basic_mapping.xml:3735 +#: basic_mapping.xml:3771 #, no-c-format msgid "The following is an example of utilizing user namespacing:" msgstr "下面是一个使用用户命名空间(user namespace)的例子:" #. Tag: programlisting -#: basic_mapping.xml:3738 +#: basic_mapping.xml:3774 #, no-c-format msgid "" "types.xml is a resource in the your." @@ -7675,13 +7713,13 @@ msgstr "" "\">typedef。 " #. Tag: title -#: basic_mapping.xml:3747 +#: basic_mapping.xml:3783 #, no-c-format msgid "Hibernate-mapping" msgstr "Hibernate-mapping" #. Tag: para -#: basic_mapping.xml:3749 +#: basic_mapping.xml:3785 #, no-c-format msgid "" "This element has several optional attributes. The schema " @@ -7704,7 +7742,7 @@ msgstr "" "默认让我们在查询语言中可以使用非全限定名的类名。" #. Tag: programlisting -#: basic_mapping.xml:3778 +#: basic_mapping.xml:3814 #, fuzzy, no-c-format msgid "" "<hibernate-mapping\n" @@ -7728,19 +7766,19 @@ msgstr "" " />]]>" #. Tag: para -#: basic_mapping.xml:3782 +#: basic_mapping.xml:3818 #, no-c-format msgid "schema (optional): the name of a database schema." msgstr "schema(可选):数据库 schema 的名称。" #. Tag: para -#: basic_mapping.xml:3787 +#: basic_mapping.xml:3823 #, no-c-format msgid "catalog (optional): the name of a database catalog." msgstr "catalog(可选):数据库 catalog 的名称。 " #. Tag: para -#: basic_mapping.xml:3792 +#: basic_mapping.xml:3828 #, no-c-format msgid "" "default-cascade (optional - defaults to nonedefault-access (optional - defaults to propertyPropertyAccessor 接口自定义。 " #. Tag: para -#: basic_mapping.xml:3804 +#: basic_mapping.xml:3840 #, no-c-format msgid "" "default-lazy (optional - defaults to trueauto-import (optional - defaults to truepackage (optional): specifies a package prefix to use for " @@ -7795,7 +7833,7 @@ msgstr "" "全限定的类名,就使用这个作为包名。 " #. Tag: para -#: basic_mapping.xml:3825 +#: basic_mapping.xml:3861 #, no-c-format msgid "" "If you have two persistent classes with the same unqualified name, you " @@ -7807,7 +7845,7 @@ msgstr "" "果你把一个“导入过”的名字同时对应两个类,Hibernate 会抛出一个异常。" #. Tag: para -#: basic_mapping.xml:3830 +#: basic_mapping.xml:3866 #, no-c-format msgid "" "The hibernate-mapping element allows you to nest several " @@ -7825,13 +7863,13 @@ msgstr "" "者如果使用继承,Animal.hbm.xml。" #. Tag: title -#: basic_mapping.xml:3841 +#: basic_mapping.xml:3877 #, fuzzy, no-c-format msgid "Key" msgstr "键(key)" #. Tag: para -#: basic_mapping.xml:3843 +#: basic_mapping.xml:3879 #, fuzzy, no-c-format msgid "" "The <key> element is featured a few times within " @@ -7844,7 +7882,7 @@ msgstr "" "下经常使用。 " #. Tag: programlisting -#: basic_mapping.xml:3864 +#: basic_mapping.xml:3900 #, fuzzy, no-c-format msgid "" "<key\n" @@ -7866,7 +7904,7 @@ msgstr "" "/>" #. Tag: para -#: basic_mapping.xml:3874 +#: basic_mapping.xml:3910 #, no-c-format msgid "" "on-delete (optional - defaults to noactionproperty-ref (optional): specifies that the foreign key " @@ -7888,7 +7926,7 @@ msgstr "" "供给遗留数据)。 " #. Tag: para -#: basic_mapping.xml:3886 +#: basic_mapping.xml:3922 #, no-c-format msgid "" "not-null (optional): specifies that the foreign key " @@ -7899,7 +7937,7 @@ msgstr "" "外键都是主键的一部分)。 " #. Tag: para -#: basic_mapping.xml:3892 +#: basic_mapping.xml:3928 #, no-c-format msgid "" "update (optional): specifies that the foreign key should " @@ -7910,7 +7948,7 @@ msgstr "" "键都是主键的一部分)。 " #. Tag: para -#: basic_mapping.xml:3898 +#: basic_mapping.xml:3934 #, no-c-format msgid "" "unique (optional): specifies that the foreign key should " @@ -7921,7 +7959,7 @@ msgstr "" "键都是主键的一部分)。 " #. Tag: para -#: basic_mapping.xml:3905 +#: basic_mapping.xml:3941 #, no-c-format msgid "" "For systems where delete performance is important, we recommend that all " @@ -7937,7 +7975,7 @@ msgstr "" "特性会绕过 Hibernate 通常对版本数据(versioned data)采用的乐观锁策略。 " #. Tag: para -#: basic_mapping.xml:3913 +#: basic_mapping.xml:3949 #, no-c-format msgid "" "The not-null and update attributes are " @@ -7952,13 +7990,13 @@ msgstr "" "literal> 定义此键字段。 " #. Tag: title -#: basic_mapping.xml:3922 +#: basic_mapping.xml:3958 #, no-c-format msgid "Import" msgstr "引用(import) " #. Tag: para -#: basic_mapping.xml:3924 +#: basic_mapping.xml:3960 #, no-c-format msgid "" "If your application has two persistent classes with the same name, and you " @@ -7972,13 +8010,13 @@ msgstr "" "被显式地“import(引用)”。你甚至可以引用没有被明确映射的类和接口。 " #. Tag: programlisting -#: basic_mapping.xml:3930 +#: basic_mapping.xml:3966 #, fuzzy, no-c-format msgid "<import class=\"java.lang.Object\" rename=\"Universe\"/>" msgstr "<import class=\"java.lang.Object\" rename=\"Universe\"/>" #. Tag: programlisting -#: basic_mapping.xml:3939 +#: basic_mapping.xml:3975 #, fuzzy, no-c-format msgid "" "<import\n" @@ -7992,14 +8030,14 @@ msgstr "" "/>" #. Tag: para -#: basic_mapping.xml:3943 +#: basic_mapping.xml:3979 #, no-c-format msgid "" "class: the fully qualified class name of any Java class." msgstr "class:任何 Java 类的全限定名。 " #. Tag: para -#: basic_mapping.xml:3948 +#: basic_mapping.xml:3984 #, no-c-format msgid "" "rename (optional - defaults to the unqualified class " @@ -8009,19 +8047,19 @@ msgstr "" "的名字。 " #. Tag: para -#: basic_mapping.xml:3956 +#: basic_mapping.xml:3992 #, no-c-format msgid "This feature is unique to hbm.xml and is not supported in annotations." msgstr "" #. Tag: title -#: basic_mapping.xml:3962 +#: basic_mapping.xml:3998 #, no-c-format msgid "Column and formula elements" msgstr "字段和规则元素(column and formula elements) " #. Tag: para -#: basic_mapping.xml:3964 +#: basic_mapping.xml:4000 #, no-c-format msgid "" "Mapping elements which accept a column attribute will " @@ -8034,7 +8072,7 @@ msgstr "" "替换 <formula> 属性。 " #. Tag: programlisting -#: basic_mapping.xml:3970 +#: basic_mapping.xml:4006 #, fuzzy, no-c-format msgid "" "<column\n" @@ -8066,13 +8104,13 @@ msgstr "" " default=\"SQL expression\"/>" #. Tag: programlisting -#: basic_mapping.xml:3972 +#: basic_mapping.xml:4008 #, fuzzy, no-c-format msgid "<formula>SQL expression</formula>" msgstr "<formula>SQL expression</formula>" #. Tag: para -#: basic_mapping.xml:3974 +#: basic_mapping.xml:4010 #, no-c-format msgid "" "Most of the attributes on column provide a means of " @@ -8089,7 +8127,7 @@ msgstr "" "link>。" #. Tag: para -#: basic_mapping.xml:3982 +#: basic_mapping.xml:4018 #, no-c-format msgid "" "The column and formula elements can " @@ -8100,7 +8138,7 @@ msgstr "" "属性或关联映射中被合并来表达,例如,一些奇异的连接条件。" #. Tag: programlisting -#: basic_mapping.xml:3986 +#: basic_mapping.xml:4022 #, fuzzy, no-c-format msgid "" "<many-to-one name=\"homeAddress\" class=\"Address\"\n" @@ -8116,19 +8154,19 @@ msgstr "" "</many-to-one>" #. Tag: title -#: basic_mapping.xml:3992 +#: basic_mapping.xml:4028 #, no-c-format msgid "Hibernate types" msgstr "Hibernate 的类型 " #. Tag: title -#: basic_mapping.xml:3995 +#: basic_mapping.xml:4031 #, no-c-format msgid "Entities and values" msgstr "实体(Entities)和值(values)" #. Tag: para -#: basic_mapping.xml:3997 +#: basic_mapping.xml:4033 #, no-c-format msgid "" "In relation to the persistence service, Java language-level objects are " @@ -8136,7 +8174,7 @@ msgid "" msgstr "和持久化服务相比,Java 级别的对象分为两个组别:" #. Tag: para -#: basic_mapping.xml:4000 +#: basic_mapping.xml:4036 #, no-c-format msgid "" "An entity exists independently of any other objects " @@ -8157,7 +8195,7 @@ msgstr "" "息。 " #. Tag: para -#: basic_mapping.xml:4010 +#: basic_mapping.xml:4046 #, no-c-format msgid "" "An entity's persistent state consists of references to other entities and " @@ -8177,7 +8215,7 @@ msgstr "" "本信息。值没有独立的标识,所以他们不能被两个实体或者集合共享。 " #. Tag: para -#: basic_mapping.xml:4020 +#: basic_mapping.xml:4056 #, no-c-format msgid "" "Until now, we have been using the term \"persistent class\" to refer to " @@ -8201,13 +8239,13 @@ msgstr "" "个好线索是共享引用指向这个类的单一实例,而组合或聚合通常被转化为值类型。 " #. Tag: para -#: basic_mapping.xml:4033 +#: basic_mapping.xml:4069 #, no-c-format msgid "We will revisit both concepts throughout this reference guide." msgstr "我们会在本文档中重复碰到这两个概念。 " #. Tag: para -#: basic_mapping.xml:4036 +#: basic_mapping.xml:4072 #, no-c-format msgid "" "The challenge is to map the Java type system, and the developers' definition " @@ -8231,7 +8269,7 @@ msgstr "" "换策略,随后我们会看到这点。 " #. Tag: para -#: basic_mapping.xml:4049 +#: basic_mapping.xml:4085 #, no-c-format msgid "" "With the exception of collections, all built-in Hibernate types support null " @@ -8240,13 +8278,13 @@ msgstr "" "所有的 Hibernate 内建类型,除了 collections 以外,都支持空(null)语义。 " #. Tag: title -#: basic_mapping.xml:4054 +#: basic_mapping.xml:4090 #, no-c-format msgid "Basic value types" msgstr "基本值类型" #. Tag: para -#: basic_mapping.xml:4056 +#: basic_mapping.xml:4092 #, no-c-format msgid "" "The built-in basic mapping types can be roughly " @@ -8254,7 +8292,7 @@ msgid "" msgstr "内置的 basic mapping types 可以大致地分类为:" #. Tag: literal -#: basic_mapping.xml:4059 +#: basic_mapping.xml:4095 #, fuzzy, no-c-format msgid "" "integer, long, short, float, double, character, byte, boolean, yes_no, " @@ -8264,7 +8302,7 @@ msgstr "" "yes_no, true_false" #. Tag: para -#: basic_mapping.xml:4063 +#: basic_mapping.xml:4099 #, no-c-format msgid "" "Type mappings from Java primitives or wrapper classes to appropriate (vendor-" @@ -8278,13 +8316,13 @@ msgstr "" "的另外说法。" #. Tag: literal -#: basic_mapping.xml:4073 +#: basic_mapping.xml:4109 #, no-c-format msgid "string" msgstr "string" #. Tag: para -#: basic_mapping.xml:4076 +#: basic_mapping.xml:4112 #, no-c-format msgid "" "A type mapping from java.lang.String to VARCHARVARCHAR2)的映射。" #. Tag: literal -#: basic_mapping.xml:4083 +#: basic_mapping.xml:4119 #, fuzzy, no-c-format msgid "date, time, timestamp" msgstr "date, time, timestamp" #. Tag: para -#: basic_mapping.xml:4086 +#: basic_mapping.xml:4122 #, no-c-format msgid "" "Type mappings from java.util.Date and its subclasses to " @@ -8312,13 +8350,13 @@ msgstr "" "型)的映射。" #. Tag: literal -#: basic_mapping.xml:4094 +#: basic_mapping.xml:4130 #, fuzzy, no-c-format msgid "calendar, calendar_date" msgstr "calendar, calendar_date" #. Tag: para -#: basic_mapping.xml:4097 +#: basic_mapping.xml:4133 #, no-c-format msgid "" "Type mappings from java.util.Calendar to SQL types " @@ -8328,13 +8366,13 @@ msgstr "" "literal> 和 DATE(或等价类型)的映射。" #. Tag: literal -#: basic_mapping.xml:4104 +#: basic_mapping.xml:4140 #, fuzzy, no-c-format msgid "big_decimal, big_integer" msgstr "big_decimal, big_integer" #. Tag: para -#: basic_mapping.xml:4107 +#: basic_mapping.xml:4143 #, no-c-format msgid "" "Type mappings from java.math.BigDecimal and java." @@ -8346,13 +8384,13 @@ msgstr "" "literal>类型)的映射。" #. Tag: literal -#: basic_mapping.xml:4115 +#: basic_mapping.xml:4151 #, fuzzy, no-c-format msgid "locale, timezone, currency" msgstr "locale, timezone, currency" #. Tag: para -#: basic_mapping.xml:4118 +#: basic_mapping.xml:4154 #, no-c-format msgid "" "Type mappings from java.util.Locale, java.util." @@ -8370,13 +8408,13 @@ msgstr "" "literal>。" #. Tag: literal -#: basic_mapping.xml:4131 +#: basic_mapping.xml:4167 #, fuzzy, no-c-format msgid "class" msgstr "子类(subclass)" #. Tag: para -#: basic_mapping.xml:4134 +#: basic_mapping.xml:4170 #, no-c-format msgid "" "A type mapping from java.lang.Class to VARCHARCLOB or TEXT type." +"Maps long Java strings to a SQL LONGVARCHAR or " +"TEXT type." msgstr "" "把长 Java 字符串映射为 SQL 的 CLOB 或者 TEXT 类型。" #. Tag: literal -#: basic_mapping.xml:4159 +#: basic_mapping.xml:4195 +#, no-c-format +msgid "image" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:4198 +#, fuzzy, no-c-format +msgid "Maps long byte arrays to a SQL LONGVARBINARY." +msgstr "" +"把长 Java 字符串映射为 SQL 的 CLOB 或者 TEXT 类型。" + +#. Tag: literal +#: basic_mapping.xml:4203 #, no-c-format msgid "serializable" msgstr "serializable" #. Tag: para -#: basic_mapping.xml:4162 +#: basic_mapping.xml:4206 #, no-c-format msgid "" "Maps serializable Java types to an appropriate SQL binary type. You can also " @@ -8434,13 +8486,13 @@ msgstr "" "literal>。 " #. Tag: literal -#: basic_mapping.xml:4171 +#: basic_mapping.xml:4215 #, no-c-format msgid "clob, blob" msgstr "clob, blob" #. Tag: para -#: basic_mapping.xml:4174 +#: basic_mapping.xml:4218 #, no-c-format msgid "" "Type mappings for the JDBC classes java.sql.Clob and " @@ -8453,7 +8505,41 @@ msgstr "" "之外是无法重用的。(而且, 驱动程序对这种类型的支持充满着补丁和前后矛盾。) " #. Tag: literal -#: basic_mapping.xml:4184 +#: basic_mapping.xml:4228 +#, no-c-format +msgid "materialized_clob" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:4231 +#, no-c-format +msgid "" +"Maps long Java strings to a SQL CLOB type. When read, the " +"CLOB value is immediately materialized into a Java " +"string. Some drivers require the CLOB value to be read " +"within a transaction. Once materialized, the Java string is available " +"outside of the transaction." +msgstr "" + +#. Tag: literal +#: basic_mapping.xml:4241 +#, fuzzy, no-c-format +msgid "materialized_blob" +msgstr "serializable" + +#. Tag: para +#: basic_mapping.xml:4244 +#, no-c-format +msgid "" +"Maps long Java byte arrays to a SQL BLOB type. When read, " +"the BLOB value is immediately materialized into a byte " +"array. Some drivers require the BLOB value to be read " +"within a transaction. Once materialized, the byte array is available outside " +"of the transaction." +msgstr "" + +#. Tag: literal +#: basic_mapping.xml:4254 #, fuzzy, no-c-format msgid "" "imm_date, imm_time, imm_timestamp, imm_calendar, imm_calendar_date, " @@ -8463,7 +8549,7 @@ msgstr "" "imm_serializable, imm_binary" #. Tag: para -#: basic_mapping.xml:4188 +#: basic_mapping.xml:4258 #, no-c-format msgid "" "Type mappings for what are considered mutable Java types. This is where " @@ -8481,7 +8567,7 @@ msgstr "" "必须对这一属性重新设置一个新的(不一样的)对象。 " #. Tag: para -#: basic_mapping.xml:4200 +#: basic_mapping.xml:4270 #, no-c-format msgid "" "Unique identifiers of entities and collections can be of any basic type " @@ -8494,7 +8580,7 @@ msgstr "" "的,后面会说到。)" #. Tag: para -#: basic_mapping.xml:4205 +#: basic_mapping.xml:4275 #, no-c-format msgid "" "The basic value types have corresponding Type constants " @@ -8507,13 +8593,13 @@ msgstr "" "string 类型。" #. Tag: title -#: basic_mapping.xml:4212 +#: basic_mapping.xml:4282 #, no-c-format msgid "Custom value types" msgstr "自定义值类型" #. Tag: para -#: basic_mapping.xml:4214 +#: basic_mapping.xml:4284 #, no-c-format msgid "" "It is relatively easy for developers to create their own value types. For " @@ -8536,7 +8622,7 @@ msgstr "" "literal>。 " #. Tag: para -#: basic_mapping.xml:4225 +#: basic_mapping.xml:4295 #, no-c-format msgid "" "To implement a custom type, implement either org.hibernate." @@ -8551,7 +8637,7 @@ msgstr "" "DoubleStringType 这个例子,看看它是怎么做的。 " #. Tag: programlisting -#: basic_mapping.xml:4232 +#: basic_mapping.xml:4302 #, fuzzy, no-c-format msgid "" "<property name=\"twoStrings\" type=\"org.hibernate.test.DoubleStringType" @@ -8567,7 +8653,7 @@ msgstr "" "</property>" #. Tag: para -#: basic_mapping.xml:4234 +#: basic_mapping.xml:4304 #, no-c-format msgid "" "Notice the use of <column> tags to map a property " @@ -8577,7 +8663,7 @@ msgstr "" "法。" #. Tag: para -#: basic_mapping.xml:4237 +#: basic_mapping.xml:4307 #, no-c-format msgid "" "The CompositeUserType, EnhancedUserTypeUserType in the " @@ -8605,7 +8691,7 @@ msgstr "" "映射文件中使用 <type> 元素。 " #. Tag: programlisting -#: basic_mapping.xml:4250 +#: basic_mapping.xml:4320 #, fuzzy, no-c-format msgid "" "<property name=\"priority\">\n" @@ -8621,7 +8707,7 @@ msgstr "" "</property>" #. Tag: para -#: basic_mapping.xml:4252 +#: basic_mapping.xml:4322 #, no-c-format msgid "" "The UserType can now retrieve the value for the parameter " @@ -8632,7 +8718,7 @@ msgstr "" "对象中得到 default 参数的值。" #. Tag: para -#: basic_mapping.xml:4256 +#: basic_mapping.xml:4326 #, no-c-format msgid "" "If you regularly use a certain UserType, it is useful to " @@ -8647,7 +8733,7 @@ msgstr "" "值。 " #. Tag: programlisting -#: basic_mapping.xml:4262 +#: basic_mapping.xml:4332 #, fuzzy, no-c-format msgid "" "<typedef class=\"com.mycompany.usertypes.DefaultValueIntegerType\" name=" @@ -8661,13 +8747,13 @@ msgstr "" "</typedef>" #. Tag: programlisting -#: basic_mapping.xml:4264 +#: basic_mapping.xml:4334 #, fuzzy, no-c-format msgid "<property name=\"priority\" type=\"default_zero\"/>" msgstr "<property name=\"priority\" type=\"default_zero\"/>" #. Tag: para -#: basic_mapping.xml:4266 +#: basic_mapping.xml:4336 #, no-c-format msgid "" "It is also possible to override the parameters supplied in a typedef on a " @@ -8676,7 +8762,7 @@ msgstr "" "也可以根据具体案例通过属性映射中的类型参数覆盖在 typedef 中提供的参数。" #. Tag: para -#: basic_mapping.xml:4270 +#: basic_mapping.xml:4340 #, no-c-format msgid "" "Even though Hibernate's rich range of built-in types and support for " @@ -8696,13 +8782,13 @@ msgstr "" "方法时,它可以保证映射文件不需要修改。 " #. Tag: title -#: basic_mapping.xml:4283 +#: basic_mapping.xml:4353 #, no-c-format msgid "Mapping a class more than once" msgstr "多次映射同一个类" #. Tag: para -#: basic_mapping.xml:4285 +#: basic_mapping.xml:4355 #, no-c-format msgid "" "It is possible to provide more than one mapping for a particular persistent " @@ -8718,7 +8804,7 @@ msgstr "" "时,允许你指定这个 entity name(实体名字)。 " #. Tag: programlisting -#: basic_mapping.xml:4293 +#: basic_mapping.xml:4363 #, fuzzy, no-c-format msgid "" "<class name=\"Contract\" table=\"Contracts\"\n" @@ -8758,7 +8844,7 @@ msgstr "" "</class>" #. Tag: para -#: basic_mapping.xml:4295 +#: basic_mapping.xml:4365 #, no-c-format msgid "" "Associations are now specified using entity-name instead " @@ -8768,19 +8854,19 @@ msgstr "" "literal> 的。 " #. Tag: para -#: basic_mapping.xml:4299 basic_mapping.xml:4379 basic_mapping.xml:4414 +#: basic_mapping.xml:4369 basic_mapping.xml:4497 #, no-c-format msgid "This feature is not supported in Annotations" msgstr "" #. Tag: title -#: basic_mapping.xml:4304 +#: basic_mapping.xml:4374 #, no-c-format msgid "SQL quoted identifiers" msgstr "SQL 中引号包围的标识符" #. Tag: para -#: basic_mapping.xml:4306 +#: basic_mapping.xml:4376 #, no-c-format msgid "" "You can force Hibernate to quote an identifier in the generated SQL by " @@ -8795,7 +8881,7 @@ msgstr "" "在 SQL Server 中是括号,MySQL 中是反向引号)。 " #. Tag: programlisting -#: basic_mapping.xml:4312 +#: basic_mapping.xml:4382 #, fuzzy, no-c-format msgid "" "@Entity @Table(name=\"`Line Item`\")\n" @@ -8819,13 +8905,13 @@ msgstr "" "</class>" #. Tag: title -#: basic_mapping.xml:4316 +#: basic_mapping.xml:4386 #, no-c-format msgid "Generated properties" msgstr "数据库生成属性(Generated Properties) " #. Tag: para -#: basic_mapping.xml:4318 +#: basic_mapping.xml:4388 #, no-c-format msgid "" "Generated properties are properties that have their values generated by the " @@ -8843,7 +8929,7 @@ msgstr "" "INSERT 或者 UPDATE 语句,会立刻执行一条 select 来获得生成的值。 " #. Tag: para -#: basic_mapping.xml:4327 +#: basic_mapping.xml:4397 #, no-c-format msgid "" "Properties marked as generated must additionally be non-insertable and non-" @@ -8859,7 +8945,7 @@ msgstr "" "generated。 " #. Tag: para -#: basic_mapping.xml:4334 +#: basic_mapping.xml:4404 #, no-c-format msgid "" "never (the default): the given property value is not " @@ -8867,7 +8953,7 @@ msgid "" msgstr "never(默认)标明此属性值不是从数据库中生成。 " #. Tag: para -#: basic_mapping.xml:4337 +#: basic_mapping.xml:4407 #, no-c-format msgid "" "insert: the given property value is generated on insert, " @@ -8884,7 +8970,7 @@ msgstr "" "用这个选项。" #. Tag: para -#: basic_mapping.xml:4344 +#: basic_mapping.xml:4414 #, no-c-format msgid "" "always: the property value is generated both on insert " @@ -8893,19 +8979,19 @@ msgstr "" "always — 标明此属性值在 insert 和 update 时都会被生成。 " #. Tag: para -#: basic_mapping.xml:4347 +#: basic_mapping.xml:4417 #, no-c-format msgid "To mark a property as generated, use @Generated." msgstr "" #. Tag: title -#: basic_mapping.xml:4352 -#, no-c-format -msgid "Column read and write expressions" +#: basic_mapping.xml:4422 +#, fuzzy, no-c-format +msgid "Column transformers: read and write expressions" msgstr "字段的读写表达式" #. Tag: para -#: basic_mapping.xml:4354 +#: basic_mapping.xml:4424 #, fuzzy, no-c-format msgid "" "Hibernate allows you to customize the SQL it uses to read and write the " @@ -8922,7 +9008,30 @@ msgstr "" "programlisting>" #. Tag: programlisting -#: basic_mapping.xml:4359 +#: basic_mapping.xml:4430 +#, no-c-format +msgid "" +"@Entity\n" +"class CreditCard {\n" +" @Column(name=\"credit_card_num\")\n" +" @ColumnTransformer(\n" +" read=\"decrypt(credit_card_num)\", \n" +" write=\"encrypt(?)\")\n" +" public String getCreditCardNumber() { return creditCardNumber; }\n" +" public void setCreditCardNumber(String number) { this.creditCardNumber = " +"number; }\n" +" private String creditCardNumber;\n" +"}" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:4432 +#, no-c-format +msgid "or in XML" +msgstr "" + +#. Tag: programlisting +#: basic_mapping.xml:4434 #, no-c-format msgid "" "<property name=\"creditCardNumber\">\n" @@ -8934,7 +9043,44 @@ msgid "" msgstr "" #. Tag: para -#: basic_mapping.xml:4361 +#: basic_mapping.xml:4437 +#, no-c-format +msgid "" +"You can use the plural form @ColumnTransformers if " +"more than one columns need to define either of these rules." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:4442 +#, no-c-format +msgid "" +"If a property uses more that one column, you must use the " +"forColumn attribute to specify which column, the " +"expressions are targeting." +msgstr "" + +#. Tag: programlisting +#: basic_mapping.xml:4446 +#, no-c-format +msgid "" +"@Entity\n" +"class User {\n" +" @Type(type=\"com.acme.type.CreditCardType\")\n" +" @Columns( {\n" +" @Column(name=\"credit_card_num\"),\n" +" @Column(name=\"exp_date\") } )\n" +" @ColumnTransformer(\n" +" forColumn=\"credit_card_num\", \n" +" read=\"decrypt(credit_card_num)\", \n" +" write=\"encrypt(?)\")\n" +" public CreditCard getCreditCard() { return creditCard; }\n" +" public void setCreditCard(CreditCard card) { this.creditCard = card; }\n" +" private CreditCard creditCard;\n" +"}" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:4448 #, no-c-format msgid "" "Hibernate applies the custom expressions automatically whenever the property " @@ -8945,7 +9091,7 @@ msgstr "" "derived-property formula 相似,但有两个不同的地方:" #. Tag: para -#: basic_mapping.xml:4366 +#: basic_mapping.xml:4453 #, no-c-format msgid "" "The property is backed by one or more columns that are exported as part of " @@ -8953,13 +9099,13 @@ msgid "" msgstr "属性由一个或多个属性组成,它作为自动模式生成的一部分导出。" #. Tag: para -#: basic_mapping.xml:4371 +#: basic_mapping.xml:4458 #, no-c-format msgid "The property is read-write, not read-only." msgstr "属性是可读写的,非只读的。" #. Tag: para -#: basic_mapping.xml:4375 +#: basic_mapping.xml:4462 #, no-c-format msgid "" "The write expression, if specified, must contain exactly " @@ -8968,13 +9114,13 @@ msgstr "" "如果指定了 write 表达式,它必须只包含一个“?”占位符。" #. Tag: title -#: basic_mapping.xml:4384 +#: basic_mapping.xml:4467 #, no-c-format msgid "Auxiliary database objects" msgstr "辅助数据库对象(Auxiliary Database Objects) " #. Tag: para -#: basic_mapping.xml:4386 +#: basic_mapping.xml:4469 #, no-c-format msgid "" "Auxiliary database objects allow for the CREATE and DROP of arbitrary " @@ -8994,7 +9140,7 @@ msgstr "" "象... " #. Tag: para -#: basic_mapping.xml:4396 +#: basic_mapping.xml:4479 #, no-c-format msgid "" "The first mode is to explicitly list the CREATE and DROP commands in the " @@ -9002,7 +9148,7 @@ msgid "" msgstr "第一种模式是在映射文件中显式声明 CREATE 和 DROP 命令: " #. Tag: programlisting -#: basic_mapping.xml:4399 +#: basic_mapping.xml:4482 #, fuzzy, no-c-format msgid "" "<hibernate-mapping>\n" @@ -9022,7 +9168,7 @@ msgstr "" "</hibernate-mapping>" #. Tag: para -#: basic_mapping.xml:4401 +#: basic_mapping.xml:4484 #, no-c-format msgid "" "The second mode is to supply a custom class that constructs the CREATE and " @@ -9034,7 +9180,7 @@ msgstr "" "口。 " #. Tag: programlisting -#: basic_mapping.xml:4406 +#: basic_mapping.xml:4489 #, fuzzy, no-c-format msgid "" "<hibernate-mapping>\n" @@ -9052,7 +9198,7 @@ msgstr "" "</hibernate-mapping>" #. Tag: para -#: basic_mapping.xml:4408 +#: basic_mapping.xml:4491 #, no-c-format msgid "" "Additionally, these database objects can be optionally scoped so that they " @@ -9060,7 +9206,7 @@ msgid "" msgstr "还有,这些数据库对象可以特别指定为仅在特定的方言中才使用。 " #. Tag: programlisting -#: basic_mapping.xml:4411 +#: basic_mapping.xml:4494 #, fuzzy, no-c-format msgid "" "<hibernate-mapping>\n" @@ -9084,6 +9230,14 @@ msgstr "" " </database-object>\n" "</hibernate-mapping>" +#~ msgid "" +#~ "The force attribute is only useful if the table " +#~ "contains rows with \"extra\" discriminator values that are not mapped to " +#~ "a persistent class. This will not usually be the case." +#~ msgstr "" +#~ "force 属性仅仅在这种情况下有用的:表中包含没有被映射到" +#~ "持久化类的附加辨别器值。这种情况不会经常遇到。 " + #~ msgid "Class" #~ msgstr "类" diff --git a/documentation/manual/src/main/docbook/zh-CN/content/type.po b/documentation/manual/src/main/docbook/zh-CN/content/type.po index 65146cbf1b..c539962b19 100644 --- a/documentation/manual/src/main/docbook/zh-CN/content/type.po +++ b/documentation/manual/src/main/docbook/zh-CN/content/type.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: http://bugs.kde.org\n" -"POT-Creation-Date: 2010-07-21 04:35+0000\n" +"POT-Creation-Date: 2011-01-21 21:18+0000\n" "PO-Revision-Date: 2010-07-21 04:32+0000\n" "Last-Translator: Automatically generated\n" "Language-Team: none\n" @@ -714,25 +714,53 @@ msgstr "" #. Tag: classname #: type.xml:456 #, no-c-format -msgid "java.lang.Class" +msgid "java.net.URL" msgstr "" #. Tag: classname #: type.xml:459 #, no-c-format -msgid "org.hibernate.type.ClassType" +msgid "org.hibernate.type.UrlType" msgstr "" #. Tag: para #: type.xml:461 #, no-c-format msgid "" +"Maps a java.net.URL to a JDBC VARCHAR (using the " +"external form)" +msgstr "" + +#. Tag: para +#: type.xml:464 +#, no-c-format +msgid "" +"Registered under url and java.net.URL " +"in the type registry (see )." +msgstr "" + +#. Tag: classname +#: type.xml:473 +#, no-c-format +msgid "java.lang.Class" +msgstr "" + +#. Tag: classname +#: type.xml:476 +#, no-c-format +msgid "org.hibernate.type.ClassType" +msgstr "" + +#. Tag: para +#: type.xml:478 +#, no-c-format +msgid "" "Maps a java.lang.Class to a JDBC VARCHAR (using the " "Class name)" msgstr "" #. Tag: para -#: type.xml:464 +#: type.xml:481 #, no-c-format msgid "" "Registered under class and java.lang.Classjava.sql.Blob to a JDBC BLOB" msgstr "" #. Tag: para -#: type.xml:481 +#: type.xml:498 #, no-c-format msgid "" "Registered under blob and java.sql.Blobjava.sql.Clob to a JDBC CLOB" msgstr "" #. Tag: para -#: type.xml:498 +#: type.xml:515 #, no-c-format msgid "" "Registered under clob and java.sql.Clobbinary and byte[] in " @@ -818,33 +846,59 @@ msgid "" msgstr "" #. Tag: classname -#: type.xml:522 +#: type.xml:539 #, no-c-format msgid "org.hibernate.type.MaterializedBlobType" msgstr "" #. Tag: para -#: type.xml:524 +#: type.xml:541 #, no-c-format msgid "Maps a primitive byte[] to a JDBC BLOB" msgstr "" #. Tag: para -#: type.xml:527 +#: type.xml:544 #, no-c-format msgid "" "Registered under materialized_blob in the type registry " "(see )." msgstr "" +#. Tag: classname +#: type.xml:551 +#, no-c-format +msgid "org.hibernate.type.ImageType" +msgstr "" + #. Tag: para -#: type.xml:541 +#: type.xml:553 +#, no-c-format +msgid "Maps a primitive byte[] to a JDBC LONGVARBINARY" +msgstr "" + +#. Tag: para +#: type.xml:556 +#, no-c-format +msgid "" +"Registered under image in the type registry (see )." +msgstr "" + +#. Tag: title +#: type.xml:565 +#, no-c-format +msgid "Byte[]" +msgstr "" + +#. Tag: para +#: type.xml:570 #, no-c-format msgid "Maps a java.lang.Byte[] to a JDBC VARBINARY" msgstr "" #. Tag: para -#: type.xml:544 +#: type.xml:573 #, no-c-format msgid "" "Registered under wrapper-binary, Byte[]characters and char[] " "in the type registry (see )." msgstr "" +#. Tag: title +#: type.xml:599 +#, no-c-format +msgid "Character[]" +msgstr "" + #. Tag: classname -#: type.xml:573 +#: type.xml:602 #, no-c-format msgid "org.hibernate.type.CharacterArrayType" msgstr "" #. Tag: para -#: type.xml:575 +#: type.xml:604 #, no-c-format msgid "Maps a java.lang.Character[] to a JDBC VARCHAR" msgstr "" #. Tag: para -#: type.xml:578 +#: type.xml:607 #, no-c-format msgid "" "Registered under wrapper-characters, Character[]" @@ -900,25 +960,25 @@ msgid "" msgstr "" #. Tag: classname -#: type.xml:587 +#: type.xml:616 #, no-c-format msgid "java.util.UUID" msgstr "" #. Tag: classname -#: type.xml:590 +#: type.xml:619 #, no-c-format msgid "org.hibernate.type.UUIDBinaryType" msgstr "" #. Tag: para -#: type.xml:592 +#: type.xml:621 #, no-c-format msgid "Maps a java.util.UUID to a JDBC BINARY" msgstr "" #. Tag: para -#: type.xml:595 +#: type.xml:624 #, no-c-format msgid "" "Registered under uuid-binary and java.util.UUIDuuid-char in the type registry (see " @@ -948,13 +1008,13 @@ msgid "" msgstr "" #. Tag: classname -#: type.xml:614 +#: type.xml:643 #, no-c-format msgid "org.hibernate.type.PostgresUUIDType" msgstr "" #. Tag: para -#: type.xml:616 +#: type.xml:645 #, no-c-format msgid "" "Maps a java.util.UUID to the PostgreSQL UUID data type (through " @@ -963,7 +1023,7 @@ msgid "" msgstr "" #. Tag: para -#: type.xml:620 +#: type.xml:649 #, no-c-format msgid "" "Registered under pg-uuid in the type registry (see ." msgstr "" #. Tag: title -#: type.xml:686 +#: type.xml:715 #, no-c-format msgid "Entity types" msgstr "" #. Tag: para -#: type.xml:687 +#: type.xml:716 #, no-c-format msgid "" "The definition of entities is covered in detail in to that Product sku. " @@ -1118,19 +1178,19 @@ msgid "" msgstr "" #. Tag: para -#: type.xml:722 +#: type.xml:751 #, no-c-format msgid "TBC..." msgstr "" #. Tag: title -#: type.xml:728 +#: type.xml:757 #, no-c-format msgid "Custom types" msgstr "" #. Tag: para -#: type.xml:729 +#: type.xml:758 #, no-c-format msgid "" "Hibernate makes it relatively easy for developers to create their own " @@ -1144,7 +1204,7 @@ msgid "" msgstr "" #. Tag: para -#: type.xml:737 +#: type.xml:766 #, no-c-format msgid "" "There are 3 approaches to developing a custom Hibernate type. As a means of " @@ -1155,14 +1215,14 @@ msgid "" msgstr "" #. Tag: title -#: type.xml:744 +#: type.xml:773 #, no-c-format msgid "" "Custom types using org.hibernate.type.Type" msgstr "" #. Tag: para -#: type.xml:745 +#: type.xml:774 #, no-c-format msgid "" "The first approach is to directly implement the org.hibernate." @@ -1178,13 +1238,13 @@ msgid "" msgstr "" #. Tag: title -#: type.xml:756 +#: type.xml:785 #, no-c-format msgid "Defining and registering the custom Type" msgstr "" #. Tag: programlisting -#: type.xml:757 +#: type.xml:786 #, no-c-format msgid "" "before " @@ -1257,7 +1317,7 @@ msgid "" msgstr "" #. Tag: title -#: type.xml:767 +#: type.xml:796 #, no-c-format msgid "" "Custom types using org.hibernate.usertype.UserTypeorg.hibernate.usertype.UserType and " @@ -1275,7 +1335,7 @@ msgid "" msgstr "" #. Tag: para -#: type.xml:776 +#: type.xml:805 #, no-c-format msgid "" "The second approach is the use the org.hibernate.usertype." @@ -1287,13 +1347,13 @@ msgid "" msgstr "" #. Tag: title -#: type.xml:783 +#: type.xml:812 #, no-c-format msgid "Defining the custom UserType" msgstr "" #. Tag: programlisting -#: type.xml:784 +#: type.xml:813 #, no-c-format msgid "" "org.hibernate.type." @@ -1351,7 +1411,7 @@ msgid "" msgstr "" #. Tag: title -#: type.xml:796 +#: type.xml:825 #, no-c-format msgid "" "Custom types using org.hibernate.usertype.CompositeUserTypeorg.hibernate." @@ -1374,13 +1434,13 @@ msgid "" msgstr "" #. Tag: title -#: type.xml:808 +#: type.xml:837 #, no-c-format msgid "Defining the custom CompositeUserType" msgstr "" #. Tag: programlisting -#: type.xml:809 +#: type.xml:838 #, no-c-format msgid "" "StringType" msgstr "" #. Tag: programlisting -#: type.xml:831 +#: type.xml:860 #, no-c-format msgid "" "registerTypeOverride is a " @@ -1525,13 +1585,13 @@ msgid "" msgstr "" #. Tag: title -#: type.xml:839 +#: type.xml:868 #, no-c-format msgid "Snippet from BasicType.java" msgstr "" #. Tag: programlisting -#: type.xml:840 +#: type.xml:869 #, no-c-format msgid "" "/**\n" @@ -1544,7 +1604,7 @@ msgid "" msgstr "" #. Tag: para -#: type.xml:842 +#: type.xml:871 #, no-c-format msgid "" "One approach is to use inheritance (SuperDuperStringType