CHAPTER 7 n CREATING MAPPINGS WITH HIBERNATE XML (Web site developers)

CHAPTER 7 n CREATING MAPPINGS WITH HIBERNATE XML FILES n CREATING MAPPINGS WITH HIBERNATE XML FILES 145 Attribute Values Default Description optimistic-lock persister polymorphism none, version implicit, explicit version implicit Specifies the optimistic locking dirty, all strategy to use. The strategy applies at a class level, but in Hibernate 3 can also be specified (or overridden) at an attribute level. Optimistic locking is discussed in Appendix A. Allows a custom ClassPersister object to be used when persisting the entity. Determines how polymorphism is to be used. The default implicit behavior will return instances of the class if superclasses or implemented interfaces are named in the query, and will return subclasses if the class itself is named in the query. proxy Specifies a class or an interface to use as the proxy for lazy initialization. Hibernate uses runtime-generated proxies by default, but you can specify your own implementation of org.hibernate. HibernateProxy in their place. rowid Flags that row IDs should be used (a database-implementation detail allowing Hibernate to optimize updates). schema Optionally overrides the schema specified by the element. select-beforeupdate true, false false Flags that Hibernate should carry out extra work to avoid issuing unnecessary UPDATE statements. If set to true, Hibernate issues a SELECT statement before attempting to issue an UPDATE statement in order to ensure that the UPDATE statement is actually required (i.e., that columns have been modified). While this is likely to be less efficient, it can prevent database triggers from being invoked unnecessarily. subselect A subselection of the contents of the underlying table. A class can only use a subselect if it is immutable and read- only (because the SQL defined here cannot be reversed). Generally, the use of a database view is preferable. table where The table name associated with the class (if unspecified, the unqualified class name will be used). An arbitrary SQL where condition to be used when retrieving objects of this class from the table. Many of these attributes in the element are designed to support preexisting database schemas. In practice, the name attribute is very often the only one set.
Note: If you are looking for high quality webhost to host and run your jsp application check Vision florida web design services

Leave a Reply