6.5. Summary

You're probably a little overwhelmed by all the new concepts we introduced in this chapter. You may have to read it a few times, and we encourage you to try the code (and watch the SQL log). Many of the strategies and techniques we've shown in this chapter are key concepts of object/relational mapping. If you master collection mappings, and once you've mapped your first parent/children entity association, you'll have the worst behind you. You'll already be able to build entire applications!

Table 6.1 summarizes the differences between Hibernate and Java Persistence related to concepts discussed in this chapter.

Table 6-1. Hibernate and JPA comparison chart for chapter 6
Hibernate CoreJava Persistence and EJB 3.0
Hibernate provides mapping support for sets, lists, maps, bags, identifier bags, and arrays. All JDK collection interfaces are supported, and extension points for custom persistent collections are available.Standardized persistent sets, lists, maps, and bags are supported.
Collections of value types and components are supported.Hibernate Annotations is required for collections of value types and embeddable objects.
Parent/children entity relationships are supported, with transitive state cascading on associations per operation.You can map entity associations and enable transitive state cascading on associations per operation.
Automatic deletion of orphaned entity instances is built in.Hibernate Annotations is required for automatic deletion of orphaned entity instances.

We've covered only a tiny subset of the entity association options in this chapter. The remaining options we explore in detail in the next chapter are either rare or variations of the techniques we've just described.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.141.166.152