25.06.2017 Views

Hibernate-Tutorial

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>Hibernate</strong> <strong>Tutorial</strong><br />

ii<br />

Contents<br />

1 Introduction 1<br />

2 Project setup 2<br />

3 Basics 3<br />

3.1 SessionFactory and Session . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3<br />

3.2 Transactions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5<br />

3.3 Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5<br />

4 Inheritance 8<br />

5 Relationships 14<br />

5.1 OneToOne . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14<br />

5.2 OneToMany . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17<br />

5.3 ManyToMany . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20<br />

5.4 Component . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23<br />

6 User-defined Data Types 25<br />

7 Interceptors 28<br />

8 Download 30

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!