8.4. Summary
In this chapter, we looked at issues that you may run into when you have to deal with a legacy database schema. Natural keys, composite keys, and foreign keys are often inconvenient and need to be mapped with extra care. Hibernate also offers formulas, little SQL expressions in your mapping file, that can help you to deal with a legacy schema you can't change.
Usually, you also rely on Hibernate's automatically generated SQL for all create, read, update, and delete operations in your application. In this chapter, you've learned how to customize this SQL with your own statements and how to integrate Hibernate with stored procedures and stored functions.
In the last section, we explored the generation of database schemas and how you ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access