248 APPENDIX A n MORE ADVANCED FEATURES APPENDIX A n MORE ADVANCED FEATURES Listing A-15. The Revised Mapping
The behavior of the composite primary key is unchanged, but the SKU now becomes a simple property. The color entity is mapped as before. The caveat for this approach is the problem of writing data to the mapping. Some databases (for example, versions 4 and lower of MySQL) do not support writable views, and others may have only limited support for them. To avoid views in these circumstances, we must abandon complete portability in favor of database-specific SQL inserted directly into the mapping file. Putting SQL into a Mapping Hibernate provides three tags that can be used to override the default behavior when writing to the database. Instead of accepting the SQL generated by Hibernate from the information in
Searching for affordable and reliable webhost to host and run your web applications? Go to our java web server services and you will be pleased.
This entry was posted
on Sunday, August 19th, 2007 at 2:00 am and is filed under tomcat.
You can follow any responses to this entry through the RSS 2.0 feed.
You can leave a response, or trackback from your own site.