From 9a7d3ee81c87919e5af380ece5dd5cf6ec086a5f Mon Sep 17 00:00:00 2001 From: Gail Badner Date: Wed, 8 Aug 2012 00:32:35 -0700 Subject: [PATCH] HHH-7493 : Documentation still refers to dom4j as an entity mode --- .../appendix-Configuration_Properties.xml | 9 +- ...ational_Persistence_for_Idiomatic_Java.xml | 1 - .../manual/en-US/content/configuration.xml | 9 +- .../en-US/content/persistent_classes.xml | 9 +- .../main/docbook/manual/en-US/content/xml.xml | 288 ------------------ 5 files changed, 12 insertions(+), 304 deletions(-) delete mode 100755 documentation/src/main/docbook/manual/en-US/content/xml.xml diff --git a/documentation/src/main/docbook/devguide/en-US/appendix-Configuration_Properties.xml b/documentation/src/main/docbook/devguide/en-US/appendix-Configuration_Properties.xml index 71bea26a64..52cf44a5bd 100644 --- a/documentation/src/main/docbook/devguide/en-US/appendix-Configuration_Properties.xml +++ b/documentation/src/main/docbook/devguide/en-US/appendix-Configuration_Properties.xml @@ -4,7 +4,7 @@ xmlns:xl="http://www.w3.org/1999/xlink"> Configuration properties -
+
General Configuration @@ -67,10 +67,9 @@ hibernate.default_entity_mode - One of dynamic-map, dom4j, - pojo + dynamic-map or pojo Default mode for entity representation for all sessions opened from this - SessionFactory + SessionFactory, defaults to pojo. hibernate.order_updates @@ -363,4 +362,4 @@
- \ No newline at end of file + diff --git a/documentation/src/main/docbook/manual/en-US/HIBERNATE_-_Relational_Persistence_for_Idiomatic_Java.xml b/documentation/src/main/docbook/manual/en-US/HIBERNATE_-_Relational_Persistence_for_Idiomatic_Java.xml index e028d5f4ce..167282fce2 100644 --- a/documentation/src/main/docbook/manual/en-US/HIBERNATE_-_Relational_Persistence_for_Idiomatic_Java.xml +++ b/documentation/src/main/docbook/manual/en-US/HIBERNATE_-_Relational_Persistence_for_Idiomatic_Java.xml @@ -65,7 +65,6 @@ - diff --git a/documentation/src/main/docbook/manual/en-US/content/configuration.xml b/documentation/src/main/docbook/manual/en-US/content/configuration.xml index 1baf0044e5..7532bb94a3 100644 --- a/documentation/src/main/docbook/manual/en-US/content/configuration.xml +++ b/documentation/src/main/docbook/manual/en-US/content/configuration.xml @@ -309,7 +309,7 @@ hibernate.dialect = org.hibernate.dialect.PostgreSQL82Dialect above. - +
Hibernate Configuration Properties @@ -408,9 +408,10 @@ hibernate.dialect = org.hibernate.dialect.PostgreSQL82Dialect hibernate.default_entity_mode Sets a default mode for entity representation for all - sessions opened from this SessionFactory - dynamic-map, dom4j, - pojo + sessions opened from this SessionFactory, + defaults to pojo. + e.g. dynamic-map | + pojo diff --git a/documentation/src/main/docbook/manual/en-US/content/persistent_classes.xml b/documentation/src/main/docbook/manual/en-US/content/persistent_classes.xml index b9879ee020..5571855c14 100644 --- a/documentation/src/main/docbook/manual/en-US/content/persistent_classes.xml +++ b/documentation/src/main/docbook/manual/en-US/content/persistent_classes.xml @@ -322,7 +322,7 @@ public class DomesticCat extends Cat { key. -
+
Dynamic models @@ -335,8 +335,8 @@ public class DomesticCat extends Cat { Persistent entities do not necessarily have to be represented as POJO classes or as JavaBean objects at runtime. Hibernate also supports dynamic models (using Maps of Maps - at runtime) and the representation of entities as DOM4J trees. With this - approach, you do not write persistent classes, only mapping files. + at runtime). With this approach, you do not write persistent classes, + only mapping files. By default, Hibernate works in normal POJO mode. You can set a default entity representation mode for a particular @@ -444,9 +444,6 @@ dynamicSession.close() call flush() and close() on the secondary Session, and also leave the transaction and connection handling to the primary unit of work. - - More information about the XML representation capabilities can be - found in .
diff --git a/documentation/src/main/docbook/manual/en-US/content/xml.xml b/documentation/src/main/docbook/manual/en-US/content/xml.xml deleted file mode 100755 index cf989c5a64..0000000000 --- a/documentation/src/main/docbook/manual/en-US/content/xml.xml +++ /dev/null @@ -1,288 +0,0 @@ - - - - XML Mapping - - - XML Mapping is an experimental feature in Hibernate 3.0 and is currently under - active development. - - -
- Working with XML data - - - Hibernate allows you to work with persistent XML data in much the same way - you work with persistent POJOs. A parsed XML tree can be thought of - as another way of representing the relational data at the object level, - instead of POJOs. - - - - Hibernate supports dom4j as API for manipulating XML trees. You can write - queries that retrieve dom4j trees from the database and have any - modification you make to the tree automatically synchronized to the - database. You can even take an XML document, parse it using dom4j, and - write it to the database with any of Hibernate's basic operations: - persist(), saveOrUpdate(), merge(), delete(), replicate() - (merging is not yet supported). - - - - This feature has many applications including data import/export, - externalization of entity data via JMS or SOAP and XSLT-based reporting. - - - - A single mapping can be used to simultaneously map properties of a class - and nodes of an XML document to the database, or, if there is no class to map, - it can be used to map just the XML. - - -
- Specifying XML and class mapping together - - - Here is an example of mapping a POJO and XML simultaneously: - - - - - - - - - - - ... - -]]> -
- -
- Specifying only an XML mapping - - - Here is an example where there is no POJO class: - - - - - - - - - - - ... - -]]> - - - This mapping allows you to access the data as a dom4j tree, or as a graph of - property name/value pairs or java Maps. The property names - are purely logical constructs that can be referred to in HQL queries. - - -
- -
- -
- XML mapping metadata - - - A range of Hibernate mapping elements accept the node attribute. - This lets you specify the name of an XML attribute or element that holds the - property or entity data. The format of the node attribute - must be one of the following: - - - - - "element-name": map to the named XML element - - - "@attribute-name": map to the named XML attribute - - - ".": map to the parent element - - - - "element-name/@attribute-name": - map to the named attribute of the named element - - - - - - For collections and single valued associations, there is an additional - embed-xml attribute. If embed-xml="true", - the default, the XML tree for the associated entity (or collection of value type) - will be embedded directly in the XML tree for the entity that owns the association. - Otherwise, if embed-xml="false", then only the referenced - identifier value will appear in the XML for single point associations and - collections will not appear at all. - - - - Do not leave embed-xml="true" for - too many associations, since XML does not deal well with circularity. - - - - - - - - - - - - - - - - - - - ... - -]]> - - - In this case, the collection of account ids is embedded, but not - the actual account data. The following HQL query: - - - - - - would return datasets such as this: - - - - 987632567 - 985612323 - - Gavin - A - King - - ... -]]> - - - If you set embed-xml="true" on the <one-to-many> - mapping, the data might look more like this: - - - - - - 100.29 - - - - -2370.34 - - - Gavin - A - King - - ... -]]> - -
- - -
- Manipulating XML data - - - You can also re-read and update XML documents in the application. You can do this by - obtaining a dom4j session: - - - - - - - - When implementing XML-based data import/export, it is useful to combine this feature with Hibernate's replicate() - operation. - - -
- -
-