50 likes | 163 Vues
Dive deeper into Hibernate with this comprehensive guide to Object-Relational Mapping (ORM). Explore simple mappings using the @Column annotation (length, name, unique) and understand essential components like HibernateUtil, SessionFactory, and Session for object retrieval and persistence. This tutorial covers various association types, including Many-to-One, One-to-Many, One-to-One, and Many-to-Many relationships between classes. Learn the intricacies of crafting queries with SQL, HQL, and Criteria for efficient data manipulation and retrieval in your applications.
E N D
Grupo de Estudos VSM Hibernate (parte 2)
Hibernate (Revisão) • Framework ORM (ObjectRelationalMapping) • Mapeamentos “simples” • @Column(lenght, name, unique) • HibernateUtil • SessionFactory • Session • getById ( session.get(Objectobj) )
Hibernate (Persistindo objetos)
Hibernate (Mapeamentos) • Composição (Associações/Relacionamentos entre Classes) • Muitos para um (@ManyToOne) • Um para muitos (@OneToMany) • Um para um (@OneToOne) • Muitos para muitos (@ManyToMany)
Hibernate (Query – SQL / HQL / Criteria)